Understanding Email and SMS Variables in the Workflow

Understanding Email and SMS Variables in the Workflow

Overview

  • The workflow can store and use variables.
  • This offers you the ability to pass data to and from other systems, customize the content of messages, and even generate entirely new workitems in an automated manner with the correct configuration.
  • Below are some examples to help explain the email and SMS variables in a given workitem.
  • The data will be stored as Strings that may be combined into Maps and Lists depending on where you’re looking for these variables.
  • Please pay attention to the case of the key names, as they are case sensitive and getting that wrong may cause errors. Before you report a problem with using variables, please double-check your key name and case to make sure it’s correct.

The following will be stored in each workitem for emails and SMS messages:

Workitem Type: Email

Header Information

workitem.email = {
  from: String,
  to: String,
  createdAt: Long,
  subject: String,
  toAddresses: List<Map<String,Object>>,
  ccAddresses: List<Map<String,Object>>,
  bccAddresses: List<Map<String,Object>>,
  bodyParts: Map<String,Map<String,Object>>,
  status: int
}

Body

workitem.email.bodyParts = {
  id: {
    id: String,
    type: String,
    content: String,
    attachment: String,
    contentType: String,
    size: long
  }
}

A note on accessing email body parts in the workflow

The body parts cannot be accessed using the standard format (i.e. workitem.email.bodyParts[1]). Instead please use the Save Email Content as Variable workitem action to get the content of an email and save it as a variable which you can access.

Workitem Type: SMS

workitem.currentSMSMessage = {
  id: String,
  smsId: String,
  timestamp: Long,
  modifiedAt: Long,
  fromId: String,
  toId: String,
  type: String,
  textMsg: String,
  filename: String,
  fileContentType: String,
  fileContentSize: Long,
  name: String,
  email: String,
  isEmail: Boolean
}

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.