Jump to: navigation, search

Interactions On E-mail Channel

file:important.png Pre-Release Notice: The information contained on this page is not considered final and is managed under the terms and conditions found in the Pre-release Agreement. This page provides the most up-to-date reference information available for this pre-release version and is restricted for use by those who have signed the Pre-release Agreement with Genesys to acquire an early version of the software.


Operations

The following operations are available on me/interactions/{interaction_id}:

Operation Name HTTP Operation Description Type Permissions
Accept POST This operation can be performed after a new interaction notification arrives. Accepting an interaction allows Agents to start working on it. E-mail Specific Agent
Reject POST This operation can be performed after a new interaction notification arrives. Rejecting an interaction allows an Agent the opportunity to work on a different one. General Interaction Agent
Reply POST This operation can be performed after a new e-mail interaction has been accepted. E-mail Specific Agent
ReplyAll POST This operation can be performed after a new e-mail interaction has been accepted. E-mail Specific Agent
Forward POST This operation can be performed after a new e-mail interaction has been accepted. E-mail Specific Agent
CancelReply POST This operation can be performed to cancel an outbound e-mail. E-mail Specific Agent
Send POST This operation can be performed to send an outbound e-mail. E-mail Specific Agent
Transfer POST This operation can be performed while working on an interaction. The interaction can be transferred to another agent or to a group of agents associated with a skill. General Interaction Agent
StopProcessing POST This operation can be performed after an agent has finished working on an interaction. General Interaction Agent
PlaceInQueue POST This operation can be performed on an interaction to continue processing by another process. General Interaction Agent

Accept

This operation can be performed after a new Interaction invitation notification arrives. It is essentially one of two options an agent (User) has regarding an Interaction invitation: accepting it or rejecting it. Choosing this action will associate the Interaction to the agent. This association or "ownership" will continue until that agent performs a Complete, Transfer, or Re-direct action on the aforementioned Interaction. A successful request will result in an empty http-200 response. The true response will arrive on the cometd topic (channel) /me/interactions/

Please refer to E-mail Accepted for details on the actual response.

HTTP Request

POST on /me/interaction/{id}

{
"operationName":"Accept"
}

HTTP Response

Success

{
"status":"ok"
}

Failed

{
"status":"error",
"errorDescription":details
}

Cometd Response

{
"messageTypeName":"InteractionStateMessage",
"id":alpha-numeric-string,
"channel":"email",
"email_object" {
“ToAddress”:to-address,
“FromAddress”:from-address,
“CCAddresses”:cc-addresses,
"Subject":subject-of-the-email-in-string-representation,
"Text":text-of-email-as-text,
"StructuredText":text-of-email-formatted,
"MimeType":mime-type-of-text,
"StructuredTextMimeType":mime-type-of-structuredtext,
"TheComment":notes-on-interaction,
"ContactID":contactid-mapped-to-sender,
"attachments":[{
              "id":attachmentId,
              "name":attachment-name,
              "size":attachment-size,
              "mimetype":attachment-mime-type
             },
             ...
            ]
},
"interactionType":"Email",
"interactionSubType:"InboundNew",
"userData":complete-map-of-user-data-excluding-binary-values
"currentQueue":value-of-attr_itx_queue,
"inQueues":value-of-attr_in_queues,
"outQueues":value-of-attr_out_queues,
"receivedAt:value-of-attr_itx_received_at
"state":"Accepted",
"capabilities":[“Transfer”,“Reply”,“ReplyAll”,“StopProcessing”,“PlaceInQueue”,“PlaceInWorkbin”,“UpdateProperties”]
}

Reply

This operation can be performed after an agent (User) has Accepted an e-mail interaction. A Reply operation creates an interaction in Interaction Server and Universal Contact Server (UCS). The operation is asynchronous, meaning that cometD notification will be sent upon successful completion of the operation (see E-mail Reply Created). The newly-created interaction will have:

  • ToAddress equal to ReplyToAddress-from-original-email
  • FromnAddress equal to ToAddress-from-original-Email
  • Subject equal to subjectPrefix+original-email-subject
  • The body will be empty unless quoteOriginal is set to true and will be pre-pended by replyToStartLine and modified with indentCharacter, if present

HTTP Request

POST on /me/interactions/{id}

{
"operationName":"Reply",
"subjectPrefix":prefix-to-add-to-copy-of-subject-from-inbound-email (optional),
"replyToStartLine":line-to-add-before-quoting-original-text (optional),
"indentCharacter":indent-character-to-add-before-each-newline-of-original-text (optional),
"quoteOriginal":boolean-to-tell-whether-to-add-original-text 
"queueName":name-of-the-queue-where-to-place-interaction-while-agent-is-composing-it
}

HTTP Response

Success

{
"status":"ok"
}

Failed

{
"status":"error",
"errorDescription":details
}

Cometd Response

{
"messageTypeName":"InteractionStateMessage",
"id":alpha-numeric-string,
"channel":"email",
"email_object" {
“ToAddress”:to-address,
“FromAddress”:from-address,
“CCAddresses”:cc-addresses,
"Subject":subject-of-the-email-in-string-representation,
"Text":text-of-email-as-text,
"StructuredText":text-of-email-formatted,
"MimeType":mime-type-of-text,
"StructuredTextMimeType":mime-type-of-structuredtext,
},
"interactionType":"Email",
"interactionSubType:"OutboundReply",
"receivedAt:value-of-attr_itx_received_at
"state":"ReplyCreated",
"capabilities":[“Cancel”,“Send”,“PlaceInWorkbin”,“UpdateProperties”,"LinkAttachment"]
}

ReplyAll

This operation can be performed after an agent (User) has accepted an e-mail interaction. The ReplyAll operation creates an interaction in Interaction Server and UCS. The operation is asynchronous, meaning that cometD notification will be sent upon successful completion of operation (see E-mail Reply Created). The newly-created e-mail interaction will have:

  • ToAddress equal to ReplyToAddress-from-original-email
  • CCAddresses equal to CCAddresses-from-original-email
  • FromAddress equal to ToAddress-from-original-Email
  • Subject equal to subjectPrefix+original-email-subject
  • The body will be empty unless quoteOriginal is set to true and will be pre-pended by replyToStartLine and modified with indentCharacter, if present

HTTP Request

POST on /me/interactions/{id}

{
"operationName":"ReplyAll",
"subjectPrefix":prefix-to-add-to-copy-of-subject-from-inbound-email (optional),
"replyToStartLine":line-to-add-before-quoting-original-text (optional),
"indentCharacter":indent-character-to-add-before-each-newline-of-original-text (optional),
"quoteOriginal":boolean-to-tell-whether-to-add-original-text -- default is true
"queueName":name-of-the-queue-where-to-place-interaction-while-agent-is-composing-it
}

HTTP Response

Success

{
"status":"ok",
"replyInteractionId":interactionId
}

Failed

{
"status":"error",
"errorDescription":details
}

Cometd Response

{
"messageTypeName":"InteractionStateMessage",
"id":alpha-numeric-string,
"channel":"email",
"email_object" {
“ToAddress”:to-address,
“FromAddress”:from-address,
“CCAddresses”:cc-addresses,
"Subject":subject-of-the-email-in-string-representation,
"Text":text-of-email-as-text,
"StructuredText":text-of-email-formatted,
"MimeType":mime-type-of-text,
"StructuredTextMimeType":mime-type-of-structuredtext,
},
"interactionType":"Email",
"interactionSubType:"OutboundReply",
"receivedAt:value-of-attr_itx_received_at
"state":"ReplyCreated",
"capabilities":[“Cancel”,“Send”,“PlaceInWorkbin”,“UpdateProperties”,"LinkAttachment"]
}

Forward

This operation can be performed after an agent (User) has Accepted an e-mail interaction. The only difference between the Forward action and the Reply action is that Forward sends an e-mail to an e-mail address that is provided by an Agent. This should not be confused with the Transfer operation, where the owner of the interaction changes.

HTTP Request

POST on /me/interaction/{id}

{
"operationName":"Forward"
}

HTTP Response

Success

{
"status":"ok",
"replyInteractionId":interactionId
}

Failed

{
"status":"error",
"errorDescription":details
}

Send

This operation is used to send the contents of the e-mail that an agent has created.

HTTP Request

POST on /me/interactions/{id}

{
"operationName":"Send",
"queueName":queue-name-to-place-interaction-in,
"email_object": {
 "toAddress":to-address,
 "subject":email-subject,
 "text":text-of-email,
 "fromAddress":from-address,
 "ccAddress":cc-addresses, //optional
 "bccAddress":bcc-addresses //optional
}
}

HTTP Response

Success

{
"status":"ok"
}

Failed

{
"status":"error",
"errorDescription":details
}

CancelReplyEmail

This operation can be performed after a client successfully completes a create reply or reply all operation. This is typically called after an agent is finished writing the contents of the reply e-mail.

HTTP Request

POST on /me/interactions/{id}

{
"operationName":"CancelReplyEmail"
}

HTTP Response

Success

{
"status":"ok"
}

Failed

{
"status":"error",
"errorDescription":details
}

CreateEmail

This operation can be performed to create a new interaction of type email. The new interaction will come to the agent via the cometD notification described in E-mail Reply Created.

HTTP Request

POST on /me/interactions/

{
"operationName":"CreateEmail",
"queueName":name-of-queue-where to store the interaction,
"interactionType":type of the interaction to be created (e.g. Outbound),
"interactionSubType":subtype of the interaction to be crated (e.g. OutboundNew)
}

HTTP Response

Success

{
"status":"ok"
} 

Failed

{
"status":"error",
"errorDescription":details
}

See also:

This page was last edited on November 13, 2013, at 14:58.
Comments or questions about this documentation? Contact us for support!