Enable your bot to offer contextual customer service with Properties in the Freshchat bot builder. The bot builder comes with two types of Properties:

  1. default properties: that we offer out of the box
  2. custom properties: that you can set up for your specific use cases.


Let's go over the following aspects of using properties in the bot builder and how you can offer contextual customer support with them:



Syncing properties across conversations

  • Any properties created in Contacts will automatically show up while using “Set property” in the bot builder. 


  • Similarly, any properties saved by the bot during a conversation will reflect on the Contacts page.


A few examples of making use of properties for better customer service 

  1. When you need to get specific input at multiple points from your customer, you can collect it once and save it as a property that you can refer to at different points in time. 

    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. Collect their order ID at the beginning of the conversation, set the property, and use it directly through API calls to get 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 use the selected option to route the ticket later.

    For example, your customer needs to press 1 for New Bookings, 2 for Cancellations, and 3 for Checking Status. You can set a property for “Type”, store the respective value from the customer's choice, and pass the request type to Freshdesk with an attribute upon ticket creation.


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.


Using properties to improve customer experience

  • Once you set up properties in the bot-builder, you can save your customer information as the property's value. This property-value can be referenced anywhere else in the bot-builder as it is tied either to the conversation (temporary) or to the customer (permanent).


  • If you're looking to improve your customer's self-service experience, you can use these properties with the self-service widget. You can prefill the value of these properties with variables. You can pass the variable into the bot embed script wherever you embed your bot: your portal, website, or even your mobile app.


  • These variables will get populated with information that your customers share on your portal, website, mobile app, etc., and get passed on to the bot, which can now offer a highly personalized, customer experience.


Setting up properties in the Conversations widget

  • To set up any user properties and pass them to the conversation widget, navigate to the Web Messenger settings. You can do that either by:
    • Navigating to Admin > Web Messenger > Getting Started, or 
    • Navigate to Bots > Deploy > Deploy options > Conversations widget > Script


  • Once you're here, you can scroll down to the (Optional) Identify the user, where you can set user properties to identify your customers and set properties for them. You can refer to the Freshchat API documentation to learn more about setting user properties or about offering a better experience for your logged-in users.


Setting up default properties in the self-service widget

  • Once you've finished setting up your bot, navigate to Deploy > Deploy Options > Self-service widget menu item, and you can see the list of default properties that are available out of the box. The default properties are as follows:

  • Name: Store your customer’s name
  • Email ID: Store your customer’s email address
  • Phone number: Store your customer’s phone number
  • Language: Store your customer’s preferred language
  • External Conversations ID: Store your external IDs, like your customer’s order ID or transaction ID (for example) that you use to maintain different bot conversations for the same customer
  • External Customer ID: Store your customer’s unique ID to manage multiple sessions across devices
  • Authentication ID: Store and pass the Auth ID for making API calls 


Note: You can also define the default properties of Name, Email, and Phone number using Named Entity Recognition (NER). Learn how here.


Setting up custom properties in the self-service widget

  • From the bot builder, insert a new Action > Dynamic Actions > Set property



  • The set property menu opens up where you can start configuring the details of the property, such as the name, value, and where it should be saved in.


  • Any properties you set for the user will be assigned permanently (such as their location or language preference). Any properties that you set up for the conversation will expire when the conversation is resolved (such as the type of issue).

  • Use Property name to declare the name of your property, which is just for your reference, and Property value to declare your attribute value that is to be associated with the property.


  • The value can be static or dynamic. To use a dynamic value, click on the + to access your placeholders, and you can choose from existing dialogs, APIs, properties, functions, or create new ones directly.

  • To configure other settings for your custom properties, navigate to Flows > Configure > Custom Properties. Here you can see the list of all the custom properties that have been set up. Click on the pencil icon under the Actions menu to edit them.


  • Select the Source from the drop-down. You can choose between Flow and API.
    • Flow: If the source is selected as Flow, you can choose to save the information in the conversation or in the user. You can also choose to check the Use in JS checkbox, and the property will be available when you generate the widget embed script from the Deploy menu. You can then use this as a variable with its value either hard coded or fetched dynamically and assigned from wherever the widget script used



  • API: If the source is selected as API, you will be able to select the required response properties of an API from the API library of that bot to initialize the custom properties. Once this API is called in a flow the custom property assumes the value of the response properties mapped to it.


Using properties in the self-service widget

  • Select the dialog where you want to use the property in the chatbot flow. Click on the + icon to access all your placeholders, and click on Properties from the dropdown.

  • All the properties associated with the bot will be listed here. You will see the list of the default properties followed by the list of custom properties. Click on the specific properties to add them to the message.
     
  • While setting up the script to embed the self-service widget, you can notice the script will contain the default and the custom property values. You can even populate these values using liquid placeholders or a JS function response.



Note: Make sure that any custom properties you use with APIs, are called by using the Trigger API action for it to function properly.


Deploying your bot

You can generate the bot widget script from the Deploy page for each bot. You can copy and paste this script on all your support media (portals, webpages, apps etc.) to embed the bot. Any changes you make to the bot configuration will automatically reflect in the bot widget, so you will need to paste this script only once on the required support mediums.


Note: If you use the self-service widget, you can choose which of these properties are mandatory properties. Any mandatory field which isn't filled will prevent the self-service widget from working properly.


Tip: Prefill the mandatory property-values with a variable on the deploy screen.