Custom Attributes

Enrich your customer data with Custom Attributes in Bevatel, enabling tracking of specific details like subscription plans, order history, and more to enhance customer insights.

Custom Attributes

Bevatel supports Custom Attributes other than standard data attributes (a default set of data about your conversations/contacts like Name, Email, Location, etc.). A Custom Attribute tracks facts about your contacts/conversations. The Custom Attribute can be anything, E.g.:

  • Subscription plan

  • Subscribed date

  • Signup date

  • Most ordered item

  • Ordered product link

  • Last transaction date

The only difference between custom and standard attributes is standard data attributes automatically get updated.

Custom data attributes are the information you attached to conversations/customers, like how many times they've ordered a product when they sign up, or what plan they're on. So you can set whatever attributes you want to understand your customer/conversation better, and it will all show in Bevatel.

Add a new Custom Attribute

To add a new Custom Attribute, navigate to the Custom Attributes by clicking on Settings (1) -> Custom Attributes (2) from the sidebar.

Click on the Add Custom Attributes (3) button available on the top right corner of the page, which will open a modal as shown below.

These are the inputs required to create the Custom Attribute:

Input
Description

Display name

Act as a label while rendering a Custom Attribute

Description

Description about the Custom Attribute

Type

Type of data it will store. Currently supports Text, Number, Link, and Date

Key

Unique identifier attached to the Custom Attribute

You cannot create a Custom Attribute with the same key twice in the account.

Once you enter the details, click on the Create button. A message "Custom Attribute added successfully" will be displayed if the request is successful.

Conversation Custom Attributes

1. Set attributes via the SDK method

You can set Custom Attributes for each conversation using the SDK setConversationCustomAttributes method and also delete the attribute using the deleteConversationCustomAttribute method.

2. Set attributes via the contact side panel

After creating a conversation Custom Attribute, you will be able to add these attributes to the conversation via the conversation sidebar.

It will open an attribute dropdown selector, then select the attribute that you want to add

Enter a valid value and click on the Create button. A message "Attribute added successfully" will be displayed if the request is successful.

Also, you could see the actions like edit/delete/copy by hovering on the attribute.

Custom attributes

There are two ways to set Custom Attributes for contacts

1. Set attributes via the SDK method

To set a Custom attributes call setCustomAttributes the method as follows,

window.$bevatel.setCustomAttributes({
  key: value,
  // Key is a unique identifier which is already defined while creating a Custom attribute
  // Value should be based on type (Currently support Number, Date, String and Number)
  // Double-check that your keys always have a JSON-valid value
  // You need to flatten nested JSON structure while using this function
});

Ex:

window.$bevatel.setCustomAttributes({
  plan: "premium",
  signUpDate: new Date(),
});

You can view these attributes in the contact side panel

To delete a Custom Attribute, use deleteCustomAttribute as following

window.$bevatel.deleteCustomAttribute("attribute-key");

Ex:

window.$bevatel.deleteCustomAttribute("signUpDate");

Prior to version v1.22 , all the attributes rendered as text. Please create new definition to display the value properly

2. Set attributes via the contact side panel

After creating the Custom Attribute, you will be able to add these attributes to the contact via the conversation/contact sidebar.

It will open an attribute dropdown selector, then select the attribute that you want to add

Enter a valid value, and click on the Create button. A message "Attribute added successfully" will be displayed if the request is successful.

Also, you could see the actions like edit/delete/copy by hovering on the attribute.

Last updated