A new section called Code Snippet will appear. This section displays the following:
Org ID - Specifies the unique ID of the organization.
Widget ID - Specifies the unique ID of the selected widget.
Domain - Specifies the unique URL of your organization.
The content appears as follows:
# Uncomment this line to define a global platform for your project
# platform :ios, '11.0'
# Uncomment this line if you're using Swift
# use_frameworks!
target 'My Sample App' do
end
1. Include the SDK of your choice in the Podfile. Include the following code in the do block of the Podfile to integrate the ZohoGCSDK.
target 'My Sample App' do
pod 'ZohoGCSDK'
end
2. Save the Podfile.
Before installation of CocoaPods, the file will be opened as xcodeproj. After installation, close the xcodeproj file and open the xcworkspace file.
Learn more about CocoaPods: how to install CocoaPods and how to use CocoaPods
To integrate ZohoGCSDK, perform the following steps:
1. Download the SDK of ZohoGCSDK.
2. Decompress the downloaded zip file with .XCFramework extension.
The following keys are essential to call the methods for displaying the conversation AI in your app.
orgId
widgetId
domain
The values of these keys appear under the Code Snippet section on the setup page of the ASAP add-on in Zoho Desk.
SHOW BOT:
Swift
import ZohoGCSDK
Objective-C
@import ZohoGCSDK;
The following methods display the Guided Conversations.
Swift
ZohoGC.show(orgId: <#T##String#>,
widgetId: <#T##String#>, domain: <#T##String#>)
Objective-C
[ZohoGC showWithOrgId:<#(NSString * _Nonnull)#>
widgetId:<#(NSString * _Nonnull)#> domain:<#(NSString * _Nonnull)#>]
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:
ZohoGC.setSessionVariables(sessionVariables: <#T##[String : String]#>)
ZohoGC.updateSessionVariables(sessionVariables: <#T##[String : String]#>)
.
Methods for applying the white theme (Default)
Swift
ZDThemeManager.setTheme(type: .white)
Objective-C
[ZDThemeManager setTheme:ZDThemeTypeWhite];
Methods for applying the black theme
Swift
ZDThemeManager.setTheme(type: .dark)
Objective-C
[ZDThemeManager setTheme:ZDThemeTypeDark];
Swift
ZDThemeManager.setTheme(type: .system)
Objective-C
[ZDThemeManager setTheme:ZDThemeTypeSystem];
Customized themes: You can customize the default light and dark themes to make the SDK look more like your application.
To update the default light theme,
Swift
ZDThemeManager.updateTheme(theme:<#ZDThemeProtocol#>)
Objective-C
[ZDThemeManager updateThemeWithTheme:<#ZDThemeProtocol#>];
To update the default dark theme,
Swift
ZDThemeManager.updateDarkTheme(theme: <#ZDThemeProtocol#>)
Objective-C
[ZDThemeManager updateDarkThemeWithTheme:<#ZDThemeProtocol#>];
ZDThemeProtocol provides a list of properties, such as primaryTextColor and navigationBarTextColor, for additional color customization. All properties in the protocol are optional. You can create any class conforming to this protocol, implement one or more properties, and pass an object of that class to the updateTheme or updateDarkTheme method. The colors you set in the class will override the default theme.
Use the following method to delete any local data that has been saved inside the SDK, such as databases and files:
Swift
ZohoGC.clearData()
Objective-C
[ZohoGC clearData];
By default, logs are disabled for the SDK. To get the debug logs printed in logcat, enable the logs by the following method:
Swift
import ZohoGCSDK ... ZohoGC.enableLog(isLogEnabled: <#T##Bool#>)
@import ZohoGCSDK;
...
[ZohoGC enableLogWithIsLogEnabled:<#(BOOL)#>];
Learn how to use the best tools for sales force automation and better customer engagement from Zoho's implementation specialists.
If you'd like a personalized walk-through of our data preparation tool, please request a demo and we'll be happy to show you how to get the best out of Zoho DataPrep.
You are currently viewing the help pages of Qntrl’s earlier version. Click here to view our latest version—Qntrl 3.0's help articles.