# Uncomment this line to define a global platform for your project # platform :ios, '9.0' # Uncomment this line if you're using Swift # use_frameworks! target 'My Sample App' do end
target 'My Sample App' do pod 'ZohoDeskPortalCore' end
target 'My Sample App' do pod 'ZohoDeskPortalServices' end
Before installation of CocoaPods, the file will be opened as xcodeproj.
import ZohoDeskPortalAPIKit
@import ZohoDeskPortalAPIKit;
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { ZohoDeskPortalSDK.initialize(orgID:<#String#>, appID:<#String#>, dataCenter: <#ZDPDataCenter#>) return true }
- (BOOL)application:(UIApplication *)application
didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
[ZohoDeskPortalSDK
initializeWithOrgID:<#NSString#>appID:<#NSString#>dataCenter:<
#ZDPDataCenter#>];
return YES;
}
import ZohoDeskPortalCore ... ZDPortalHome.show()
@import ZohoDeskPortalCore; ... [ZDPortalHome showWithTitle:<#(NSString * _Nullable)#> navigationMode:<#(enum ZDPNavigationMode)#>];
let config = ZDPHomeConfiguration()
config.enableHelpCenter = true
config.enableCommunity = true
config.enableCreateTicket = true
config.enableMyTicket = true
config.enableAddTopic = true
config.showChat = true
config.showChatBot = true
ZDPortalHome.updateConfiguration(with: config)
ZDPortalHome.show()
ZDPHomeConfiguration * config = [[ZDPHomeConfiguration alloc]init];
config.enableHelpCenter = YES;
config.enableCommunity = YES;
config.enableCreateTicket = YES;
config.enableMyTicket = YES;
config.enableAddTopic = YES;
config.showChat = YES;
config.showChatBot = YES;
[ZDPortalHome updateConfigurationWith:config];
[ZDPortalHome showWithTitle:<#(NSString * _Nullable)#> navigationMode:<#(enum ZDPNavigationMode)#>];
import ZohoDeskPortalChat ... ZDPortalChat.show()
@import ZohoDeskPortalChat; ... [ZDPortalChat show];
import ZohoDeskPortalKB
@import ZohoDeskPortalKB;
ZDPortakKB.show()
[ZDPortalKB showWithTitle:<#(NSString * _Nullable)#> navigationMode:<#(enum ZDPNavigationMode)#>];
ZDPortalKB.showCategory(withPermalink: <#String#>)
[ZDPortalKB showCategoryWithPermalink:<#(NSString * _Nonnull)#> withTitle:<#(NSString * _Nullable)#>];
ZDPortalKB.showArticle(withPermalink : <#String#>)
[ZDPortalKB showArticleWithPermalink:<#(NSString * _Nonnull)#> withTitle:<#(NSString * _Nullable)#>];
import ZohoDeskPortalTicket
@import ZohoDeskPortalTicket;
ZDPortalSubmitTicket.show()
[ZDPortalSubmitTicket showWithTitle:<#(NSString * _Nullable)#> navigationMode:<#(enum ZDPNavigationMode)#>];
ZDPortalTicket.show()
[ZDPortalTicket showWithTitle:<#(NSString * _Nullable)#> navigationMode:<#(enum ZDPNavigationMode)#>];
import ZohoDeskPortalCommunity
@import ZohoDeskPortalCommunity;
ZDPortalCommunity.show()
[ZDPortalCommunity showWithTitle:<#(NSString * _Nullable)#> navigationMode:<#(enum ZDPNavigationMode)#>];
ZDPortalCommunity.showTopic(withID: <#String#>)
[ZDPortalCommunity showTopicWithID:<#(NSString * _Nonnull)#> withTitle:<#(NSString * _Nullable)#>];
import ZohoDeskPortalLiveChat
@import ZohoDeskPortalLiveChat;
ZDPortalLiveChat.show()
[ZDPortalLiveChat show];
import ZohoDeskPortalAPIKit
@import ZohoDeskPortalAPIKit;
Token | Definition | Authentication Flow |
usertoken | encrypted unique information that identifies the user (email address, for example) | old flow |
jwttoken | passed from your app. kindly refer for how to generate jwttoken | new flow |
if !ZohoDeskPortalSDK.isUserLoggedIn
{
ZohoDeskPortalSDK.login(withUserToken: String)
{ (isSuccess: Bool) in
// isSuccess shows whether the login attempt was successful
// any errors will be logged
}
}else
{
// user logged in already
}
if (!ZohoDeskPortalSDK.isUserLoggedIn)
{
[ZohoDeskPortalSDK loginWithUserToken:
<#(NSString * _Nonnull)#> onCompletion:^(BOOL isSuccess)
{
// isSuccess shows whether the login attempt was successful
// any errors will be logged
}];
}else
{
// user logged in already
}
if !ZohoDeskPortalSDK.isUserLoggedIn
{
ZohoDeskPortalSDK.login(withJWTToken: String)
{ (isSuccess: Bool) in
// isSuccess shows whether the login attempt was successful
// any errors will be logged
}
}else
{
// user logged in already
}
if (!ZohoDeskPortalSDK.isUserLoggedIn)
{
[ZohoDeskPortalSDK loginWithJWTToken:
<#(NSString * _Nonnull)#> onCompletion:^(BOOL isSuccess)
{
// isSuccess shows whether the login attempt was successful
// any errors will be logged
}];
}else
{
// user logged in already
}
ZohoDeskPortalSDK.logout { (isSuccess: Bool ) in // isSuccess shows whether the logout attempt was successful // any errors will be logged }
[ZohoDeskPortalSDK logoutOnCompletion:^(BOOL isSuccess) { // isSuccess shows whether the logout attempt was successful // any errors will be logged }];
ZohoDeskPortalSDK.clearAllLocalData()
[ZohoDeskPortalSDK clearAllLocalData];
import ZohoDeskPortalConfiguration
@import ZohoDeskPortalConfiguration;
ZDPThemeManager.setTheme(type: .light)
[ZDPThemeManager setThemeWithType:ZDPThemeTypeLight];
ZDPThemeManager.setTheme(type: .dark)
[ZDPThemeManager setThemeWithType:ZDPThemeTypeDark];
ZDPThemeManager.setTheme(type: .system)
[ZDPThemeManager setThemeWithType:ZDPThemeTypeSystem];
ZDPThemeManager.updateLightTheme(theme: <#ZDPThemeProtocol#>)
[ZDPThemeManager updateLightThemeWithTheme:<#ZDPThemeProtocol#>];
ZDPThemeManager.updateDarkTheme(theme: <#ZDPThemeProtocol#>)
[ZDPThemeManager updateDarkThemeWithTheme:<#ZDPThemeProtocol#>];
ZDPortalConfiguration.customFontName = <#String#>
ZDPortalConfiguration.customFontName = <#NSString#>;
Language | Locale Code |
English (UK) | en-GB |
English (US) | en |
German | de |
Spanish | es |
Catalan | ca-ES |
French | fr |
French (Canada) | fr-CA |
Italian | it |
Russian | ru |
Chinese (Traditional) | zh-Hant |
Chinese (Simplified) | zh-Hans |
Turkish | tr |
Dutch | nl |
Danish | da |
Portuguese (Portugal) | pt-PT |
Japanese | ja |
Swedish | sv |
Polish | pl |
Arabic | ar |
Hebrew | he |
Afrikaans | af |
Czech | cz |
Bulgarian | bg |
Finnish | fi |
Greek | el |
Hungarian | hu |
Indonesian | id |
Norwegian (Bokmal) | nb |
Romanian | ro |
Thai | th |
Ukrainian | uk |
Vietnamese | vi |
Urdu | ur |
Hindi | hi |
Telugu | te |
Kannada | kn |
Tamil | ta |
Marathi | mr |
Korean | ko |
Persian | fa |
Bengali | bn |
Gujarati | gu |
Malay | ms |
Malayalam | ml |
Slovak | sk |
Croatian | hr |
Slovenian | sl |
ZDPortalConfiguration.setSDKLanguage(<#String#>)
[ZDPortalConfiguration setSDKLanguage:<#NSString#>];
Language | Locale Code |
English | en |
German | de |
Spanish | es |
French | fr |
Italian | it |
Russian | ru |
Chinese (Traditional) | zh-Hant |
Chinese (Simplified) | zh-Hans |
Turkish | tr |
Dutch | nl |
Danish | da |
Portuguese (Portugal) | pt-PT |
Japanese | ja |
Key | Default Text | Description |
DeskPortal.Dashboard.Heading | "Welcome" | Text that appears on the help center dashboard |
DeskPortal.Dashboard.helpcenter.title | "Knowledge Base" | Title of the Knowledge Base module icon on the dashboard |
DeskPortal.Dashboard.helpcenter.description | "Browse our extensive repository of help articles" | Text that describes the Knowledge Base |
DeskPortal.Dashboard.community.title | "Community" | Title of the user community module icon on the dashboard |
DeskPortal.Dashboard.community.description | "Find and share solutions with the User Community" | Text that describes the User Community |
DeskPortal.Dashboard.addticket.title | "Submit Ticket" | Title of the ticket submission module icon on the dashboard |
DeskPortal.Dashboard.addticket.description | "Seek help from our agents" | Text that describes the ticket submission screen |
DeskPortal.Dashboard.myticket.title | "My Tickets" | Title of the my tickets icon on the dashboard |
DeskPortal.Dashboard.myticket.description | "View and manage tickets that you submitted" | Text that describes the my tickets screens |
DeskPortal.Helpcenter.article.detail.relatedtitle | "Related Articles" | Text that appears below any help article in the Knowledge Base |
DeskPortal.Helpcenter.article.detail.vote.description | "Was this article helpful?" | Text that seeks feedback from the user |
DeskPortal.Helpcenter.feedback.title | "Feedback" | Title of the feedback form |
DeskPortal.Helpcenter.feedback.description | "We're sorry the article wasn't helpful." | Text that appears when a user downvotes an article |
DeskPortal.Myticket.option.closeticket | "Close Ticket" | Text for option that lets the user close a ticket they submitted |
DeskPortal.Error.message.reload | "Retry" | Error message that appears if ticket submission fails |
DeskPortal.Network.failed.error.message | "Check your internet connection" | Error message that indicates loss of connectivity |
DeskPortal.Dashboard.livechat.title | "Live Chat" | Title of the live chat module on the help center dashboard |
DeskPortal.Helpcenter.category.subheading | "Section" | Text that appears if only one article category exists in the Knowledge Base |
DeskPortal.Helpcenter.categories.subheading | "Sections" | Text that appears if multiple article categories exist in the Knowledge Base |
DeskPortal.Helpcenter.article.detail.title | "FAQs" | Title of the individual article screen |
DeskPortal.Addticket.title | "Add Ticket" | Title of the ticket submission form |
DeskPortal.Myticket.comment.option.title | "Comment Actions" | Title of the options menu that appears when a user adds a comment to a ticket |
DeskPortal.Myticket.option.editcomment | "Edit Comment" | Text for option that lets the user edit a comment they made |
DeskPortal.Helpcenter.article.subheading | "Article" | Text that appears if only one article exists under an article category |
DeskPortal.Helpcenter.articles.subheading | "Articles" | Text that appears if multiple articles exist under an article category |
func application (_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) { let token = deviceToken.reduce ("", {$0 + String(format: "%02X", $1)}).uppercased() ZohoDeskPortalSDK.enablePushNotification (deviceToken:token, mode: .production) }
- (void)application:(UIApplication *)application
didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken
{
NSString * token = [[[[deviceToken description]
stringByReplacingOccurrencesOfString: @"<" withString: @""]
stringByReplacingOccurrencesOfString: @">" withString: @""]
stringByReplacingOccurrencesOfString: @" " withString: @""];
[ZohoDeskPortalSDK enablePushNotificationWithDeviceToken:<#(NSString * _Nonnull)#> isTestDevice:<#(BOOL)#> mode:<#(enum APNSmode)#>];
}
import ZohoDeskPortalConfiguration ... func application(_ application: UIApplication, didReceiveRemoteNotification userInfo: [AnyHashable : Any]) { ZDPortalConfiguration.processRemoteNotification(userInfo: userInfo) }
@import ZohoDeskPortalConfiguration; ... - (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:(void (^) (UIBackgroundFetchResult))completionHandler { [ZDPortalConfiguration processRemoteNotificationWithUserInfo:userInfo]; }
Steps to upload the .p12 file for using the APNS Certificate:
import ZohoDeskPortalChat ... ZDPortalChat.setGuestUser(email:<#Guest_User_Email#>, displayName:<#Guest_User_DisplayName#>", phoneNumber: <#Guest_User_PhoneNumber#>")
@import ZohoDeskPortalChat; ... [ZDPortalChat setGuestUserWithEmail:<#Guest_User_Email#> displayName:<#Guest_User_DisplayName#> phoneNumber:<#Guest_User_PhoneNumber#>];
import ZohoDeskPortalAPIKit
@import ZohoDeskPortalAPIKit;
ZohoDeskPortalSDK.getDepartments(onCompletion: { (departments, error) in // on success, departments will return an array, error will return nil // on failure, error will return a value, departments will return nil }
[ZohoDeskPortalSDK getDepartmentsOnCompletion:^ (NSArray * departments, NSError * error) { // on success, departments will return an array, error will return nil // on failure, error will return a value, departments will return nil }];
ZohoDeskPortalSDK.getProducts(inDepartmentID: <#T##String#>, params: <#T##[String : Any]?#>) { products, error in // on success, products will return an array, error will return nil // on failure, error will return a value, products will return nil }
[ZohoDeskPortalSDK getProductsInDepartmentID:<#NSString#> params:<#NSDictionary#>onCompletion:^ (NSArray * products, NSError * error) { // on success, products will return an array, error will return nil // on failure, error will return a value, products will return nil }];
ZohoDeskPortalSDK.Ticket.getFields(<#T##params: [String : Any]?##[String : Any]?#>) { fields, error in // on success, fields will return an array, error will return nil // on failure, error will return a value, products will return nil }
[ZohoDeskPortalSDKTicket getFields: <#(NSDictionary * _Nullable)#>onCompletion:^ (NSArray * fields, NSError * error) { // on success, fields will return an array, error will return nil // on failure, error will return a value, fields will return nil }];
ZohoDeskPortalSDK.Ticket.addAttachment(with:<#Data#>, andName:<#String#>, using: <#ZDPUploaderDelegate?#>) { (attachment, error) in // on success, attachment will return a value, error will return nil // on failure, error will return a value, attachment will return nil }
[ZohoDeskPortalSDKTicket addAttachmentWith: <#NSData#>andName:<#NSString#>using: <#(id _Nullable)#>onCompletion:^ (ZDPortalAttachment * attachment, NSError * error) { // on success, attachment will return a value, error will return nil // on failure, error will return a value, attachment will return nil }];
if ZohoDeskPortalSDK.isUserLoggedIn { ZohoDeskPortalSDK.Ticket.add(withFields:<#T##[String : Any]#>) { (ticket, error) in // on success, ticket will return an object, error will return nil // on failure, error will return a value, ticket will return nil } } else { ZohoDeskPortalSDK.Ticket.addAsGuest (withFields: <#T##[String : Any]#>) { (ticketNumber, error) in // on success, ticketNumber will return a string value, error will return nil // on failure, error will return a value, ticketNumber will return nil } }
if (ZohoDeskPortalSDK.isUserLoggedIn) { [ZohoDeskPortalSDKTicket addWithFields:<#(NSDictionary * _Nonnull)#> onCompletion:^(ZDPTicket * ticket, NSError * error) { // on success, ticket will return an object, error will return nil // on failure, error will return a value, ticket will return nil }]; } else { [ZohoDeskPortalSDKTicket addAsGuestWithFields: <#(NSDictionary * _Nonnull)#> onCompletion:^(NSString * ticketNumber, NSError * error) { // on success, ticketNumber will return a string value, error will return nil // on failure, error will return a value, ticketNumber will return nil }] }
ZDPCommunityConfiguration.isTopicEditAllowed = <#Bool#>
ZDPCommunityConfiguration.isTopicDeleteAllowed = <#Bool#>
ZDPCommunityConfiguration.isReplyAllowed = <#Bool#>
ZDPCommunityConfiguration.iReplyEditAllowed = <#Bool#>
ZDPCommunityConfiguration.isReplyDeleteAllowed = <#Bool#>
ZDPCommunityConfiguration.isTopicEditAllowed = <#Bool#>; ZDPCommunityConfiguration.isTopicDeleteAllowed = <#Bool#>; ZDPCommunityConfiguration.isReplyAllowed = <#Bool#>; ZDPCommunityConfiguration.isReplyEditAllowed = <#Bool#>; ZDPCommunityConfiguration.isReplyDeleteAllowed = <#Bool#>;
ZohoDeskPortalSDK.Community.getMostPopularTopics(<#T##params: [String : Any]?##[String : Any]?#>) { topics, error in // switch on result to get array of topics on success }
[ZohoDeskPortalSDKCommunity getMostPopularTopics: <#(NSDictionary * _Nullable)#> onCompletion:^(NSArray * topics, NSError * error) { // on success, topics will return an array, error will return nil // on failure, error will return a value, topics will return nil }];
ZohoDeskPortalSDK.Community.getMostDisuccedTopics(<#T##params: [String : Any]?##[String : Any]?#>) { topics, error in // on success, topics will return an array, error will return nil // on failure, error will return a value, products will return nil }
[ZohoDeskPortalSDKCommunity getMostDisuccedTopics: <#(NSDictionary * _Nullable)#> onCompletion:^(NSArray * topics, NSError * error) { // on success, topics will return an array, error will return nil // on failure, error will return a value, topics will return nil }];
ZDPortalSubmitTicket.setFieldsListTobeShown (fields: <#[ZDVisibleTicketField]#>)
[ZDPortalSubmitTicket setFieldsListTobeShownWithFields: <#(NSArray * _Nonnull)#>];
ZDPortalSubmitTicket.preFillTicketFields(forForms: <#[ZDCustomizedTicketForm]#>)
[ZDPortalSubmitTicket preFillTicketFieldsForForms:<#[ZDCustomizedTicketForm]#>];
ZDPortalSubmitTicket.getCallbackOnCreateTicket
{ ticket in
// will get ticket object on success
}
onError:
{ error in
// will get error on failure
}
[ZDPortalSubmitTicket getCallbackOnCreateTicketWithCompletion:^(ZDPTicket * ticket)
{
// will get ticket object on success
} onError:^(NSError * error)
{
// will get error on failure
}];
ZDPTicketConfiguration.configure.isAddTicketAllowed = <#Bool#> ZDPTicketConfiguration.configure.isReplyAllowed = <#Bool#> ZDPTicketConfiguration.configure.isCommentAllowed = <#Bool#> ZDPTicketConfiguration.configure.isCommentEditAllowed = <#Bool#> ZDPTicketConfiguration.configure.isTicketUpdateAllowed = <#Bool#> ZDPTicketConfiguration.configure.isCommentDeleteAllowed = <#Bool#> ZDPTicketConfiguration.configure.isCustomerHappinessThreadAllowed = <#Bool#>
ZDPTicketConfiguration.configure.isAddTicketAllowed = <#Bool#> ZDPTicketConfiguration.configure.isReplyAllowed = <#Bool#> ZDPTicketConfiguration.configure.isCommentAllowed = <#Bool#> ZDPTicketConfiguration.configure.isCommentEditAllowed = <#Bool#> ZDPTicketConfiguration.configure.isTicketUpdateAllowed = <#Bool#> ZDPTicketConfiguration.configure.isCommentDeleteAllowed = <#Bool#> ZDPTicketConfiguration.configure.isCustomerHappinessThreadAllowed = <#Bool#>
import ZohoDeskPortalAPIKit ... var body = [String : Any]() body["displayName"] = "displayName" body["mobile"] = "123456" ZohoDeskPortalSDK.updateUserInformation(with: body) { profile, error in // on success only profile will return a value, error will return nil // on failure only error will return a value, profile will return nil }
NSMutableDictionary * body = [NSMutableDictionary new]; [body setObject:@"displayName" forKey:@"displayName"]; [body setObject:@"123456" forKey:@"mobile"]; [ZohoDeskPortalSDK updateUserInformationWith:body onCompletion: ^(Profile * profile, NSError * error) { // on success only profile will return a value, error will return nil // on failure only error will return a value, profile will return nil }];
let configuration = ZDPConfiguration() configuration.disableSidemenu = true configuration.disableLanguageChooser = true configuration.disablePoweredByZoho = true ZDPortalConfiguration.set(configuration: configuration)
ZDPConfiguration * configuration = [ZDPConfiguration init];
configuration.disableSidemenu = YES;
configuration.disableLanguageChooser = YES;
configuration.disablePoweredByZoho = YES;
[ZDPortalConfiguration setWithConfiguration:configuration];
import ZohoDeskPortalAPIKit ... ZohoDeskPortalSDK.enableLogs()
@import ZohoDeskPortalAPIKit;
...
[ZohoDeskPortalSDK enableLogs];
Fixed the problem of uploading attachments faced in iOS 13.
Resolved the problem with the custom title in the Community module.
Handled Configuration for customer happiness thread. For more information, refer "Custom-Configuring Ticket Actions" under Customizing the Tickets module.
Handled the miscellaneous bug fixes.
Fixed the navigation issue in Submit Ticket case.
The following tables list the changes you need to make to ensure a smooth migration.
v2.0 Series | v3.0 |
let config = ZDPHomeConfiguration() config.enableHelpCenter = true config.enableCommunity = false config.enableCreateTicket = true config.enableMyTicket = true ZDPortalHome.show(withConfiguration: config) |
config.enableHelpCenter = true config.enableCommunity = true config.enableCreateTicket = true config.enableMyTicket = true config.enableAddTopic = true config.showChat = true config.showChatBot = true ZDPortalHome.updateConfiguration(with: config) ZDPortalHome.show()
// added separate method to set Home configuration
|
Theme API changes
v2.0 Series | v3.0 |
import ZDThemeKit | import ZohoDeskPortalConfiguration |
ZDThemeManager.updateTheme(theme: <#ZDThemeProtocol#>) | ZDPThemeManager.updateLightTheme(theme: <#ZDPThemeProtocol#>) |
# Uncomment this line to define a global platform for your project # platform :ios, '9.0' # Uncomment this line if you're using Swift # use_frameworks! target 'My Sample App' do end
target 'My Sample App' do pod 'ZohoDeskPortalCore' end
target 'My Sample App' do pod 'ZohoDeskPortalServices' end
import ZohoDeskPortalAPIKit
@import ZohoDeskPortalAPIKit;
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { ZohoDeskPortalSDK.initialize(orgID:<#String#>, appID:<#String#>, dataCenter: <#ZDPDataCenter#>) return true }
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { [ZohoDeskPortalSDK initializeWithOrgID:<#NSString#>appID:<#NSString#>dataCenter:<#ZDPDataCenter#>]; return YES; }
import ZohoDeskPortalCore ... ZDPortalHome.show()
@import ZohoDeskPortalCore; ... [ZDPortalHome showWithConfiguration:nil andTitle:nil];
let config = ZDPHomeConfiguration() config.enableHelpCenter = true // disable/enable the Help center (Knowledge Base). config.enableCommunity = false // disable/enable the Community. config.enableCreateTicket = true // disable/enable the CreateTicket. config.enableMyTicket = true // disable/enable My Tickets. ZDPortalHome.show(withConfiguration: config)
ZDPHomeConfiguration * config = [[ZDPHomeConfiguration alloc]init]; config.enableHelpCenter = YES; // disable/enable the Help center (Knowledge Base). config.enableCommunity = NO; // disable/enable the Community. config.enableCreateTicket = YES; // disable/enable the CreateTicket. config.enableMyTicket = YES; // disable/enable My Tickets. [ZDPortalHome showWithConfiguration:config andTitle:<#(NSString * _Nullable)#>];
import ZohoDeskPortalChat ... ZDPortalChat.show()
@import ZohoDeskPortalChat; ... [ZDPortalChat show];
import ZohoDeskPortalKB
@import ZohoDeskPortalKB;
ZDPortakKB.show()
[ZDPortalKB showWithTitle:<#NSString#>];
ZDPortalKB.showCategory(withPermalink: <#String#>)
[ZDPortalKB showCategoryWithPermalink:<#NSString#>withTitle:<#NSString#>];
ZDPortalKB.showArticle(withPermalink : <#String#>)
ZDPortalKB showArticleWithPermalink:<#NSString#>withTitle:<#NSString#>];
import ZohoDeskPortalTicket
@import ZohoDeskPortalTicket;
ZDPortalSubmitTicket.show()
[ZDPortalSubmitTicket showWithTitle:<#NSString#>];
ZDPortalSubmitTicket.showAddTicketForm(completion: { (ticket) in // The ticket parameter contains the details of the ticket created. // Your program logic goes here. }, onError: { error in // error creating Ticket })
[ZDPortalSubmitTicket showAddTicketFormWithTitle:<#(NSString * _Nullable)#> navigationMode:<#(enum ZDPNavigationMode)#> completion:^(ZDPTicket * ticket) { // The ticket parameter contains the details of the ticket created. // Your program logic goes here. } onError:^(NSError * error) { // error creating Ticket }];
ZDPortalTicket.show()
[ZDPortalTicket showWithTitle:<#NSString#>];
import ZohoDeskPortalCommunity
@import ZohoDeskPortalCommunity;
ZDPortalCommunity.show()
[ZDPortalCommunity show];
ZDPortalCommunity.showTopic(withID: <#String#>)
[ZDPortalCommunity showTopicWithID:<#NSString#>];
import ZohoDeskPortalLiveChat
@import ZohoDeskPortalLiveChat;
ZDPortalLiveChat.show()
[ZDPortalLiveChat show];
import ZohoDeskPortalAPIKit
@import ZohoDeskPortalAPIKit;
if !ZohoDeskPortalSDK.isUserLoggedIn{ ZohoDeskPortalSDK.login(withUserToken: String) { (isSuccess: Bool) in // isSuccess shows whether the login attempt was successful // any errors will be logged } }else{ // user logged in already }
if (!ZohoDeskPortalSDK.isUserLoggedIn){ [ZohoDeskPortalSDK loginWithUserToken:<#(NSString * _Nonnull)#> onCompletion:^(BOOL isSuccess) { // isSuccess shows whether the login attempt was successful // any errors will be logged }]; }else{ // user logged in already }
ZohoDeskPortalSDK.logout { (isSuccess: Bool ) in // isSuccess shows whether the logout attempt was successful // any errors will be logged }
[ZohoDeskPortalSDK logoutOnCompletion:^(BOOL isSuccess) { // isSuccess shows whether the logout attempt was successful // any errors will be logged }];
ZohoDeskPortalSDK.clearAllLocalData()
[ZohoDeskPortalSDK clearAllLocalData];
import ZDThemeKit
@import ZDThemeKit;
ZDThemeManager.setTheme(type: .white)
[ZDThemeManager setTheme:ZDThemeTypeWhite];
ZDThemeManager.setTheme(type: .dark)
[ZDThemeManager setTheme:ZDThemeTypeDark];
ZDThemeManager.setTheme(type: .system)
[ZDThemeManager setTheme:ZDThemeTypeSystem];
ZDThemeManager.updateTheme(theme: <#ZDThemeProtocol#>)
[ZDThemeManager updateThemeWithTheme:<#ZDThemeProtocol#>];
ZDThemeManager.updateDarkTheme(theme: <#ZDThemeProtocol#>)
[ZDThemeManager updateDarkThemeWithTheme:<#ZDThemeProtocol#>];
ZDPortalConfiguration.customFontName = <#String#>
ZDPortalConfiguration.customFontName = <#NSString#>;
Language | Locale Code |
English (UK) | en-GB |
English (US) | en |
German | de |
Spanish | es |
Catalan | ca-ES |
French | fr |
French (Canada) | fr-CA |
Italian | it |
Russian | ru |
Chinese (Traditional) | zh-Hant |
Chinese (Simplified) | zh-Hans |
Turkish | tr |
Dutch | nl |
Danish | da |
Portuguese (Portugal) | pt-PT |
Japanese | ja |
Swedish | sv |
Polish | pl |
Arabic | ar |
Hebrew | he |
Afrikaans | af |
Czech | cz |
Bulgarian | bg |
Finnish | fi |
Greek | el |
Hungarian | hu |
Indonesian | id |
Norwegian (Bokmal) | nb |
Romanian | ro |
Thai | th |
Ukrainian | uk |
Vietnamese | vi |
Urdu | ur |
Hindi | hi |
Telugu | te |
Kannada | kn |
Tamil | ta |
Marathi | mr |
Korean | ko |
Persian | fa |
Bengali | bn |
Gujarati | gu |
Malay | ms |
Malayalam | ml |
Slovak | sk |
Croatian | hr |
Slovenian | sl |
ZDPortalConfiguration.setSDKLanguage(<#String#>)
[ZDPortalConfiguration setSDKLanguage:<#NSString#>];
Language | Locale Code |
English | en |
German | de |
Spanish | es |
French | fr |
Italian | it |
Russian | ru |
Chinese (Traditional) | zh-Hant |
Chinese (Simplified) | zh-Hans |
Turkish | tr |
Dutch | nl |
Danish | da |
Portuguese (Portugal) | pt-PT |
Japanese | ja |
Key | Default Text | Description |
DeskPortal.Dashboard.Heading | "Welcome" | Text that appears on the help center dashboard |
DeskPortal.Dashboard.helpcenter.title | "Knowledge Base" | Title of the Knowledge Base module icon on the dashboard |
DeskPortal.Dashboard.helpcenter.description | "Browse our extensive repository of help articles" | Text that describes the Knowledge Base |
DeskPortal.Dashboard.community.title | "Community" | Title of the user community module icon on the dashboard |
DeskPortal.Dashboard.community.description | "Find and share solutions with the user community" | Text that describes the user community |
DeskPortal.Dashboard.addticket.title | "Submit Ticket" | Title of the ticket submission module icon on the dashboard |
DeskPortal.Dashboard.addticket.description | "Seek help from our agents" | Text that describes the ticket submission screen |
DeskPortal.Dashboard.myticket.title | "My Tickets" | Title of the my tickets icon on the dashboard |
DeskPortal.Dashboard.myticket.description | "View and manage tickets that you submitted" | Text that describes the my tickets screens |
DeskPortal.Helpcenter.article.detail.relatedtitle | "Related Articles" | Text that appears below any help article in the Knowledge Base |
DeskPortal.Helpcenter.article.detail.vote.description | "Was this article helpful?" | Text that seeks feedback from the user |
DeskPortal.Helpcenter.feedback.title | "Feedback" | Title of the feedback form |
DeskPortal.Helpcenter.feedback.description | "We're sorry the article wasn't helpful." | Text that appears when a user downvotes an article |
DeskPortal.Myticket.option.closeticket | "Close Ticket" | Text for option that lets the user close a ticket they submitted |
DeskPortal.Error.message.reload | "Retry" | Error message that appears if ticket submission fails |
DeskPortal.Network.failed.error.message | "Check your internet connection" | Error message that indicates loss of connectivity |
DeskPortal.Dashboard.livechat.title | "Live Chat" | Title of the live chat module on the help center dashboard |
DeskPortal.Helpcenter.category.subheading | "Section" | Text that appears if only one article category exists in the Knowledge Base |
DeskPortal.Helpcenter.categories.subheading | "Sections" | Text that appears if multiple article categories exist in the Knowledge Base |
DeskPortal.Helpcenter.article.detail.title | "FAQs" | Title of the individual article screen |
DeskPortal.Addticket.title | "Add Ticket" | Title of the ticket submission form |
DeskPortal.Myticket.comment.option.title | "Comment Actions" | Title of the options menu that appears when a user adds a comment to a ticket |
DeskPortal.Myticket.option.editcomment | "Edit Comment" | Text for option that lets the user edit a comment they made |
DeskPortal.Helpcenter.article.subheading | "Article" | Text that appears if only one article exists under an article category |
DeskPortal.Helpcenter.articles.subheading | "Articles" | Text that appears if multiple articles exist under an article category |
func application(_ application: UIApplication,didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) { let token = deviceToken.reduce("", {$0 + String(format: "%02X", $1)}).uppercased() ZohoDeskPortalSDK.enablePushNotification(deviceToken:token, mode: .production) }
- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken{ NSString * token = [[[[deviceToken description] stringByReplacingOccurrencesOfString: @"<" withString: @""] stringByReplacingOccurrencesOfString: @">" withString: @""] stringByReplacingOccurrencesOfString: @" " withString: @""]; [ZohoDeskPortalSDK enablePushNotificationWithDeviceToken:token isTestDevice:NO mode:APNSModeProduction]; }
import ZohoDeskPortalConfiguration ... func application(_ application: UIApplication, didReceiveRemoteNotification userInfo: [AnyHashable : Any]) { ZDPortalConfiguration.processRemoteNotification(userInfo: userInfo) }
@import ZohoDeskPortalConfiguration; ... - (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler{ [ZDPortalConfiguration processRemoteNotificationWithUserInfo:userInfo]; }
import ZohoDeskPortalChat ... ZDPortalChat.setGuestUser(email:<#Guest_User_Email#>, displayName:<#Guest_User_DisplayName#>", phoneNumber: <#Guest_User_PhoneNumber#>")
@import ZohoDeskPortalChat; ... [ZDPortalChat setGuestUserWithEmail:<#Guest_User_Email#>displayName:<#Guest_User_DisplayName#>phoneNumber:<#Guest_User_PhoneNumber#>];
import ZohoDeskPortalAPIKit
@import ZohoDeskPortalAPIKit;
ZohoDeskPortalSDK.getDepartments(onCompletion: { (departments, error) in // on success, departments will return an array, error will return nil // on failure, error will return a value, departments will return nil }
ZohoDeskPortalSDK getDepartmentsOnCompletion:^(NSArray * departments, NSError * error) { // on success, departments will return an array, error will return nil // on failure, error will return a value, departments will return nil }];
ZohoDeskPortalSDK.getProducts(inDepartmentID: String, [String: Any]?) { (products, error) in // on success, products will return an array, error will return nil // on failure, error will return a value, products will return nil }
[ZohoDeskPortalSDK getProductsInDepartmentID:<#NSString#>params:<#NSDictionary#>onCompletion:^(NSArray * products, NSError * error) { // on success, products will return an array, error will return nil // on failure, error will return a value, products will return nil }];
ZohoDeskPortalSDK.Ticket.getFields([String: Any]?) { (fields, error) in // on success, fields will return an array, error will return nil // on failure, error will return a value, products will return nil }
[ZohoDeskPortalSDKTicket getFields:<#(NSDictionary * _Nullable)#>onCompletion:^(NSArray * fields, NSError * error) { // on success, fields will return an array, error will return nil // on failure, error will return a value, fields will return nil }];
ZohoDeskPortalSDK.Ticket.addAttachment(with:<#Data#>, andName:<#String#>, using: <#ZDPUploaderDelegate?#>) { (attachment, error) in // on success, attachment will return a value, error will return nil // on failure, error will return a value, attachment will return nil }
[ZohoDeskPortalSDKTicket addAttachmentWith:<#NSData#>andName:<#NSString#>using:<#(id _Nullable)#>onCompletion:^(ZDPortalAttachment * attachment, NSError * error) { // on success, attachment will return a value, error will return nil // on failure, error will return a value, attachment will return nil }];
if ZohoDeskPortalSDK.isUserLoggedIn { ZohoDeskPortalSDK.Ticket.add(withFields:<#T##[String : Any]#>) { (ticket, error) in // on success, ticket will return an object, error will return nil // on failure, error will return a value, ticket will return nil } } else { ZohoDeskPortalSDK.Ticket.addAsGuest(withFields: <#T##[String : Any]#>) { (ticketNumber, error) in // on success, ticketNumber will return a string value, error will return nil // on failure, error will return a value, ticketNumber will return nil } }
if (ZohoDeskPortalSDK.isUserLoggedIn) { [ZohoDeskPortalSDKTicket addWithFields:<#(NSDictionary * _Nonnull)#>onCompletion:^(ZDPTicket * ticket, NSError * error) { // on success, ticket will return an object, error will return nil // on failure, error will return a value, ticket will return nil }]; }else{ [ZohoDeskPortalSDKTicket addAsGuestWithFields:<#(NSDictionary * _Nonnull)#>onCompletion:^(NSString * ticketNumber, NSError * error) { // on success, ticketNumber will return a string value, error will return nil // on failure, error will return a value, ticketNumber will return nil }] }
ZDPCommunityConfiguration.isTopicEditAllowed = <#Bool#> ZDPCommunityConfiguration.isTopicDeleteAllowed = <#Bool#> ZDPCommunityConfiguration.isReplyAllowed = <#Bool#> ZDPCommunityConfiguration.iReplyEditAllowed = <#Bool#> ZDPCommunityConfiguration.isReplyDeleteAllowed = <#Bool#>
ZDPCommunityConfiguration.isTopicEditAllowed = <#Bool#>; ZDPCommunityConfiguration.isTopicDeleteAllowed = <#Bool#>; ZDPCommunityConfiguration.isReplyAllowed = <#Bool#>; ZDPCommunityConfiguration.iReplyEditAllowed = <#Bool#>; ZDPCommunityConfiguration.isReplyDeleteAllowed = <#Bool#>;
ZohoDeskPortalSDK.Community.getMostPopularTopics(<#[String:Any]?#>) { (result: Result<[ZDPCommunity.TopicDetail], ZDPError>) in // switch on result to get array of topics on success }
[ZohoDeskPortalSDKCommunity getMostPopularTopics:<#(NSDictionary * _Nullable)#>onCompletion:^(NSArray * topics, NSError * error) { // on success, topics will return an array, error will return nil // on failure, error will return a value, topics will return nil }];
ZohoDeskPortalSDK.Community.getMostDiscussedTopics(<#[String:Any]?#>) { (topics, error) in // on success, topics will return an array, error will return nil // on failure, error will return a value, products will return nil }
[ZohoDeskPortalSDKCommunity getMostDisuccedTopics:<#(NSDictionary * _Nullable)#>onCompletion:^(NSArray * topics, NSError * error) { // on success, topics will return an array, error will return nil // on failure, error will return a value, topics will return nil }];
ZDPortalSubmitTicket.setFieldsListTobeShown(fields: <#[ZDVisibleTicketField]#>)
[ZDPortalSubmitTicket setFieldsListTobeShownWithFields:<#(NSArray * _Nonnull)#>];
ZDPortalSubmitTicket.preFillTicketFields(forForms: <#[ZDCustomizedTicketForm]#>)
[ZDPortalSubmitTicket preFillTicketFieldsForForms:<#[ZDCustomizedTicketForm]#>];
ZDPTicketConfiguration.isCommentAllowed = <#Bool#> ZDPTicketConfiguration.isCommentDeleteAllowed = <#Bool#> ZDPTicketConfiguration.isCommentEditAllowed = <#Bool#> ZDPTicketConfiguration.isReplyAllowed = <#Bool#> ZDPTicketConfiguration.isTicketUpdateAllowed = <#Bool#>
ZDPTicketConfiguration.isCommentAllowed = YES;
ZDPTicketConfiguration.isCommentDeleteAllowed = YES;
ZDPTicketConfiguration.isCommentEditAllowed = YES;
ZDPTicketConfiguration.isReplyAllowed = YES;
ZDPTicketConfiguration.isTicketUpdateAllowed = YES;
import ZohoDeskPortalAPIKit ... var body = [String : Any]() body["displayName"] = "displayName" body["mobile"] = "123456" ZohoDeskPortalSDK.updateUserInformation(with: body) { (profile, error) in { // on success only profile will return a value, error will return nil // on failure only error will return a value, profile will return nil }
NSMutableDictionary * body = [NSMutableDictionary new]; [body setObject:@"displayName" forKey:@"displayName"]; [body setObject:@"123456" forKey:@"mobile"]; [ZohoDeskPortalSDK updateUserInformationWith:body onCompletion:^(Profile * profile, NSError * error) { // on success only profile will return a value, error will return nil // on failure only error will return a value, profile will return nil }];
import ZohoDeskPortalAPIKit ... ZohoDeskPortalSDK.disableLogs()
@import ZohoDeskPortalAPIKit;
...
[ZohoDeskPortalKit disableLogs]
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.
Write to us: support@zohoforms.com
Quick Links |
Workflow Automation |
Data Collection |
|
||
Form Templates |
||
|
||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|