Bold360 and BoldChat Developer Center

<BCChatSession> Protocol Reference

The main class protocol that is used to interact with an active chat session. More...

#import <BCChatSession.h>

Inheritance diagram for <BCChatSession>:

Instance Methods

(void) - finishChatSession
 Stop and finish of the current session. It can be called any time to cancel and close the session. There are no calls on the delegate after this call. More...
 
(void) - suspend
 Suspends the current session. It needs to be called when the application goes to background. More...
 
(void) - resume
 Resumes the suspended session. It needs to be called if the application resumes from background state. More...
 
(id< BCCancelable >) - submitUnavailableEmail:delegate:
 Submit the answers for the unavailable chat form. More...
 
(id< BCCancelable >) - submitPreChat:andStartChatWithDelegate:
 Submit the answers for the pre chat form. More...
 
(id< BCCancelable >) - submitPostChat:delegate:
 Submit the answers for the post chat form. More...
 
(id< BCCancelable >) - emailChatHistory:delegate:
 Requests to send the transcript of the chat the given email address, when the chat ended. More...
 
(id< BCCancelable >) - changeLanguage:delegate:
 Request to change the current language. It changes the value of the brandings dictionary when finished and successful. More...
 

Properties

id< BCChatRecaptureDelegatechatRecaptureDelegate
 While the user fills the unavailable chat form, an operator can become active. This delegate is used to be notifed on this event. More...
 
NSString * language
 Current language string. More...
 
NSString * departmentId
 The Department ID. More...
 
NSString * chatKey
 The chat key of the current chat session. It gets a valid value, when the chat is created. More...
 
BCPersonvisitor
 The person object of the current visitor. It is autogenerated with the visitorId given on creation. More...
 
BOOL recaptureAvailable
 If the visitor was shown the unavailable chat form, this value shows if an operator became available meanwhile. More...
 
BCChatEndReason endReason
 The end reason of the chat if the chat ended. More...
 
BCUnavailableReason unavailableReason
 If the chat is unavailable, this value shows the cause of unavailability. More...
 
NSString * unavailableMessage
 If the chat is unavailable it has the textural description of unavailability. More...
 
BCFormpreChatForm
 The pre-chat form for the current chat session. It is filled on chat creation if there is pre-chat defined for the chat. More...
 
BCFormpostChatForm
 The post chat form for the current chat session. It is filled after the chat ended. More...
 
BCFormunavailableForm
 The unavailable chat form. It is filled only when it is needed to be displayed. More...
 
id< BCChatchat
 The chat instance for sending and receiving chat messages. It is set only when the chat is available. More...
 
NSDictionary * branding
 A dictionary that contains the localized strings for the current set language. More...
 

Detailed Description

The main class protocol that is used to interact with an active chat session.

The chat session is for performing the actual chat session. It is created by BCAccount through calling BCAccount::createChatSessionWithDelegate:language: and BCAccount::createChatSessionWithDelegate:language:visitorId:skipPreChat:externalParams:. The working chat session is returned through BCCreateChatSessionDelegate callbacks.

It holds the pre, post and unavailable chat forms, and has an interface for their submissions. Moreover it has calls for requesting chat transcript in email and change language. There is also a delegate for chat recovery.

Since
Version 1.0

Method Documentation

- (id<BCCancelable>) changeLanguage: (NSString *)  languageString
delegate: (id< BCChangeLanguageDelegate >)  changeLanguageDelegate 

Request to change the current language. It changes the value of the brandings dictionary when finished and successful.

Parameters
languageStringThe language string. This parameter must be an ISO 639-1 language code optionally followed by a dash then an ISO 3166-1 country code (en-US). If a language code is passed that is not recognized or supported en-US strings will be returned instead.
changeLanguageDelegateThe delegate to call back the result.
Returns
BCCancelable to be able to cancel the request.
Since
Version 1.0
- (id<BCCancelable>) emailChatHistory: (NSString *)  emailAddress
delegate: (id< BCEmailChatHistoryDelegate >)  emailChatHistoryDelegate 

Requests to send the transcript of the chat the given email address, when the chat ended.

Parameters
emailAddressThe email address to send the transcript to.
emailChatHistoryDelegateThe delegate to call back the result.
Returns
BCCancelable to be able to cancel the request.
Since
Version 1.0
- (void) finishChatSession

Stop and finish of the current session. It can be called any time to cancel and close the session. There are no calls on the delegate after this call.

Since
Version 1.0
- (void) resume

Resumes the suspended session. It needs to be called if the application resumes from background state.

Since
Version 1.0
- (id<BCCancelable>) submitPostChat: (BCForm *)  postChatForm
delegate: (id< BCSubmitPostChatDelegate >)  submitPostChatDelegate 

Submit the answers for the post chat form.

Parameters
postChatFormThe form with the answers.
submitPostChatDelegateThe delegate to call back the result.
Returns
BCCancelable to be able to cancel the request.
Since
Version 1.0
- (id<BCCancelable>) submitPreChat: (BCForm *)  preChatForm
andStartChatWithDelegate: (id< BCSubmitPreChatDelegate >)  submitPreChatDelegate 

Submit the answers for the pre chat form.

Parameters
preChatFormThe form with the answers.
submitPreChatDelegateThe delegate to call back the result.
Returns
BCCancelable to be able to cancel the request.
Since
Version 1.0
- (id<BCCancelable>) submitUnavailableEmail: (BCForm *)  unavailableForm
delegate: (id< BCSubmitUnavailableEmailDelegate >)  submitUnavailableEmailDelegate 

Submit the answers for the unavailable chat form.

Parameters
unavailableFormThe form with the answers.
submitUnavailableEmailDelegateThe delegate to call back the result.
Returns
BCCancelable to be able to cancel the request.
Since
Version 1.0
- (void) suspend

Suspends the current session. It needs to be called when the application goes to background.

Since
Version 1.0

Property Documentation

- (NSDictionary*) branding
readnonatomiccopy

A dictionary that contains the localized strings for the current set language.

Since
Version 1.0
- (id<BCChat>) chat
readnonatomicassign

The chat instance for sending and receiving chat messages. It is set only when the chat is available.

Since
Version 1.0
- (NSString*) chatKey
readnonatomiccopy

The chat key of the current chat session. It gets a valid value, when the chat is created.

Since
Version 1.0
- (id<BCChatRecaptureDelegate>) chatRecaptureDelegate
readwritenonatomicassign

While the user fills the unavailable chat form, an operator can become active. This delegate is used to be notifed on this event.

Since
Version 1.0
- (NSString*) departmentId
readnonatomiccopy

The Department ID.

Since
Version 1.0
- (BCChatEndReason) endReason
readnonatomicassign

The end reason of the chat if the chat ended.

Since
Version 1.0
- (NSString*) language
readnonatomiccopy

Current language string.

It is an ISO 639-1 language code optionally followed by a dash then an ISO 3166-1 country code (en-US). If not set, the application's current language is going to be set.

Since
Version 1.0
- (BCForm*) postChatForm
readnonatomicassign

The post chat form for the current chat session. It is filled after the chat ended.

Since
Version 1.0
- (BCForm*) preChatForm
readnonatomicassign

The pre-chat form for the current chat session. It is filled on chat creation if there is pre-chat defined for the chat.

Since
Version 1.0
- (BOOL) recaptureAvailable
readnonatomicassign

If the visitor was shown the unavailable chat form, this value shows if an operator became available meanwhile.

Since
Version 1.0
- (BCForm*) unavailableForm
readnonatomicassign

The unavailable chat form. It is filled only when it is needed to be displayed.

Since
Version 1.0
- (NSString*) unavailableMessage
readnonatomicassign

If the chat is unavailable it has the textural description of unavailability.

Since
Version 1.0
- (BCUnavailableReason) unavailableReason
readnonatomicassign

If the chat is unavailable, this value shows the cause of unavailability.

Since
Version 1.0
- (BCPerson*) visitor
readnonatomicstrong

The person object of the current visitor. It is autogenerated with the visitorId given on creation.

Since
Version 1.0

The documentation for this protocol was generated from the following file: