Does this article apply to you? This article covers Enhanced Automated Workflow features. To check if your account has access, go to Automated Workflow in AMS+. If you see a "Welcome to the New Automated Workflow" banner at the top of the page, you're all set.
Enhanced Automated Workflows trigger in one of two ways: when a record is created or updated, or when a date approaches. This article explains how each works, so you can build workflows that run when you expect them to and troubleshoot when they don't.
Requirements
- Automated Workflow must be activated in your agency's AMS+ account.
- Only the Account Owner can activate it. Learn more.
- You must be logged into AMS+ as an Agency User.
- You must be assigned to a Security Group with the Manage Automated Workflow permission.
In this article
- How created and updated triggers work
- Custom field conditions
- Date-based triggers
- Existing records and newly activated workflows
- Conditions are checked again before delayed actions run
- Troubleshooting trigger behavior
How created and updated triggers work
This section covers triggers that run when a record is created or updated. Date-based triggers work differently. See Date-based triggers.
With a created or updated trigger, an Enhanced Automated Workflow triggers when two things are true at the same moment:
- All conditions on the workflow are met.
- At least one of those condition fields just changed from a non-matching to a matching value in that save.
Both have to be true at the same time. A record that passively matches all conditions, without anything changing, won't trigger the workflow.
Think of it this way: the workflow is watching for a record to arrive at the matching state, not just be in it.
What this looks like in practice
Say your workflow has two conditions: Status is New Lead and Type is Prospect.
- If a record's Status changes to New Lead but Type is still Client, the workflow won't trigger because not all conditions are met yet.
- If Type then changes to Prospect, the workflow triggers because that change completed the match.
- If both conditions are already met and you update an unrelated field, the workflow won't trigger because nothing changed from non-matching to matching.
The order in which conditions are met doesn't matter. The workflow triggers as soon as the last one snaps into place.
The change also has to happen on the record the workflow runs on. If a condition is on a related record, such as the agent on an Agent License workflow, a change to that related record can't trigger the workflow, even if it completes the match.
Custom field conditions
You can use your Checkbox and Dropdown custom fields as conditions. A custom field condition works like any other condition: it has to be met for the workflow to run, and a change to the custom field can be the change that completes the match. To add one to a workflow, see How to build an Enhanced Automated Workflow in AMS+, which shows where to add a custom field condition in the Set conditions step.
Other custom field types, such as Checkbox List, aren't available as conditions.
Example: custom field conditions
Say your workflow has two conditions: Type is Client and the Onboarding Complete checkbox custom field is checked.
- If a record's Type is Client and someone checks Onboarding Complete, the workflow triggers. The custom field was the only thing that changed, and that change completed the match.
- If Onboarding Complete is already checked and Type then changes to Client, the workflow triggers. The Type change completed the match.
- If both conditions are already met and you update an unrelated field, the workflow won't trigger. Nothing changed from non-matching to matching.
If a custom field change means a record no longer matches your conditions, AMS+ cancels any delayed actions that haven't run yet. See Conditions are checked again before delayed actions run.
Where you make the change matters
Only a change to a custom field on the record the workflow runs on can trigger a new workflow or schedule its actions. A change to a custom field on a related record can't, even if it makes all of your conditions match. This is the same rule that applies to standard field conditions. A change to a custom field on a related record can still cancel actions that are already waiting, if it makes the record stop matching your conditions.
For example, say you have a workflow that runs on Agent Licenses. It has one condition on a custom field on the Agent License tab and another on a custom field on the Details tab of an Agent Record.
- If you change the custom field on the Agent Licenses tab and that change completes the match, the workflow triggers.
- If you change the custom field on the Details tab and that change completes the match, the workflow doesn't trigger. The Agent isn't the record the workflow runs on.
Date-based triggers
Some triggers run on a date instead of when a record changes. When you build the workflow, these are the date approaches triggers, such as a birthday, a policy renewal date or effective anniversary, an agent's E&O or license expiration, or an activity due date.
These triggers work differently from created or updated triggers. When a record meets your conditions, AMS+ schedules each action for a day you choose, counted from the date on the record. For example, you can set an action to happen 3 days before the date or 1 day after it.
Example: renewal reminder schedule
A workflow sends a text 3 days before a policy's renewal date and creates an activity 1 day after it. The renewal date on the policy is Oct 22.
- Oct 8: You turn on the workflow. AMS+ schedules the text and the activity for each record that meets your conditions.
- Oct 19: The text is sent, 3 days before the renewal date, if the record still meets your conditions.
- Oct 22: The renewal date saved on the record.
- Oct 23: The activity is created, 1 day after the renewal date, if the record still meets your conditions.
Right before each action, AMS+ checks that the record still meets your conditions. If it doesn't, that action doesn't happen. See Conditions are checked again before delayed actions run.
When a record is scheduled
A record is scheduled when:
- You turn on the workflow, and the record already matches your conditions.
- The record newly matches your conditions.
- You add a date to the record or change its date.
Scheduling a record doesn't send anything. Each action happens on its own day. Once a record is scheduled, nothing else has to change on it for its actions to happen.
AMS+ schedules a record only if the day of its earliest action hasn't passed. In the example, that's the text on Oct 19. If that day has already passed, AMS+ doesn't schedule the record, and none of its actions happen, including actions that are still ahead. For example, if you turn on the example workflow on Oct 20, the text day has passed, so the record isn't scheduled and the Oct 23 activity isn't created either.
For triggers that repeat every year, see Repeating and one-time dates.
If you change the date
When you change the date on a record, AMS+ moves the scheduled actions to match the new date. In Workflow History, this shows as a cancelled entry and a new entry for the new date. This is expected. For what each Workflow History entry means, see How to track Enhanced Automated Workflow activity on a record in AMS+, which lists the event types and what each one shows.
If a record had no date, or a date that had already passed, adding or changing the date to one where the day of the earliest action is still ahead schedules the actions. If you move a date into the past or clear it, the scheduled actions are cancelled and aren't rescheduled.
A workflow runs only once for each record and date. If you change a date and then change it back to the original, the workflow doesn't run again for that date. Annual recurring workflows run again the following year.
Custom field changes and scheduled actions
Custom field changes also affect date-based triggers. When a change to a custom field makes a record match your conditions, AMS+ schedules the workflow's actions for that record. When a change makes the record stop matching, AMS+ cancels the scheduled actions that haven't happened yet.
Repeating and one-time dates
What happens after a record is scheduled depends on the type of date.
Dates that repeat every year
- Examples: every birthday, policy effective anniversary, E&O or license expiration.
- After the actions finish: AMS+ schedules next year's actions.
- If the day of the earliest action has already passed: the record waits for next year's date.
Specific dates
- Examples: specific birthday, renewal date, activity due date.
- After the actions finish: nothing more happens for that date.
- If the day of the earliest action has already passed: the record isn't scheduled, and none of its actions happen.
Existing records and newly activated workflows
When you turn on a workflow that uses a created or updated trigger, records that already match all conditions won't trigger automatically. The workflow only runs when something changes.
Those records will trigger the next time one of their condition fields changes from a non-matching to a matching value.
Using a date-based trigger? These work differently. Records that already match are scheduled when you turn on the workflow, unless the day of their earliest action has already passed. See Date-based triggers.
Conditions are checked again before delayed actions run
When a workflow has delayed actions, such as a follow-up email scheduled for three days after the trigger, AMS+ checks that the record still meets the workflow's conditions in two ways. If a change to the record means it no longer matches, AMS+ cancels the waiting actions right away. AMS+ also checks the record again just before each action would run, and cancels the action if the record no longer matches or if the workflow or the action is no longer active.
This means a workflow can trigger correctly and still have some or all of its actions cancelled if the record's data changes in the window between the trigger and the action's scheduled execution.
This matters most for date-based triggers, where a record can be scheduled weeks or months before its date. If the record stops matching before then, the scheduled run is cancelled.
Troubleshooting trigger behavior
To avoid unexpected results before they happen, see Enhanced Automated Workflow best practices in AMS+, which covers conditions that are too broad, activating a workflow when records already match, and delayed actions.
The workflow triggered when I didn't expect it to
Check whether all conditions were met at the time of the save, and whether at least one condition field changed from non-matching to matching. If both are true, the workflow triggered correctly. The change that completed the match may not be the one you were thinking of.
The workflow didn't trigger when I expected it to
Check the following:
- Not all conditions were met when the save happened.
- All conditions were already met before the save and nothing changed from non-matching to matching. The workflow doesn't trigger on passive matches. Something has to change.
- The change came from an update method the workflow doesn't allow, such as an import. You choose the allowed update methods when you set the trigger. See How to build an Enhanced Automated Workflow in AMS+, which covers the trigger options in Step 1.
- The workflow already ran for this record. With the Once per record frequency, a record can trigger the workflow only one time. With Once a year per record, it can trigger the workflow only once per calendar year. A run that was cancelled still counts.
The workflow didn't trigger after I changed a related record
A workflow triggers only from a change to the record it runs on. If a condition is on a related record, such as the agent on an Agent License workflow, a change to the related record can't trigger the workflow, even if it completes the match. See How created and updated triggers work.
I turned on the workflow but nothing happened
If the workflow uses a created or updated trigger and your existing records already match all conditions, they won't trigger until one of their condition fields actually changes. This is expected behavior. See Existing records and newly activated workflows above. If the workflow uses a date-based trigger, see the next item.
A date-based workflow didn't run for a record
Check the following:
- The record has a date in the field the trigger uses.
- The day of the earliest action hadn't already passed when the record qualified. See Repeating and one-time dates.
- The record matched all conditions when the run was scheduled and when it was due to run. If it stopped matching in between, the run was cancelled, and Workflow History shows a cancelled entry.
- The date wasn't changed back to a value the workflow had already used for that record. A workflow runs only once for each record and date.
The workflow triggered but the action never ran
If the action was delayed, the record's conditions are re-evaluated before the action executes. If the record no longer matched at that point, the action was cancelled. Check whether the record's data changed between when the workflow triggered and when the action was scheduled to run. The action is also cancelled if the workflow or the action was turned off or deleted while it was waiting.