EmailTranscriptAPI
The purpose of the EmailTranscriptAPI is to allow the customer to receive a transcript of their conversation via email.
You should not directly instantiate the EmailTranscriptAPI class. Instead use the following EmailTranscriptBuilder builder class.
Using the Email Transcript Builder
Create a Builder instance by calling the EmailTranscriptAPI.builder()
Public Methods
You can use the following builder public methods to setup the parameters needed to send the request to the Nuance Messaging System. The emailAddress API public methods must be called before you call the Builder instance build method.
To create an EmailTranscriptAPI object, you must invoke the Builder instance build method.
-
public EmailTranscriptBuilder emailAddress(String emailAddress)
Email address where the Nuance Messaging System sends the email.
-
public EmailTranscriptBuilder customerName(String custName)
Name of the customer used to identify the customer in the transcript. If a customer name is not specified the default == "You".
-
public EmailTranscriptBuilder emailSpecID(String emailSpec)
The email specification ID defines the template used for the email.
-
public EmailTranscriptBuilder setSuccessListener(OnSuccessListener<Response> sListener)
The OnSuccessListener.onResponse method is invoked upon a successfull request.
-
public EmailTranscriptBuilder setErrorListener(OnErrorListener fListener)
The OnErrorListener.onErrorResponse method is invoked if there is an error in the request.
-
public EmailTranscriptAPI build()
Instantiates and returns the EmailTranscriptAPI instance.
Email Transcrip tAPI
Public Methods
-
public void sendTranscriptByEmail()
Initiates sending the email to the customer once the conversation is over.
-
public static EmailAddress builder()
Instantiate and returns the EmailTranscriptBuilder object.
Response
An instance of the response class is passed as an argument to the OnErrorListener.onErrorResponse or OnSuccessListener.onResponse methods based on the status of the request.
Public Methods
-
public int getStatusCode()
getStatusCode method returns following values which denotes the status of this request.
200: Request was accepted by server
400: Request has incorrect parameters.
403: The user does not have sufficient privileges to use the API or to access the requested site.
500: Server error.
EmailTranscriptAPI emailTranscriptApi = EmailTranscriptAPI.builder().emailAddress("testaccount@gmail.com").build();
emailTranscriptApi.sendTranscriptByEmail();