MINTEL_LiveChat
Example
To run the example project, clone the repo, and run pod install from the Example directory first.
Requirements
Installation
MINTEL_LiveChat is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'MINTEL_LiveChat'Author
[email protected], [email protected]
License
MINTEL_LiveChat is available under the MIT license. See the LICENSE file for more info.
How To Use
- I suggest you to new instance of MINTEL_LiveChat in Appdelegate to make sure that it has only one instance at a time.
- When you want to startChat please call. startChat(config) method
- config :
internal var webHookBaseUrl:String! --> ChatBot Url
internal var uploadBaseUrl:String! --> Upload Url
internal var xApikey:String! --> Chatbot API Key
internal var userName:String! --> User's name
internal var salesforceLiveAgentPod:String! --> sale force live agent pod config
internal var salesforceOrdID:String! --> sale force ord id config
internal var salesforceDeployID:String! --> sale force deploy id
internal var salesforceButtonID:String! --> sale force button id
internal var surveyChatbotUrl:String? --> survey chat bot url (optional)
internal var surveyFormUrl:String? --> survey form url (optional)
internal var announcementUrl:String? --> chatbot announcement url
internal var firstname:String! --> firstname of saleforce chat entity
internal var lastname:String! --> lastname of saleforce chat entity
internal var email:String! --> email of saleforce chat entity
internal var phone:String! --> phone of saleforce chat entity
internal var tmnId:String! --> tmnid of saleforce chat entity
internal var salesforceFirst:Bool = false --> if you want go to saleforce immediately (default is chatbot)- you can stop the Chat , please call stopChat()
- you can hide the Chat , please call hideChat() (chat log is not cleared)
- you can check SessionActive by call isSessionActive()
- please call applicationDidEnterBackground() in AppDelgate applicationDidEnterBackground function
- please call applicationWillEnterForeground() in AppDelegate applicationWillEnterForeground function
- please call userNotificationCenter( willPresent) in UNUserNotificationCenterDelegate.userNotificationCenter(_ center: UNUserNotificationCenter, willPresent notification: UNNotification, withCompletionHandler completionHandler: @escaping (UNNotificationPresentationOptions) -> Void)