CRM changes
Start a workflow when a company, opportunity, note or task is created or changed in the CRM, with the record's fields.
What this does
Small Business Chatbot has six CRM change triggers. Each starts a run in every published workflow that uses it, once per change.
- Labels in the app
- Company created, Opportunity created, Opportunity updated, CRM note created, CRM task created, CRM task updated
- Fires
- When that record is created or saved in the CRM
- Carries
- The record, as
{{trigger.record.…}}, and its earlier version on updates - Settings
- None. Their windows show "No settings for this node yet."
When they fire
| Trigger | Fires when |
|---|---|
| Company created | A new company is saved |
| Opportunity created | A new opportunity is saved |
| Opportunity updated | An opportunity is saved again, including a move to another stage on the board |
| CRM note created | A note is added to a contact, company or opportunity |
| CRM task created | A new task is saved |
| CRM task updated | A task is saved again, including when it's marked done |
Records from a CSV import, archiving a record and changes a workflow step makes start no runs. The one exception: with Automatically create and link companies on, a company that an Upsert Contact step creates from Business name fires Company created.
What they carry
| Variable | Type | What it holds |
|---|---|---|
trigger.trigger_type |
text | company.created, opportunity.created, opportunity.updated, note.created, task.created or task.updated |
trigger.object_type |
text | company, opportunity, note or task |
trigger.object_id |
id | The record's id |
trigger.source |
text | Where the change came from |
trigger.record.* |
object | The record as saved, with the fields below |
trigger.before.* |
object | The record before this change. Empty on the created triggers. |
trigger.event_id |
id | The change's id |
These triggers carry no trigger.contact, so with Only enrol each contact once on, their runs are blocked. To text or email the person behind the record, add a Find Contact step first. Set Contact field to Contact ID and Lookup value to the record's contact id, such as {{trigger.record.primary_contact_id}}.
Record fields
Dates are in UTC. A field is empty when the record has no value for it.
| Record | Fields under trigger.record. |
|---|---|
| Company | company_id, name, website, domain, email, phone, description, industry, address, tags, custom_fields, created_at, updated_at |
| Opportunity | opportunity_id, name, primary_contact_id, primary_company_id, pipeline_id, stage_id, status (open, won, lost or abandoned), monetary_value, currency_code, forecast_expected_close_date, forecast_probability, won_at, lost_at, last_stage_change_at, custom_fields, created_at, updated_at |
| Note | note_id, body, contact_id, company_id, opportunity_id, is_pinned, created_at |
| Task | task_id, title, description, contact_id, company_id, opportunity_id, task_type, due_at, priority (low, normal, high or urgent), status, completed_at, created_at, updated_at |
To act only when an opportunity changes stage, put an If step first: Left side {{trigger.record.stage_id}}, Operator Not equal, Right side {{trigger.before.stage_id}}.
Example
An Opportunity updated run:
{
"trigger_type": "opportunity.updated",
"object_type": "opportunity",
"object_id": "o_5521",
"record": { "name": "Furnace replacement", "stage_id": "s_quoted", "status": "open", "monetary_value": 6400, "primary_contact_id": "c_1042" },
"before": { "name": "Furnace replacement", "stage_id": "s_new", "status": "open", "monetary_value": 6400, "primary_contact_id": "c_1042" }
}
Used in
- Companies and opportunities: the records these triggers watch.
- Notes and tasks: notes and tasks on any record.
- Triggers: how to pick a trigger.