You can set custom properties or attributes picked up from your customer and bot’s conversation. You can set these custom properties either for the customer or for the conversation. Any properties you set for the customer will be assigned permanently (such as their location or language preference). In contrast, any properties that you set up for the conversation will expire when the conversation is resolved (such as the type of issue).


With these properties, you will be able to store relevant information at any given point in time. This information can, in turn, be used to display conditional logic or for passing the stored value to another application using APIs.


TABLE OF CONTENTS


Common use cases:

  1. When you get a specific input from the customer at multiple points in a bot flow, you can store the customer’s latest value in an attribute.
    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. Ask the customer for their order ID at the beginning of the conversation, set the property, and use it directly through API calls for getting the different items that your customer needs help with.

  2. In WhatsApp, the customer usually enters a numeric input to choose an option in the bot flow. We can use attributes to store the option the customer selected.
    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 Status. Based on your customer, they will either press one of the buttons to 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 with an attribute.


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 for the conversation:

  • Click on the dialog in which 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
    • Set in: Conversation (the property will expire after the conversation)
    • Key: Declare your attribute key, which is just for your reference
    • Value: Declare your attribute value that is to be associated with the key. It can be a static or a dynamic value. To use a dynamic value, click on the to access your placeholders, and you can choose from existing dialogs, APIs, parameters, functions or create new ones directly.


  • To use the conversation-level custom property that you created, click on the + sign to access your placeholders > Parameters > Conversation Extra Information > Enter the attribute key you entered while declaring the attribute. Please note that the variable is case sensitive.


  • This property is saved in the conversation logs. Navigate to Conversations > open the customer conversation, and on the sidebar, you can see the value that is stored



How to set properties for the user:

The process to set properties on the user level (as opposed to the conversation level) is almost the same, but we will have to add one extra step of creating a custom parameter along the way.

  • Click on the dialog in which 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
    • Set in: User (the property will hold the value for all conversations from this user)
    • Key: Declare your attribute key, which is just for your reference
    • Value: Declare your attribute value that is to be associated with the key. It can be a static or a dynamic value. To use a dynamic value, click on the to access your placeholders, and you can choose from existing dialogs, APIs, parameters, functions or create new ones directly.



  • To use the custom property that you created for the user, you’ll first have to create a custom parameter to store the value.


  • Click on the + sign to access your placeholders > Parameters > +New parameter.



  • On the Custom parameters page, set the following properties
    • Key that you earlier declared as the name of the Parameter. Please note that the variable is case sensitive.
    • Source as JS, and
    • Save in Customer details
    • You can also choose to make this parameter mandatory depending on your flow.


  • Remember to save after setting up the custom parameters and then head back to your flow.


  • To use the user-level custom property that you created, click on the + sign to access your placeholders > Parameters > Custom parameters > pick the custom parameter you just set up.



  • This property is also saved in the conversation logs. Navigate to Conversations > open the customer conversation, and on the sidebar, you can see the value that is stored

   


Please write to [email protected] if you have any more questions; we’ll be happy to help you.