How to use Global Attributes in AiSensy?

3 min. readlast update: 08.31.2024

What is a Global attribute?

Global attributes are attributes used to store sensitive data, i.e., data that the owner doesn't wish to share with agents & managers on the AiSensy platform. Such as payment configuration IDs, authentication tokens, & much more. Only the owner of an AiSensy project can view the value stored in the Global attribute.

Note: Global attributes are created uniquely for each project & currently only works with Chatbot flows!

The owner has access to set up a Global attribute, configure it as well as change it anytime they want. Managers can only access the global attribute name, not the attribute value. The attribute value will be hidden from them at all times.

Like this👇

 

 

How to setup a Global attribute?

Follow the below steps to setup a global attribute in AiSensy:

 

1. Under Flows, go to Global Attributes

 

2. Add Attribute name & value & save the attribute

 

Use Case Scenario of Global Attributes

1. Secure sensitive data

Values stored in Global attributes are only visible to the project owner. This is useful to secure sensitive data such as Payment IDs & URLs.

Here's an example of how this works:

Step 1 Under Flows, go to Global attributes and create a new global attribute

Let's consider that you wish to attach Razorpay's API key to your chatbot to send payments links on WhatsApp.

Under value, add the unique Razorpay API key you wish to attach in the Chatbot flow.

 

Step 2 Go to your Chatbot flow & Select API Request from the Content Block

 

Step 3 Configure the API request and under headers section, select "RazorpayAPIKey" as your global attribute

 

Step 4 RazorpayAPIKey Global attribute is set

 

Step 5 Save the changes in your Chatbot flow

That's it!

If you wish to create more API requests with the same attribute value, all you need to do is select the Global Attribute and your job's done.

 

 

2. Easily change attribute values across the Chatbot in one go

Let's say you previously hosted an event named Evolve 1.0 and now wish to host another event named Techsparks

In the previous chatbot, wherever you needed to mention Evolve 1.0, you created a global attribute $EventName with the global attribute value Evolve 1.0

To make your job more seamless, you only need to change the Global Attribute value from Evolve 1.0 to Techsparks and whenever the chatbot triggers, it will send Techsparks as value for the attribute $EventName

You don't need to change the value one by one throughout the Chatbot. All you need to do is change the value once under Global Attribute.

Was this article helpful?