Type Method

openTranscript(businessIdentifier:intentParameters:)

Tells Business Chat to start a chat.

Declaration

class func openTranscript(businessIdentifier: String, intentParameters: [BCChatAction.Parameter : String])

Parameters

businessIdentifier

A UUID string that identifies the business. The registering agent for your business receives the business identifier after registering for Business Chat. See Registering for Business Chat for more information.

intentParameters

A set of parameters to associate with the chat session.

Discussion

Call this method to launch Messages and start a chat. To set the initial text of the message, include body in intentParameters.

let parameters: [BCChatAction.Parameter:String] = [
    .intent:"order_credit_card",
    .group:"credit_card_department",
    .body:"I need to order an additional credit card."
]
// Replace the businessIdentifier value with your business ID.
BCChatAction.openTranscript(businessIdentifier: "8d7f4b79-bf77-45ab-86b5-b74f56d47737", intentParameters: parameters)

See Also

Opening a Chat Session

struct BCChatAction.Parameter

Parameter names to use when starting a chat.

About Intent, Group, and Body Values

Prioritize and route messages by defining intent, group, and body values.