Email Transcript API
The Email Transcript API allows a messaging customer to receive a transcript of their conversation content via email.
You should not directly instantiate EmailTranscriptAPI class. Instead use init method with a block parameter, which returns an instance of EmailTranscriptAPI class.
EmailTranscriptBuilder
Builder instance is passed as an argument to the above init block. Use the builder instance to setup the parameter need to make this request.
Public Properties
You can use the following builder public properties to setup the parameters need to send this request to Nuance Messaging System.
Finally invoke EmailTranscriptAPI emailTranscript method to get a copy of trascript in email.
-
NSString *emailAddress
Email address where Nuance Messaging System sends the email.
-
NSString *customerName
Name of the customer to identify customer in the transcript. Default = "You" if a customer name is not specified.
-
NSString *emailSpecID
The email specification ID defines the template uses for this email.
EmailTranscriptAPI
Public Methods
-
-(void) emailTranscript:(void (^) (Response *success, Resposne *error))completionBlock
Initiate sending email to customer once the conversation is over. This method raises an exception if status of the current engagement is neither created or nor queued.
Response
Either success or error parameter of completionBlock receives an instance of this class based on the status of this request.
Public Properties
-
NSString* getStatusCode
statusCode property has one of following values which denotes the status of this request.
200: Request was accepted by server
400: Request has incorrect parameters.
403: User hasn't privileges to use api or to see requested site.
500: Server error.
let email = EmailTranscriptAPI.init(block:{ (builder) in
builder?.customerName = "your email address";
builder?.customerAddress = "mithunjohny@gmail.com";
});
email?.emailTranscript({ (success, error) in
if(error != nil) {
} else {
})