Set a CRM field automatically
How to use the Set CRM Field action and the CRM Integration data mapping (OFF, WRITE, OVERWRITE, FALLBACK) to write data to opportunity, contact, or account records when something happens in your pipeline.
The Set CRM Field automation action writes data directly to a contact, opportunity, or account record when the automation fires. The most common use is stamping a date field the moment something important happens, like marking when a relationship started or when a proposal was sent, without anyone having to remember to fill it in.
The Canonical Example: Stamp a Date When a Lead Arrives
Here's the most common setup: when an opportunity enters your Lead Received stage, automatically set the contact's Relationship Start Date to today.
- Go to https://app.trustpager.com/crm/pipelines and open the pipeline you want to automate.
- Click the Lead Received stage header to open its settings.
- Add a new automation and set the trigger to Stage Change (fires when an opportunity enters this stage).
- Add a Set CRM Field action.
- Pick the field Contact: Relationship Start Date and set the value to
{{today}}. - Save the automation.
From now on, every lead that lands in that stage gets its relationship start date stamped automatically with the correct date in your workspace timezone.
The record is chosen for you. You don't pick a target record separately. The field you choose decides it:Contact: Relationship Start Datewrites to the contact,Opportunity: Valuewrites to the opportunity. Relationship Start Date lives on contacts and companies, not on opportunities, so pick the Contact or Company version of it.
Writing Multiple Fields in One Action
You don't need a separate action for each field. The Set CRM Field action supports multi-write, so add as many field/value pairs as you need in a single action step. For example, when an opportunity is marked Won:
- Set Opportunity: Actual Close Date to
{{today}} - Set a custom
outcomefield toWon - Set a custom
closed_atfield to{{now}}(full UTC timestamp)
All three fields are written in the same automation step.
Useful Recipes
| When this happens | Set this field | To this value |
|---|---|---|
| Opportunity enters Lead Received | Contact: Relationship Start Date | {{today}} |
| Opportunity moves to Won | Opportunity: Actual Close Date | {{today}} |
| Opportunity moves to Won | status (custom) | Won |
| Contact submits a form | contact source (custom) | Inbound Form |
| Any stage change | last_stage_change_at (custom) | {{now}} |
Understanding {{today}} vs {{now}}
Two date tokens are available in Set CRM Field values:
{{today}}is today's date in your workspace timezone. Use it for date fields like Relationship Start Date and Actual Close Date. If you're in Australia/Sydney and it's 8am AEST, you get today's Australian date, not UTC's previous day.{{now}}is the current UTC timestamp (e.g.2026-04-22T08:15:30Z). Use it for full datetime fields.
For the complete token reference including name and CRM variable tokens, see https://trustpager.com/help-center/first-name-only-contacts.
Typing a Date Yourself
If you type a fixed date instead of using a token, use either 2026-08-13 or 13/08/2026. Both are read as 13 August 2026. Anything the platform can't read unambiguously is rejected and the run tells you so, rather than guessing at a date and silently storing the wrong one.
Write vs Overwrite
Each field you set has a mode:
- Overwrite replaces whatever is there. Use it when the newest value should always win.
- Write only fills the field if it's currently empty. Use it for things that should be set once and never changed, like the date a relationship first started. A returning customer keeps their original date instead of having it reset.
A field that already has a value is left alone in Write mode, and the run notes that it skipped it. That's expected behaviour, not a failure.
An automation's CRM Integration (next section) adds a third mode, Fallback, for placeholder values.
CRM Integration: Data Mapping with OFF, WRITE, OVERWRITE and FALLBACK
An automation's Write to CRM setting (its CRM Integration) takes data from the automation's trigger, for example a call analysis, a form or a webhook, and maps it onto your CRM records. Open your automation at https://app.trustpager.com/auto/automations, click Edit Configuration on the Write to CRM card and go to the Data Mapping tab. Every mapped field has a four-way toggle:
- OFF does not map that field at all.
- WRITE fills the field only when it is empty.
- OVERWRITE always replaces whatever is there.
- FALLBACK is for placeholders. See below.
New mappings start as WRITE. A mapping you add in the editor now defaults to WRITE (it used to default to OVERWRITE), so existing data is protected unless you choose otherwise. Mappings you saved earlier keep the mode they already had.
What FALLBACK does
Sometimes you want to record something when the trigger doesn't give you a real value, then swap in the real value later. A typical case is an AI receptionist that handles unknown callers: you want the card to read "Anonymous 48213" until the caller gives their name, at which point it should become the real name.
To set that up, create a custom variable such as Anonymous {{random:5}} (or there@{{random:5}}.com for an email), map it to the opportunity name and the contact's name (or email) and set its toggle to FALLBACK. Map the caller's real name from the call analysis to the same fields with WRITE.
How it behaves:
- A fallback is only used when no other mapped field supplies a value for that field. The order of the list doesn't matter.
- A fallback never overwrites a value that is already there.
- The placeholder it writes is remembered on the record. When a later run brings a real value (for example the caller gives their name on a second call), the real value replaces the placeholder under WRITE.
- A real value is never replaced by a placeholder, and a new placeholder never replaces an older one.
- If your team edits the field by hand, TrustPager treats that as a real value and keeps it.
Placeholders from before this release won't upgrade on their own. Only placeholders written after FALLBACK shipped are remembered, so older "Anonymous" names stay until you change them manually.
Setting this up over the API or MCP
Each entry in field_mappings accepts a write mode of write or overwrite, plus a fallback flag for placeholder mappings. A mapping with no write mode overwrites, so existing integrations behave exactly as before. For the exact field names and shapes, see https://docs.trustpager.com/reference#automations, which is generated from the live schema.
What Records Can You Update?
Set CRM Field can write to:
- Opportunity, standard fields (name, value, currency, lead source, type, actual close date, notes) and custom fields
- Contact, standard fields (name, email, phone, landline, date of birth, job title, type, relationship start date, timezone, address) and custom fields
- Company, standard fields (name, email, phone, landline, website, industry, account type, ABN, relationship start date, timezone, address) and custom fields
The variable picker inside the field value input lists every writable field with its exact path. If a field isn't in that list, the action can't write to it.
When a Write Doesn't Land
If a write can't be made, the automation run is marked failed and names the field and the reason, so you can see it on the run instead of having to notice a blank field later. Open the automation and check its Run History at https://app.trustpager.com/auto/automations.
Tip: Set CRM Field is most powerful when combined with other actions in the same automation. For example: opportunity enters Won stage, send a congratulations email, set Actual Close Date to {{today}}, create a follow-up task for 30 days out. All in one automation, zero manual steps.