cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Customer properties allow you to gather and store specific information from customer responses. This documentation guides you through the process of adding a new customer property and saving customer responses to it.

 

🎥 You prefer to watch a quick hands-on tutorial? Check out our new bot builder video tutorial!

 

👉  Currently, the bot is capable of saving customer properties with the following types: number, word, time, and text. Any customer properties with types not included in this list will not be stored. 

 

Add a New Customer Property

Follow these steps to create a new customer property, for example, to store customer IDs:

  1. Navigate to the Customers section and select Customer Properties.
  2. Click the + button at the top right to add a new property.
  3. Fill in the name, label, and type. For this example, leave values and default values empty.

 

Screenshot 2023-12-15 at 17.32.13.png

 4. Click Create.

 

Save customer response to customer property

Now, configure the chatbot builder to save customer responses to the created customer property:

  1. Add a Collect Input block to your chatbot flow.
  2. Include a text message asking for the customer's information.

 

Screenshot 2023-12-15 at 17.41.19.png
 
3. In the "Capture user responses as" section, choose @sysnumber under "Check if response matches," assuming the customer ID is numeric.

  

 
Screenshot 2023-12-15 at 17.42.18.png

 

4. Under Destination Variable, select the previously created customer property.

 

Screenshot 2023-12-15 at 17.42.53.png

 5. Configure the Go-To block to continue the conversation.

 

Screenshot 2023-12-15 at 17.44.05 (1).png

 

6. Click Save and add a text message for the configured Go-To block.

7. Add text message for the configure go-to block.

 

Screenshot 2023-12-15 at 17.46.14.png

8. Publish your bot to make your changes live. 

 

By following these steps, your chatbot will now collect and store customer IDs in the specified customer property, enhancing the efficiency of your interactions with users.

 

Use customer property response in bot message

Enhance your bot's interactions by incorporating customer property responses into your messages. Similarly to using variables, this feature allows you to leverage information stored in customer properties to personalize your bot messages.

 

To use a customer property inside bot message:

  1. Navigate to the desired block containing the bot message.
  2. Compose your bot message as usual.
  3. Insert the customer property response by clicking on ‘{’ within your message. This opens a menu where you can select the customer properties available for use. For instance, if you have saved the user's nickname as a customer property, you can incorporate it into your message for a more personalized touch.
Screenshot 2023-12-18 at 14.37.09.png

4. Select the correct customer property by identifying it through the associated user icon.

5. Save your changes, and your bot message will now dynamically incorporate the customer property response during interactions.

 

Use customer properties with buttons

To use customer properties with buttons, you will need to:

  1. Create a Conditions block as a Go To after each button. 
  2. Open one of these blocks.
  3. In the Else option click on + Add variable of type Text.
  4. In the following field, add the internal value of the variable using this format: internal.user.properties.Department_1703155477054 and add the value of the button in the third field, like the image below:

 

camila_spricigo_0-1703601330716.png

 

 

Nice to know

If you have a customer property and a variable with the same name, this is how you can distinguish them: customer properties are shown with an avatar icon, while variables have the curly brackets icon {}.

camila_spricigo_2-1703586668367.png
 
✔️ If your customer property looks like this after you selected it on the bot internal.user.properties.Department_1703155477054 it will work! It contains the name of the customer property
camila_spricigo_5-1703587107409.png

 

✖️If it looks like this internal.user.properties.01H7Z6ARP3TYKJ29H9XRXDG8BN, and doesn't show the name of the customer property, it won't work. This happens to customer properties created in the past and we are working to support them soon. If you have the possibility to re-create or create new customer properties, they should work as the case above mentioned.
 

Working with previously created customer properties and/or customer properties updated with a CSV


If you are working with csv files to batch update the customer properties, it will also not work for now. Using customer properties in the bot flow works when they are added/updated through the chatbot conversation. 

 

camila_spricigo_0-1703590277448.png

 

For these types of customer properties, the indicated way is to make an API call (read more here) to

https://rest.messengerpeople.com/docs/v17/#method-5b6ea1729c24ea6c90055e6e359b42e4

camila_spricigo_0-1703865445568.png

As you can see from the image above, you can make a GET request to the endpoint: https://rest.messengerpeople.com/api/v17/user/property informing the user id, which is variable for every conversation and is saved under profile.messenger_id and you need to inform a value, which should be a string. The result of this API call will be saved under the variable that is called apiResult, in this example. Don't forget to put your API key in the Authorization tab 😉.

Once a succesfull reqeust is made, this is what the apiResult will look like:

 

 

 

 

 "apiResult": {
        "data": {
            "property": {
                "id": 117533,
                "channel_id": 72165,
                "name": "City",
                "expiration": -1,
                "label": "City",
                "default_value": "---",
                "position": 4,
                "type": "word",
                "values": "",
                "hidden": 0,
                "agent_visible": 1,
                "user_visible": 1
            },
            "user_values": [
                {
                    "id": 999001212140221,
                    "value": "Berlin",
                    "last_update": 1703864511
                }
            ]
        },

 

 

 

 

So, in order to show the customer property you need, this is the syntax you need to use:

{apiResult.data.user_values[0].value}

 

camila_spricigo_1-1703866776773.png

 

This is how it will look like in the conversation:

camila_spricigo_0-1703866718503.png

 

 

See also: 

Variables and properties 

Create a customer property

[New bot builder] Collect input from your user

Version history
Last update:
‎01-02-2024 04:20 AM
Updated by: