FLOWLOGIC
module /flow-testing-and-release

unit U22 of 5

A staging that is not production

separate connections, sandbox destinations

You cannot test a client automation against the client’s live systems. The first real test writes a fake lead into their CRM, emails a real prospect, or charges a real card. A staging setup exists so the flow can run end to end without any of that being true, and the only reliable way to get one is to make the destinations different — different Connections, different accounts, different webhook URLs — rather than trusting yourself to remember which environment you are in.

Duplicate the flow into a staging project and point every outbound step at a sandbox account the provider offers, or at a destination you own. Give staging its own Connections rather than sharing production credentials: a shared key means a staging run can write production data, and it means revoking a leaked staging key breaks the client. Feed it captured real payloads — the ones your webhook already logged — because handcrafted test JSON is always tidier than reality and hides exactly the malformed cases that break you.

Where it breaks: the shared Connection. One production API key reused in staging turns every test run into a live write, and the failure is invisible until a client asks why there are test contacts in their CRM. Separate credentials per environment, and make the staging ones incapable of touching production data.

worked example

Environment separation for a client onboarding automation — same flow, different destinations, no shared credentials.

{
  "production": {
    "webhook":    "https://hooks.youragency.dev/acme/intake",
    "crm":        "connections.acme_crm_prod",
    "email":      "connections.postmark_prod",
    "onFailure":  "dead-letter + page on-call"
  },
  "staging": {
    "webhook":    "https://hooks.youragency.dev/acme/intake-staging",
    "crm":        "connections.acme_crm_sandbox",
    "email":      "connections.postmark_sandbox",
    "onFailure":  "log only"
  },
  "note": "separate Connections, not one key with a flag - a flag is a thing you forget"
}

field checklist

common failure — Test contacts in the client CRM

A staging copy of an onboarding flow reused the production CRM Connection because it was "the same API anyway." Every test run created a real contact, and three weeks of testing left hundreds of fake leads that corrupted the client’s conversion reporting. Separate Connections per environment, point staging at a sandbox account, and confirm with a single test write that staging genuinely cannot reach production before you run anything else.

check your understanding

You are setting up staging for a client automation. Select everything that must differ from production.

  • select every one that applies — partial answers are marked wrong

next unit opens once this is passed

sandbox validation

The check above confirms you followed the unit. Marking the module COMPLETED takes more: build the automation in your own engine and submit the exported flow and its run evidence, signed, to your unique validation URL. See the module page for that spec.