Last updated: 2021-01-26
How to set up custom properties (attributes) in Freddy Self-service?
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.
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:

- Action type: Set property - Set in: C onversation (the property will expire after the conversation) - Key: Declare your attribute key, which is just for your reference - V alue: 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.


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.

- 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 - V alue: 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.


- 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.



Please write to freshbots-support@freshworks.com if you have any more questions; we’ll be happy to help you.