01 · Direct answer
How do you send a postcard when a Salesforce opportunity changes stage?
Compare the prior stage with the current stage. Require an eligible related contact and complete postal address. Build the idempotency key from the Opportunity ID, target stage, and allowed send window. Use HTTP Callout or another approved connection method.
Do not trigger on every Opportunity update. A note, amount, or owner change must not create another piece.
- Choose the transitionFor example, move from Proposal to Closed Won. Name both sides when it matters.
- Resolve the recipientSelect the intended Contact or Account address with a documented rule.
- Call the connectionAuthenticate with a Named Credential and map the reviewed payload.
- Handle faultsStore the error, keep the Flow from looping, and route the record for review.
02 · Direct answer
How do you write the postcard result back to Salesforce?
Store source event ID, campaign ID, mailpiece ID, current state, exception reason, and timestamps. A related record is better than one set of fields when an Opportunity can have more than one mail event.
Keep the writeback update outside the original stage-change decision. Test for recursion and Flow re-entry.
Implementation worksheet
Salesforce Flow field map
Choose the recipient and address relationship before you build the callout.
| Salesforce value | Mail field | Control |
|---|---|---|
| Opportunity.Id | source_record_id | Required and stable. |
| Opportunity.StageName | trigger_reason | Record the exact eligible transition. |
| Contact.Id | recipient_key | Use the documented primary-contact rule. |
| Contact mailing fields | postal address | Hold incomplete values. |
| Template key | template_id | Keep it in controlled configuration. |
| Mail activity record | result and join keys | Create or update without retriggering the send Flow. |
Preflight checklist
- Use one stable source-event ID and save it with the mail record.
- Require recipient name, address line 1, city, state, and ZIP Code before release.
- Set a duplicate rule for the person, household, property, order, or job.
- Render a proof with a test record before any funded send.
- Define who can pause the workflow and who can approve release.
- Store the source record ID, campaign ID, and returned mailpiece ID together.
- Treat mailstream events as operational signals, not proof of attention or revenue.
FAQ
Questions to resolve before launch
Can Salesforce Flow call an external mail API?
Salesforce documents HTTP Callout for Flow. Access, authentication, and limits depend on the Salesforce setup.
Should the Flow trigger when any Opportunity field changes?
No. Check the specific prior and new stage values so unrelated edits do not send mail.
Where should multiple mail events be stored?
Use related activity records when one Opportunity can create more than one mail event. This preserves history better than overwrite-only fields.
Primary sources
Sources and review notes
- Salesforce: HTTP Callout from FlowOfficial Flow HTTP Callout setup.
- Salesforce: Record-triggered Flow considerationsOfficial trigger and execution guidance.
- Salesforce: Named CredentialsOfficial external authentication model.
Product plans, trigger names, and connector access can change. Check the linked documentation and your account before production use. Sendvo last reviewed these sources on August 31, 2026.