UnbluConversationInterceptorWithRecipient
protocol UnbluConversationInterceptorWithRecipient : UnbluConversationInterceptor
A protocol that defines an object that can intercept certain conversation related events. This protocol should be used when it is necessary to obtain additional information about the recipient.
-
Called when a new conversation is preparing. It enables you to intercept custom visitorData and mutate it before the conversation is created.
Declaration
Swift
func conversationIsPreparing(withType conversationType: ConversationType, customVisitorData: String?, conversationRecipient: ConversationRecipient?, onComplete: @escaping (String?, ConversationRecipient?) -> Void)
Parameters
customVisitorData
Custom “visitorData” (String) that was included when an instruction was received to start a new conversation (optional). This custom string is used to add additional information to the Visitor when integrating it with a bot or other external systems.
conversationRecipient
Optional recipient
onComplete
The callback to call with the custom visitorData you want to pass back to Unblu. This must be called.