MARKETING
Closed-Won Source Attribution Write-Back
When a Salesforce opportunity is marked closed-won, looks up the originating campaign's spend and touch history in BigQuery and writes the computed acquisition cost…
How it runs
The automated pipeline, trigger to output.
- TriggerOpportunity marked closed-wonSalesforce
- LogicExtract campaign ID and account
- ActionFetch campaign spend + touch historyBigQuery
- LogicCompute acquisition cost + first-touch source
- OutputWrite attribution fields back to opportunitySalesforce
What it does
Enriches every win with its true acquisition story at the moment it closes. On a closed-won event, it traces the opportunity's campaign back through BigQuery touch and spend data, computes the allocated acquisition cost and the first-touch source, then writes those fields back onto the Salesforce opportunity so reps and finance see attribution inline.
When to use it
Use it when closed deals lack the source and cost-of-acquisition fields your revenue team needs for cohort and payback analysis. It is for ops teams who want attribution stamped on the record at close time rather than reconstructed in a spreadsheet later.
How it works
- 1A Salesforce event fires when an opportunity stage changes to closed-won.
- 2In a logic step, extract the opportunity's campaign ID and account.
- 3Query BigQuery for that campaign's spend and the account's touch history.
- 4Compute allocated acquisition cost and identify the first-touch source.
- 5Write the cost and source fields back onto the Salesforce opportunity.
Set it up
What you configure once, before turning it on.
- 1Connect SalesforceAccounts, opportunities, cases.
- 2Connect BigQueryDatasets, queries, schemas.
- 3Set each agent's modelWe leave models unset so you pick the tier — fast + cheap, or top-quality.
- 4Tune it to your dataEdit the prompts, filters, and field mappings so it matches how your team works.
- 5Test, then turn it onRun once against a sample, confirm the output, then enable the trigger.
More Marketing workflows
Agentic UTM Taxonomy Steward: Detect, Explain, and Propose Fixes
An agent reviews the full backlog of campaign links in Airtable, reasons about taxonomy drift beyond rigid rules, drafts standardized replacements for malformed UTMs.
Slack UTM Check: Paste a Link, Get an Instant Verdict
Lets marketers drop a tracking URL into a Slack channel and get an immediate threaded reply that says whether the UTMs are valid, what is wrong, and a corrected suggestion.
Backlink Outreach Drafter for Verified Mentions
Picks verified, high-authority unlinked mentions from Airtable, drafts a personalized backlink-request email for each.
Source-Authority Verifier for Mention Provenance
Takes a queue of detected brand mentions and runs an agent that verifies whether each source is a legitimate, authoritative publisher versus a scraper or syndication copy.
Unlinked Brand-Mention Detector with Authority Scoring
Scans the web for fresh brand mentions, filters to ones that name you without linking back, scores the publishing domain's authority.
Weekly Brand-Mention Provenance Digest to Notion
Aggregates the week's tracked mentions from Airtable into a single summarized report covering new opportunities, authority distribution, and outreach progress.
Run it inside a business
This workflow drops into a full company template. Import the org, and this is one of the playbooks its agents run.

Run this workflow in your colony.
14-day trial. No DevOps. No Sales call. Provisioned in under a minute.
