You can set custom properties to store attributes picked up from the conversation. You can define these custom properties to have values based on your customer or the conversation:

  • Any properties you set for the customer will be assigned permanently — for example, their location or language preference). 
  • Any properties you set up for the conversation will expire when the conversation is resolved — for example, the type of issue.


With these properties, you will be able to store relevant information at any given point in time. You can then use this information to display conditional logic or pass the stored value to another application using APIs. This article will walk you through the following:


TABLE OF CONTENTS


Some examples of use cases:

  1. Instead of asking your customer for a specific value multiple times in the conversation, you can collect it from the customer once, and save it as a custom property.
    For example, if you're an e-commerce platform, a customer might need help with their order status, refund, returns, etc. Irrespective of the issue that your customers need help with, you'll expect them to input their order ID. Get the order ID at the beginning of the conversation and save it as a custom property. You can then use it directly or through API calls for other requirements.

  2. In WhatsApp, the customer usually enters a numeric input to choose an option in the bot flow. We can use custom properties to store the selected option.
    For example, the bot flow you've set up asks your customer to press 1 for New Bookings, 2 for Cancellations, and 3 for Checking Ticket Status. Your customer will choose the option and create the respective ticket. Upon ticket creation, you can set a property for "Type", store the respective value based on the customer's choice, and pass the request type to Freshdesk.


Other use cases include storing customer preferences, passing key values to trigger automations or workflows in a different system, or temporarily storing values during computational events.


How to set properties in the bot builder:

  • Click on the dialog where you want to declare the new property > New action > Set property.



  • Once you choose the action type as Set property, you will see the following fields:
    • Action type: Set property
    • Save in
      • Conversation: the property will expire after the conversation
      • User: the property is defined for the user for all future conversations
    • Property name: The property name is just for your reference.
    • Property value: This can be static or dynamic.
      • Static value: Enter the static value in alphanumeric format, which will apply to all conversations.
      • Dynamic value: To use a dynamic value, click on the + to access your placeholders, and choose from existing dialogs, APIs, parameters, functions, or create a new one.



Note: The property name can only have letters, numbers, - and _


  • To use the custom properties you set up, click on the + sign to access your placeholders > Properties > Search or select the Property name you used while setting up the custom property. Please note that the variable is case-sensitive.

Where to find the captured custom properties?

  • You can go through the conversation logs to identify the custom properties captured for each conversation. Navigate to Conversations and open the conversation for which you need the custom property.


  • On the sidebar, you can see the value that is stored under the header, Custom properties.





How to modify, delete, or see all the custom properties in a bot?

  • Navigate to Configure > Custom properties



  • Here you can see the list of all custom properties used in the current bot.


  • You can create new properties, modify, or delete custom properties from here.


Note: Deleting a custom property from this screen will break any bot flows where these properties are actively being used. Please make sure that the properties are not in use before deleting or modifying them.


You can modify the

  • Property name: which you use to refer to the property anywhere in the bot flow
  • Source: Instead of the bot flow, you can generate it from an API call. Learn more about APIs in the bot builder here.
  • Save in: Switch between saving the custom property for the user or the conversation
  • Use in JS: When enabled, this property will be included in the widget embed code. This will be useful when you need variable data from the website or app where you will deploy the widget.