From Bright Pattern Documentation
Jump to: navigation, search
• 5.19 • 5.8

Passing Emails and Email Updates to an External Location

If your contact center saves email interactions and email metadata to an external location (e.g., a CRM integration), it is now possible to pass all customer email and agent replies to your external location via a workflow using CRM email object fields.

The following tutorial describes how to:

  • Search the Bright Pattern internal database for an interaction’s activity history and return any associated email ID.
    • If an email ID for the interaction is returned, it will be passed to a configured user via an internal message.
    • If an email ID for the interaction is not returned, the system will continue to search through any other activity history items for a match. If no match is located, the workflow will exit.
  • Create an appropriate workflow entry

Prerequisites

This example workflow requires you to:

Example Workflow

Click the following link to download an annotated version of this workflow example.

Media:Workflow_Passing_Emails_and_Email_Updates_to_an_External_Location.zip

As a reminder, this workflow is an example for testing purposes only and is NOT intended for production use.

Procedure

1. Locate the interaction in the Bright Pattern database

The first block in the workflow will be the Bright Pattern Search Object block, which we will use to search for an activity history object in the internal database.

The object will be a case ID value that matches the $(item.caseID) variable of the interaction. The variable is the internal UUID string used to identify the case.

If a match is located, we want the block to return the email object’s ID field (i.e., email_id); the results will be passed to the remaining workflow blocks via the recordset name rs_ah.

This Bright Pattern Search Object block is configured as follows:

  • Object type: Activity history
  • Search: Case ID Equal $(item.caseId)
  • Return fields: email_id
  • Recordset name: rs_ah


CRM-Workflow-1-july2021.PNG


2. Check the search results

Next, we use an If block to check if anything was returned in the Bright Pattern Search Object block’s recordset name (i.e., rs_ah). Because we are specifically looking to see if anything was returned from the email_id field, we will append the field name to the end of the recordset name (i.e., rs_ah.email_id).

To perform this check, we will need to add two branches that are configured as follows:

  • Exit label: "If email found"
  • Condition:
    • Workflow variable (string)
      • rs_ah.email_id
      • Is not
      • Is empty
  • Exit label: "If email not found"
    • Condition:
    • Workflow variable (string)
      • rs_ah.email_id
      • Is
      • Is empty


CRM-Workflow-2-july2021.PNG


2a. If the email is found, send the desired fields to an agent

If an email ID for the interaction is returned, it will be passed to the configured user in an internal message. To do this, we will add a Bright Pattern Search Object block to the "If email found" branch, followed by the Internal Message block.

For this Bright Pattern Search Object block, we will configure it to look for an email object that matches the results of the previous Bright Pattern Search Object block (i.e., rs_ah.email_id). The results will be passed to the remaining workflow blocks via the recordset name email_rs.

This Bright Pattern Search Object block is configured as follows:

  • Object type: Email
  • Search: Email ID Equal $(rs_ah.email_id)
  • Return fields: N/A
  • Recordset name: email_rs


CRM-Workflow-3-july2021.PNG


Next, in the Internal Message block, we configure the message field to display the value of the variable email_rs (i.e., $(email_rs)). If the defined field was populated, the message will contain a JSON object with the field’s contents, which should be the email ID.

Note: If your contact center saves email data to a CRM integration, instead of using the Internal Message block, you would use the appropriate CRM workflow block, for example: Microsoft Dynamics Update Object RightNow Update Object [Workflow-builder-reference-guide/Salesforce.comUpdate|Salesforce.com Update]] Zendesk Update Object


CRM-Workflow-4-july2021.PNG


2b. If the email is not found, search through the interaction again

If an email ID for the interaction is not returned, we will configure the system to continue searching through the interaction’s remaining activity history items for a match.

This will be accomplished by adding the Get Next Record block to the "If email not found" branch, followed by a Goto block that redirects back to the If block.

The Get Next Record block will be configured as follows:

  • Direction: Next record
  • Recordset name: rs_ah


CRM-Workflow-5-july2021.PNG


If all records are searched and no match is located, the workflow will take the No more items conditional exit. Here, we add an Exit block to end the workflow.


CRM-Workflow-6-july2021.PNG


3. Add a Workflow Entry to your Workflow

When you are finished configuring your workflow, you will need to create a workflow entry; this associates the workflow with your configured email service. Workflow entries are configured in the Contact Center Administrator application, section Workflow.

If you want to trigger the workflow to execute when the interaction is completed with any disposition, do the following:

  • Select the service from the drop-down menu
  • Triggers: Agent completes interaction with any disposition


CRM-Workflow-7-july2021.PNG
< Previous | Next >