FINANCE

Build a deferral schedule when a new contract closes

Triggered by a closed-won contract webhook, generates a period-by-period revenue-deferral schedule from the contract terms and writes it to BigQuery and Postgres so billing…

CategoryFinance
Enginesim
Difficultyintermediate
Triggerwebhook
Steps5
Setup~15 min

How it runs

The automated pipeline, trigger to output.

  • TriggerWebhook: contract marked closed-wonHTTP webhook
  • LogicCompute per-period recognition from contract terms
  • ActionUpsert schedule rows into BigQueryGoogle BigQueryBigQuery
  • ActionMirror summary into Postgres ledgerPostgreSQLPostgres
  • OutputConfirm schedule built to source systemHTTP webhook

What it does

When a contract closes, this workflow reads its term, total contract value, and billing cadence, then constructs the full deferral and recognition schedule — one row per period — and persists it. The outcome is that every new contract has an authoritative recognition schedule the moment it's signed, so billing and recognition never start out of sync.

When to use it

Use this to eliminate the manual spreadsheet step finance does after each close. It's the upstream complement to divergence monitoring: get the schedule right on day one and there's less drift to catch later.

How it works

  1. 1An incoming webhook fires when a CRM or CLM marks a contract closed-won.
  2. 2A logic step parses term length, start date, TCV, and billing frequency, then computes straight-line (or milestone) recognition amounts per period.
  3. 3A BigQuery action upserts the generated rows into the recognition_schedule table.
  4. 4A Postgres action mirrors a summary row into the operational ledger used by the billing system.
  5. 5A final output confirms the schedule back to the originating system with the row count and total deferred.

Set it up

What you configure once, before turning it on.

  1. 1
    Connect HTTP webhookTrigger any URL on agent actions.
  2. 2
    Connect BigQueryDatasets, queries, schemas.
  3. 3
    Connect PostgresAny Postgres URL — query, write, migrate.
  4. 4
    Set each agent's modelWe leave models unset so you pick the tier — fast + cheap, or top-quality.
  5. 5
    Tune it to your dataEdit the prompts, filters, and field mappings so it matches how your team works.
  6. 6
    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.