Setting up Categories for Email in the Campaign workflow

Setting up Categories for Email in the Campaign workflow

Overview

Setting up variables and transitions for routing Email workitems by category

Categories use AI to route text based work items to the correct location. In order to use Categories to route workitems you need to first set up Categories and Category Summaries. (See article Category and Category Summary).

After Category and Category summaries have been created and trained, the next step is to set up workitem routing based on the Categories.

Adding a variable

  • Navigate to the Campaign you wish to add routing by category
  • Scroll Down to the workflow
  • Edit the Begin State
  • From the components bar on the right drag and drop a save variable action
  • The save variable should be added before any workitem routing decisions are made in the workflow
  • The save variable action will be used to identify the text the system should analyze for categorization.
  • For simplicity of this example set the condition type to none
  • Expression for an Email workitem enter workitem.email.subject
    in the expression field, this tells the system to capture the text in the email.
  • Variable

You can name the variable whatever you want but make sure not to include spaces or special character. The variable will now contain the text that was contained in the expression. In this example let us call the variable EmailSubject

Adding Email Content

Email Content is used to capture the text located in the body of an email so that you can save it as a variable.

  • From the components bar on the right drag and drop the email content action
  • Variable Name

You can name the variable name whatever you want but make sure not to include spaces or special character. The variable will now contain the text in the body of the email. In this example let us call the variable emailContent

Adding a Predict Category

  • From the components bar on the right drag and drop a Predict Category action
  • The Predict Category action should be added after the save variable and Email Content actions
  • For simplicity of this example set the condition type to none
Set Workitem Category toggle
  • If you enable Set Workitem Category (toggle to the right) all workitems that are categorized by the system will automatically be added to the examples that will be used for training the next time you train the Category Summary
  • If you disable Set Workitem Category(toggle to the left) The system will only add examples that are manually set by a user that is handling workitems to be used for training the next time you train the Category Summary
  • In the Content field enter workitem.data.EmailSubject + workitem.data.emailContent
    (workitem.data.variable + workitem.data.variableName)
    the system will be analyzing both the subject + the body of the email to predict a category
  • In the Category Summary select the file icon to the right of Category Summary. A pop up window will open with the list of Category Summaries you have previously created. Choose one and select OK

Adding Transitions

  • In order to route work items based on Category Predicitions you need to set up transitions.
  • The transitions will be executed in the order they appear starting from top to bottom
  • In order for the transitions to route based on category prediction set the condition type to And
  • for the first transition under expression enter

workitem.predictionResult.status != 200

This will allow you to route the workitem to another state if for any reason the system was unable to execute a category prediction

  • In the State field select the state where you would like the workitem to route by choosing a state you have previously created from the drop down list.
  • For the second transition create a transition that routes to a state in case the AI predict category confidence level is below a threshold that you feel comfortable with:

For example you may only want workitems to route based on category if the predict category confidence level is greater than 75%.

In this case

set Condition type to And

under expression enter

workitem.predictionResult.confidence <=75

  • In the State field select the state where you would like the workitem to route by choosing a state you have previously created from the drop down list.
  • Add transitions for each Category that exists in the Category summary you have chosen in the Predict Category action

for example: if Spam is one of the Categories

under Condition type select AND

In the expression field enter

workitem.predictionResult.label == ‘Spam’

  • In the State field select the state where you would like the workitem to route when the prediction result is Spam, by choosing a state you have previously created from the drop down list.
  • Make sure you add a transition for each category that exists in the Category summary
  • Best practice would be to create 1 more transition at the end of the workflow with a condition of None. This is done in case one of categories that exist in the Category Summary is accidentally forgotten or deleted.
  • In the State field select the state where you would like the workitem to route when the prediction result does not match any of the preceding transitions, by choosing a state you have previously created from the drop down list.

Click Here to Download Linked File

What’s a Rich Text element?

The rich text element allows you to create and format headings, paragraphs, blockquotes, images, and video all in one place instead of having to add and format them individually. Just double-click and easily create content.

Static and dynamic content editing

A rich text element can be used with static or dynamic content. For static content, just drop it into any page and begin editing. For dynamic content, add a rich text field to any collection and then connect a rich text element to that field in the settings panel. Voila!

How to customize formatting for each rich text

Headings, paragraphs, blockquotes, figures, images, and figure captions can all be styled after a class is added to the rich text element using the "When inside of" nested selector system.