There are two ways to register a user -
- Guest
- Custom Client Sign Up
For you to take the user to the conversation screen where the user interacts/chats with the bot/agent, you need to provide user details to SDK
Guest: SDK creates a new user, without any specific details
Custom: For cases when the client/parent application already has a signup flow in place and wants to link the same user to the SDK, we support Custom Signups.
Guest Conversation
do {
try HPKit.sharedSDK.loadGuestConversation(launchController: self, customData: nil)
} catch {
print("Haptik Error : \(error)")
}Custom Client Signup
let authAttribute = HPAttributesBuilder.build { (builder) in
builder.authCode = "your_auth_code"
builder.authID = "your_auth_id"
builder.userName = "user_name"
builder.email = "abcd@gmail.com"
builder.mobile = "9876543210"
builder.signupType = "your_signup_type"
}
do {
try HPKit.sharedSDK.loadConversation(launchController: self, attributes: authAttribute, customData: nil)
} catch {
print(error)
}