I have added the Zendesk iOS Answerbot SDK to an app and I would like to:
- Customize the initial messages
- Direct the user to a different view when the "Leave a message" button is tapped
This is the code I have so far:
do {
let messagingConfiguration = MessagingConfiguration()
let answerBotEngine = try AnswerBotEngine.engine()
let supportEngine = try SupportEngine.engine()
let viewController = try Messaging.instance.buildUI(engines: [answerBotEngine, supportEngine], configs: [messagingConfiguration])
let button = UIBarButtonItem(title: "Close", style: .plain, target: self, action: #selector(dismissView))
viewController.navigationItem.leftBarButtonItem = button
let helpController = UINavigationController(rootViewController: viewController)
self.present(helpController, animated: true, completion: nil)
} catch {
print(error)
}
This is what the default UI looks like:
Zendesk AnswerBot for iOS documentation: https://developer.zendesk.com/documentation/classic-web-widget-sdks/unified-sdk/ios/answer_bot_engine/
It looks like the customization options are limited based on this documentation: https://developer.zendesk.com/documentation/classic-web-widget-sdks/unified-sdk/ios/customizing_the_look/
You can name the bot like below, but not finding examples of much else.
let messagingConfiguration = MessagingConfiguration()
messagingConfiguration.name = "Bot Name"
It seems like you can use the API and build your own UI, but I was wondering if my questions are possible in the default SDK.
Regarding your first question, you can in fact override any string that Zendesk provides by doing the following:
Reference
For example, you can override the SupportSDK greeting message by just adding this to your localizable file:
But if you support more than one language you should override in all localizable files.
Take a look at the massive list of all of the localizable strings you can override.
Regarding your second question, as far as I know, every logic inside the Zendesk chat does not allow extra configuration to show other views. Since you can't override the click of
Leave a Message
since you can't access that component from your app.I hope I could help in your case, have a great week.