Bot Fields allow you to store your bot data and set values depending on your contact’s actions. They look like Custom User Fields but can store values which are related to your bot: texts, numbers and formulas, date and time.
Here are some examples of what you can build:
- track the number of coupons you distribute in Messenger and notify yourself when they run out
- track your webinar or event attendees and get notified as soon as less than 10 spots left
- decrease the number of products left in stock by 1 each time someone makes a purchase in your bot
- ask your contacts to rate your bot and track these ratings
Bot Fields can be found in the Settings section under the Fields tab.
Hit +New Bot Field to create Bot Field. For example, I want to distribute tickets to a webinar and I have 50 tickets in total. Create a new Bot Field with Number type and specify the value. I will set the value to 0 tickets there.
Now, let's build a Flow. At the beginning of my Flow I will check if there are free spots available. Add a Condition Step and create a condition — Bot Field "Tickets" value is less than 50.
If my webinar is already full, I will ask them to get notified about the next one. If not, I ask them to save their spot, add a tag, and increase Bot Field "Tickets" by 1. My contact can book their spot until all the tickets run out.
If you have unlimited spots, you can do it in the opposite way and just track the amount of registrations. Create new Bot Field with Number type and set its value to 0. Each time you get new registration, just increase it by one.
You can also use Bot Fields in Condition Step and get notified when the 100th spot was booked and use Bot Field value in your message to provide the exact ticket number — use {} button in message builder to insert it in your message or just start typing {{ and select the desired Bot Field (just like Custom Fields).
Managing your Bot Fields
To archive or delete unneeded Bot Fields go to Settings -> Fields. Please, notice, that while archiving Bot Fields allows later restore, deletion is permanent and can't be reverted.
Click on the three dots next to a field then click 'Archive' to archive an active Bot Field.
You can then either unarchive an archived Bot Field or delete it completely by clicking the three dots next to the archived Bot Field and selecting the desired option.