Workflow rules
A workflow rule does something automatically when a record is saved: fills in or changes fields, sends an email, creates a task, or tells another system. Admins set them up in Settings → Workflow Rules. For multi-step automation with decisions, waits and loops, use flows.
When rules run
A rule belongs to one object: cases, leads, opportunities, accounts or contacts. It runs however the record is saved: in the app or mobile app, by an import, from a web form, an email or a chat, or through the API.
| Timing | What it can do | Example |
|---|---|---|
| Before save | Update fields on the record as it’s saved | Set a lead’s rating to Hot when it comes from a partner |
| After save | Send an email, create a task, call a webhook; immediately or after a delay | Create a follow-up task two days after a lead arrives |
Create a rule
- Go to Settings → Workflow Rules and choose New Rule.
- Give it a name, and choose the object and the timing (before save or after save).
- Choose when it’s checked: when a record is created, edited, or either.
- Set the criteria the record must meet.
- Add one or more actions.
- Save it, and make sure it’s Active.
Criteria
Add conditions on the record’s fields, for example Priority equals High or Subject contains outage. Then choose whether the record must meet:
- all of the conditions,
- any of them, or
- custom logic, such as
1 AND (2 OR 3).
Conditions can test whether a field equals, contains, starts with, is greater or less than, is blank, and more, depending on its type. The changed condition checks whether this save changed a field, for example to act only when a case’s owner changes.
Actions
| Action | Details |
|---|---|
| Update field (before save) | Set a field to a value, clear it, set a date to today or a number of days from today, or set a user field to the person who saved the record. The change is saved with the record and shows in its history as made by the rule. |
| Send email | Written in the rule or from an email template, with merge fields such as the case number. Send it to the record’s email address (the contact or lead), its owner, chosen users, and up to 10 other addresses. People who opted out of email aren’t emailed. |
| Create task | A to-do on the record, for its owner, the person who saved the record, or a chosen user, with a due date. |
| Call webhook |
Sends the record to another system’s URL (an HTTPS POST of JSON). Each request is signed with the rule’s secret in the
x-scl-signature header, so the receiver can check it came from CRMSix.
|
After-save actions run straight away or after a delay of up to 30 days.
Check what happened
- The History tab on Settings → Workflow Rules lists every action rules took, with its result: who was emailed, which task was created, what the webhook answered.
- A failed action can be retried from the history; webhooks are retried automatically up to 3 times.
- Emails sent by rules appear on the record’s activity timeline and in the Email Log.
- A problem in a rule never stops the record from saving; it shows in the history instead.
Rules and the rest of the save
Before-save rules run before formula fields are recalculated and validation rules are checked, so a validation rule sees the values a rule set. After-save actions run once the record is saved, and flows start after that. The in-app Help (Order of execution) lists every step.
Tips
- Test new rules in a sandbox, where emails go only to your own users and webhooks are never called, then deploy them with a change set.
- Use Only when it starts to meet the criteria for anything that should happen once, so later edits don’t repeat it.
- Prefer a flow when you need to look at other records, branch, wait or loop.