How to set Session Variables for React Native SDK?
What are session variables?
Guided Conversations
These variables are dynamically retrieved during the bot conversations. These variables are org-specific and accessible across GC flows.
You can perform these actions with the session variable as mentioned below.
Set Session Variable of Guided Conversations:
To pass the values for the session variables configured with GC Flow/Widget, use the following method:
- import {ZohoDeskPortalChatKit} from '@zohocorp/zohodesk-portal-chatkit';
- //To pass an array of dictionary
- ZohoDeskPortalChatKit.setGCSessionVariable([{variableName: value},{variableName: value}])
Update Session Variable of Guided Conversations:
To update the values for the session variables configured with GC Flow/Widget, use the following method:
- import {ZohoDeskPortalChatKit} from '@zohocorp/zohodesk-portal-chatkit';
- //To pass an array of dictionary
- ZohoDeskPortalChatKit.updateGCSessionVariable([{variableName: value},{variableName: value}])
Business Messaging
These variables are dynamically retrieved during the bot
conversations. These variables are org-specific and accessible across IM channels.
You can perform these actions with the session variable as mentioned:
Set Session Variable of Business Messaging:
To pass the values for the session variables configured with the BM Channel, use the following method:
- import {ZohoDeskPortalChatKit} from '@zohocorp/zohodesk-portal-chatkit';
- ZohoDeskPortalChatKit.setBMSessionVariable([{variableName: value},{variableName: value}])
Update Session Variable of Business Messaging:
To update the values for the session variables configured with the BM Channel, use the following method:
- import {ZohoDeskPortalChatKit} from '@zohocorp/zohodesk-portal-chatkit';
- ZohoDeskPortalChatKit.updateBMSessionVariable([{variableName: value},{variableName: value}])