The following keys are essential to call the methods for displaying the conversation AI in your app.
- orgId
- flowId
- domain
The values of these keys appear under the Code Snippet section on the setup page of the ASAP help widget in Zoho Desk.
There is an additional key called 'preferred language,' which is an optional parameter. The language code (e.g., en_us) should be provided as the value for the preferred language parameter. If the GC flow languages include the preferred language, it will load; otherwise, the default language flow will load. If no value is provided for the preferred language, the default language flow will load.
SHOW BOT
Kotlin
Without an optional parameter:
ZohoGC.showFlow(activity, orgId, flowId, domain)
With optional parameter:
ZohoGC.showFlow(activity, orgId, flowId, domain, "en_us")
Java
Without an optional parameter:
ZohoGC.showFlow(activity, orgId, flowId, domain, "")
With optional parameter:
ZohoGC.showFlow(activity, orgId, flowId, domain, "en_us")
Setting up location block
To enable the location block, please follow the below steps:
Learn how to get the API key from Google - Get the API key for Google Maps from Google.
- Go to the Androidmanifet.xml file and add the below lines.
Also add the generated map API key.
- <meta-data
android:name="com.google.android.geo.API_KEY"
android:value="YOUR_MAP_API_KEY"
tools:replace="android:value"/>
- Open the strings.xml file and add the following line:
- <string name="zoho_gc_places_api_key">YOUR_MAP_API_KEY</string>
Search option
The search option enables the user to search for a location and share it. This option will be displayed by default. If not required, follow the below method in your preferred language to hide it:
The "search option" for searching for an address is a paid service.

Kotlin
ZConfigUtil.hideLocationSearch = true
Java
ZConfigUtil.hideLocationSearch = true
What are session variables?
These variables are dynamically retrieved during the conversation. These variables are org-specific and accessible across flows.
You can perform the following actions with the session variable:
Set Session Variable
Kotlin
val sessionVariableMap = HashMap<String, Any>()
sessionVariableMap.apply
{
this["name"] = "exampleName"
this["value"] = "exampleValue"
}
val sessionVariableList = ArrayList<HashMap<String, Any>>()
sessionVariableList.add(sessionVariableMap)
ZohoGC.setSessionVariables(widgetId,sessionVariableList)
Java
HashMap<String, Object> sessionVariableMap= new HashMap<>();
sessionVariableMap.put("name","exampleName");
sessionVariableMap.put("value","exampleValue");
ArrayList<HashMap<String,Object>> sessionVariableList= new
ArrayList<>();
sessionVariableList.add(sessionVariableMap);
ZohoGC.setSessionVariables(widgetId,sessionVariableList);
Update Session Variable
Kotlin
val sessionVariableMap = HashMap<String, Any>()
sessionVariableMap.apply
{
this["name"] = "exampleName"
this["value"] = "exampleValue"
}
val sessionVariableList = ArrayList<HashMap<String, Any>>()
sessionVariableList.add(sessionVariableMap)
ZohoGC.updateSessionVariables(context,orgId, widgetId, domain,sessionVariableList)
Java
- HashMap<String, Object> sessionVariableMap= new HashMap<>();
sessionVariableMap.put("name","exampleName");
sessionVariableMap.put("value","exampleValue");
ArrayList<HashMap<String,Object>> sessionVariableList= new ArrayList<>();
sessionVariableList.add(sessionVariableMap);
ZohoGC.updateSessionVariables(context,orgId, widgetId, domain,sessionVariableList)