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…

CategoryMarketing
Enginesim
Difficultyadvanced
Triggerevent
Steps5
Setup~25 min

How it runs

The automated pipeline, trigger to output.

  • TriggerOpportunity marked closed-wonSalesforce
  • LogicExtract campaign ID and account
  • ActionFetch campaign spend + touch historyGoogle BigQueryBigQuery
  • 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

  1. 1A Salesforce event fires when an opportunity stage changes to closed-won.
  2. 2In a logic step, extract the opportunity's campaign ID and account.
  3. 3Query BigQuery for that campaign's spend and the account's touch history.
  4. 4Compute allocated acquisition cost and identify the first-touch source.
  5. 5Write the cost and source fields back onto the Salesforce opportunity.

Set it up

What you configure once, before turning it on.

  1. 1
    Connect SalesforceAccounts, opportunities, cases.
  2. 2
    Connect BigQueryDatasets, queries, schemas.
  3. 3
    Set each agent's modelWe leave models unset so you pick the tier — fast + cheap, or top-quality.
  4. 4
    Tune it to your dataEdit the prompts, filters, and field mappings so it matches how your team works.
  5. 5
    Test, then turn it onRun once against a sample, confirm the output, then enable the trigger.

Run this workflow in your colony.

14-day trial. No DevOps. No Sales call. Provisioned in under a minute.