Before Message Created

Origin: Messages

This workflow automation trigger fires before a message is created and sent.

Create This Trigger

  1. Click the app selector icon of app selector and select ACD.
  2. Go to Digital > Automation Triggers.

  3. Click Add trigger.

  4. Enter a Name for the trigger. Since you can assign multiple jobs to the same trigger, use a name based on the event or conditions rather than an associated job.
  5. From the Event drop-down, select Before message created.

  6. In the Delayed execution field, enter the number of seconds that Digital Experience (DX) should wait after the selected event occurs before firing the trigger. If you want it to happen immediately, enter 0.
  7. If you have folders that organize your triggers, you can select which folder to put this trigger in from the Folder drop-down.
  8. Click Save.
  9. From the detail page, click Activate when your trigger is completely configured.

Add a Condition

If you entered a value in the Delayed execution field when you created a trigger, make sure your condition configurations do not exceed that time. For example, if you set the Delayed execution time to 86400 seconds, or 24 hours, you cannot add a Contact status update time condition with a time period greater than 1 day.

If you entered a value in the Delayed execution field when you created a trigger, configure conditions under both the Conditions and Delayed conditions sections or just the regular Conditions section. If you only configure Delayed conditions, the system may duplicate events.

  1. From the detail page, click Add Condition.
  2. Use the drop-down to select the condition you want. Refer to the table below for a list of conditions available for what you just created.
  3. Click Select.
  4. Some conditions require additional configuration. Refer to the table below for instructions.

Available Conditions

Condition Type Details and Instructions
Content contains

Executes jobs based on the content of the message. Use the following criteria to define a pattern that the message must match to trigger the job:

  • Select It does not match if you want the job to trigger for messages that do not match the defined pattern.
  • Select Use regex if you are defining regex patterns.
  • Select Case sensitive if your patterns are case-sensitive and you did not select Use regex.
  • Select one or more option to define what part of the message to consider when matching the patterns. Your options are Search in message content, Search in content of text-based plugin, and Search in subject.
  • In the Enter any string fields, enter either regular expressions (regex) or text to define the patterns to use for this condition.
Chat Is Active

Execute jobs if the chat window displays an online status.

  • From the drop-down, select Yes or No.
Date and time

Executes jobs during or outside of specified time frames.

  1. Click Select. This opens a new page.
  2. Select a radio button to Include selected days and times or Exclude selected days and times.
  3. From the drop-down, select Day of the week or Date range.
  4. For Day of the week, select the checkbox for any day that should be a part of the condition.
  5. For Date range, type or use the pop-up calendar to select a start and end date.
  6. Use the Choose time slot options to specify times of day for this condition.
  7. Click Save. This redirects you to the trigger detail page.

Jobs can process up to 500 contacts at a time. If you need to process more, have the job run more than once per day at different times.

Excluded message subjects rule

Executes a job based on subject. In this case, any subject that does not include what you specify triggers the job.

  1. Enter any value in the field. Separate multiple values using commas.
  2. Click Save.
Excluded message tags condition

Executes a job based on tags attached to the message. In this case, any message that does not have the tags you specify triggers the job.

  1. Click Choose Tag. This opens a new page.
  2. Select the checkbox for any tags a message should not have for the trigger to fire.
  3. Click Save. This redirects you to the trigger detail page.
Included channels condition

Checks whether the chat window that is on the website belongs to specific channel. This trigger works for both contact center triggers and proactive triggers.

  1. Click Choose Channel. This opens a new page.
  2. Select the checkbox for any channels you want to include for the trigger to fire.
  3. Click Save. This redirects you to the trigger detail page.
Included message sentiments rule

Executes a job based on sentiment. In this case, any message that is marked with the sentiments you specify triggers the job.

  • Select the checkbox for Negative, Neutral, or Positive sentiment, or any combination of the three.
Included message subjects rule

Executes a job based on subject. In this case, any subject that includes the specified values triggers the job.

  1. Enter any value in the field. Separate multiple values using commas.
  2. Click Save.
Included message tags condition

Executes a job based on tags attached to the message. In this case, any message that has the tags you specify triggers the job.

  1. Click Choose Tag. This opens a new page.
  2. Select the checkbox for any tags a message should have for the trigger to fire.
  3. Click Save. This redirects you to the trigger detail page.
Message created time

Executes jobs based on when the message was created.

  1. From the drop-down, select Is older or Is newer.
  2. In the first field, enter a number of days. This value cannot be negative.
  3. In the second field, enter a number of hours from 0-23.
  4. In the third field, enter a number of minutes from 0-59.
  5. Click Save.
Message direction

Execute jobs according to whether the message is inbound or outbound.

  • From the drop-down, select Message is inbound or Message is outbound.
Probability of Execution

Executes jobs based on a probability percentage. This condition works for contact center triggers, proactive triggers, and schedulers.

  1. Use the slider to select a percentage. 100% means the job executes every time. 0% means the job never executes.
  2. Click Save.

Add a Job to This Trigger

  1. From the detail page, click either Add new job or Add existing job, depending on if the job you want already exists.

  2. If you clicked Add new job, follow the steps to create the job you want. These steps can be found on the individual help page for each job, listed in the following drop-down:

  3. If you clicked Add existing job:
    1. Use the drop-down to select the job you want.
    2. Click Add.