Salesforce Opportunity: Closed-Won to Cash

Adaptor-mediated origination — the source system’s key rides in F2

The scenario

CloudTech Solutions closes a three-year, 125,000 USD enterprise platform deal tracked in Salesforce. The opportunity moves from closed-won through contract execution and invoicing to a received wire payment.

How FORAY models it

This record originates from an external system, so its source record reference (F2) carries the Salesforce opportunity id verbatim — distinct from the evidence record's own identifier (F1). That is the bridge in its two-field form; F2 is a total join key back to the originating system.

Two Arrangements (opportunity and quote), an ASC 606 revenue-recognition Accrual, a payment Anticipation, and three Actions — contract execution (settled amount 0: the signing settles no money), invoice issuance, and the received payment allocating in full.

What to observe in the record

  • F2 ≠ F1 here — compare the native-origination examples, where the record names itself as its source.
  • Salesforce ids, quote line items, and the revenue schedule ride in residue, names preserved.
  • The compliance flags in the transaction’s F25 are the record author’s own recorded assertions.

Wire 4.2 record

This record is a teaching example, emitted by the FORAY generator (template salesforce-opportunity) — not hand-written. No blockchain anchoring has occurred or is implied; anchor-related fields are placeholders. Parties, amounts, and dates are illustrative. Wire keys are catalog codes (F-codes); the readable names used in the prose above are the implementer register, which never appears in hashed bytes.

{
  "F1": "SF_OPP_2026_Q1_ACME_ENTERPRISE",
  "F2": "006Dn000004XyZ1ABC",
  "F3": "CloudTech Solutions",
  "F7": 125000,
  "F8": "USD",
  "F15": "closed_won",
  "F25": {
    "compliance_flags": [
      "ASC_606",
      "SOX_404",
      "Revenue_Recognition"
    ]
  },
  "F26": "salesforce_opportunity",
  "schema_version": "4.2",
  "timestamp": "2026-01-22T10:00:00Z",
  "arrangements": [
    {
      "F4": "sales_opportunity",
      "F5": [
        {
          "jurisdiction": "US-CA",
          "name": "CloudTech Solutions",
          "role": "seller"
        },
        {
          "jurisdiction": "US-NY",
          "name": "Acme Corporation",
          "role": "buyer"
        }
      ],
      "F7": 125000,
      "F11": "2025-11-15T00:00:00Z",
      "F25": {
        "annual_value": 41666.67,
        "contract_term_years": 3,
        "description": "Enterprise Cloud Platform - 3 Year Agreement",
        "payment_terms": "Annual in advance",
        "renewal_type": "auto_renewal",
        "salesforce": {
          "account_id": "001Dn000003ABC1DEF",
          "close_date": "2026-01-20",
          "opportunity_id": "006Dn000004XyZ1ABC",
          "opportunity_name": "Acme Corp - Enterprise Platform",
          "owner_id": "005Dn000001XYZ9ABC",
          "stage": "Closed Won"
        }
      },
      "id": "ARR_SF_OPPORTUNITY"
    },
    {
      "F4": "sales_quote",
      "F5": [
        {
          "name": "CloudTech Solutions",
          "role": "seller"
        },
        {
          "name": "Acme Corporation",
          "role": "buyer"
        }
      ],
      "F7": 125000,
      "F11": "2026-01-10T00:00:00Z",
      "F25": {
        "description": "Quote Q-2026-0142: Enterprise Cloud Platform",
        "line_items": [
          {
            "product": "Enterprise Platform License",
            "quantity": 500,
            "total": 100000,
            "unit_price": 200
          },
          {
            "product": "Premium Support",
            "quantity": 1,
            "total": 15000,
            "unit_price": 15000
          },
          {
            "product": "Implementation Services",
            "quantity": 1,
            "total": 10000,
            "unit_price": 10000
          }
        ],
        "related_arrangement": "ARR_SF_OPPORTUNITY",
        "salesforce": {
          "quote_id": "0Q0Dn000000ABC1DEF",
          "quote_number": "Q-2026-0142",
          "status": "Accepted"
        }
      },
      "id": "ARR_SF_QUOTE"
    }
  ],
  "accruals": [
    {
      "F4": "revenue_recognition",
      "F17": "Calculated",
      "F18": "hash_6a9c2e5f8b1d40616172a9b8c1d4e6f0",
      "F19": {
        "license_ssp": 100000,
        "performance_obligations": 3,
        "services_ssp": 10000,
        "support_ssp": 15000,
        "total_contract_value": 125000
      },
      "F20": 41666.67,
      "F22": [
        "ARR_SF_OPPORTUNITY",
        "ARR_SF_QUOTE"
      ],
      "F25": {
        "accounting_entry": {
          "credit": {
            "account": "2400-Deferred Revenue",
            "amount": 83333.33
          },
          "credit2": {
            "account": "4100-License Revenue",
            "amount": 33333.33
          },
          "credit3": {
            "account": "4200-Service Revenue",
            "amount": 8333.34
          },
          "debit": {
            "account": "1200-Accounts Receivable",
            "amount": 125000
          }
        },
        "description": "Year 1 revenue recognition - ASC 606 residue: recorded assertions, not verified compliance",
        "fiscal_period": {
          "month": 1,
          "quarter": 1,
          "year": 2026
        },
        "salesforce": {
          "revenue_schedule_id": "0RSxxxxxxx"
        }
      },
      "id": "ACC_REVENUE_RECOGNITION_Y1"
    }
  ],
  "anticipations": [
    {
      "F4": "scheduled_payment",
      "F10": 125000,
      "F22": [
        "ARR_SF_OPPORTUNITY"
      ],
      "F23": [
        "ACC_REVENUE_RECOGNITION_Y1"
      ],
      "F25": {
        "assumptions": {
          "payment_method": "wire",
          "payment_terms": "due_on_signing"
        },
        "description": "Expected Year 1 payment upon contract signing"
      },
      "F27": "2026-01-25",
      "F28": 0.99,
      "id": "ANT_CUSTOMER_PAYMENT"
    }
  ],
  "actions": [
    {
      "F4": "contract_execution",
      "F9": 0,
      "F12": "2026-01-20T14:30:00Z",
      "F15": "completed",
      "F22": [
        "ARR_SF_OPPORTUNITY",
        "ARR_SF_QUOTE"
      ],
      "F23": [],
      "F24": [],
      "F25": {
        "contract_id": "800Dn000001ABC1DEF",
        "description": "Contract signed via DocuSign",
        "docusign_envelope_id": "12345-abcde-67890",
        "signed_by": "Jane Smith, VP Operations"
      },
      "id": "ACT_CONTRACT_EXECUTION"
    },
    {
      "F4": "invoice",
      "F9": 125000,
      "F12": "2026-01-21T09:00:00Z",
      "F15": "issued",
      "F22": [
        "ARR_SF_OPPORTUNITY"
      ],
      "F23": [
        "ACC_REVENUE_RECOGNITION_Y1"
      ],
      "F24": [
        "ANT_CUSTOMER_PAYMENT"
      ],
      "F25": {
        "description": "Invoice generated from Salesforce CPQ",
        "due_date": "2026-02-20",
        "invoice_id": "a0BDn000001ABC1DEF",
        "invoice_number": "INV-2026-00089"
      },
      "id": "ACT_INVOICE_GENERATED"
    },
    {
      "F4": "payment_receipt",
      "F6": "Acme Corporation",
      "F9": 125000,
      "F12": "2026-01-25T11:00:00Z",
      "F15": "completed",
      "F16": "wire",
      "F21": [
        {
          "allocation_type": "full",
          "amount": 125000,
          "currency": "USD",
          "ref": "ANT_CUSTOMER_PAYMENT",
          "ref_type": "anticipation",
          "remaining_balance": 0
        }
      ],
      "F22": [
        "ARR_SF_OPPORTUNITY"
      ],
      "F23": [
        "ACC_REVENUE_RECOGNITION_Y1"
      ],
      "F24": [
        "ANT_CUSTOMER_PAYMENT"
      ],
      "F25": {
        "description": "Wire payment received from Acme Corporation"
      },
      "id": "ACT_PAYMENT_RECEIVED"
    }
  ],
  "component_hashes": {
    "accruals": "sha256:PLACEHOLDER",
    "actions": "sha256:PLACEHOLDER",
    "anticipations": "sha256:PLACEHOLDER",
    "arrangements": "sha256:PLACEHOLDER"
  },
  "merkle_root": "sha256:PLACEHOLDER",
  "blockchain_anchor": {
    "anchored_at": null,
    "block_height": null,
    "confirmation_time_ms": null,
    "kaspa_tx_id": null
  }
}

Canonical form — the hashed bytes

The canonical byte form is a single line: F-coded members in ascending numeric order, envelope members in their ruled enumeration, one legal spelling per number. The hash below is computed over exactly the bytes shown — copy the line into any SHA-256 tool to reproduce it.

{"F1":"SF_OPP_2026_Q1_ACME_ENTERPRISE","F2":"006Dn000004XyZ1ABC","F3":"CloudTech Solutions","F7":125000,"F8":"USD","F15":"closed_won","F25":{"compliance_flags":["ASC_606","SOX_404","Revenue_Recognition"]},"F26":"salesforce_opportunity","schema_version":"4.2","timestamp":"2026-01-22T10:00:00Z","arrangements":[{"F4":"sales_opportunity","F5":[{"jurisdiction":"US-CA","name":"CloudTech Solutions","role":"seller"},{"jurisdiction":"US-NY","name":"Acme Corporation","role":"buyer"}],"F7":125000,"F11":"2025-11-15T00:00:00Z","F25":{"annual_value":41666.67,"contract_term_years":3,"description":"Enterprise Cloud Platform - 3 Year Agreement","payment_terms":"Annual in advance","renewal_type":"auto_renewal","salesforce":{"account_id":"001Dn000003ABC1DEF","close_date":"2026-01-20","opportunity_id":"006Dn000004XyZ1ABC","opportunity_name":"Acme Corp - Enterprise Platform","owner_id":"005Dn000001XYZ9ABC","stage":"Closed Won"}},"id":"ARR_SF_OPPORTUNITY"},{"F4":"sales_quote","F5":[{"name":"CloudTech Solutions","role":"seller"},{"name":"Acme Corporation","role":"buyer"}],"F7":125000,"F11":"2026-01-10T00:00:00Z","F25":{"description":"Quote Q-2026-0142: Enterprise Cloud Platform","line_items":[{"product":"Enterprise Platform License","quantity":500,"total":100000,"unit_price":200},{"product":"Premium Support","quantity":1,"total":15000,"unit_price":15000},{"product":"Implementation Services","quantity":1,"total":10000,"unit_price":10000}],"related_arrangement":"ARR_SF_OPPORTUNITY","salesforce":{"quote_id":"0Q0Dn000000ABC1DEF","quote_number":"Q-2026-0142","status":"Accepted"}},"id":"ARR_SF_QUOTE"}],"accruals":[{"F4":"revenue_recognition","F17":"Calculated","F18":"hash_6a9c2e5f8b1d40616172a9b8c1d4e6f0","F19":{"license_ssp":100000,"performance_obligations":3,"services_ssp":10000,"support_ssp":15000,"total_contract_value":125000},"F20":41666.67,"F22":["ARR_SF_OPPORTUNITY","ARR_SF_QUOTE"],"F25":{"accounting_entry":{"credit":{"account":"2400-Deferred Revenue","amount":83333.33},"credit2":{"account":"4100-License Revenue","amount":33333.33},"credit3":{"account":"4200-Service Revenue","amount":8333.34},"debit":{"account":"1200-Accounts Receivable","amount":125000}},"description":"Year 1 revenue recognition - ASC 606 residue: recorded assertions, not verified compliance","fiscal_period":{"month":1,"quarter":1,"year":2026},"salesforce":{"revenue_schedule_id":"0RSxxxxxxx"}},"id":"ACC_REVENUE_RECOGNITION_Y1"}],"anticipations":[{"F4":"scheduled_payment","F10":125000,"F22":["ARR_SF_OPPORTUNITY"],"F23":["ACC_REVENUE_RECOGNITION_Y1"],"F25":{"assumptions":{"payment_method":"wire","payment_terms":"due_on_signing"},"description":"Expected Year 1 payment upon contract signing"},"F27":"2026-01-25","F28":0.99,"id":"ANT_CUSTOMER_PAYMENT"}],"actions":[{"F4":"contract_execution","F9":0,"F12":"2026-01-20T14:30:00Z","F15":"completed","F22":["ARR_SF_OPPORTUNITY","ARR_SF_QUOTE"],"F23":[],"F24":[],"F25":{"contract_id":"800Dn000001ABC1DEF","description":"Contract signed via DocuSign","docusign_envelope_id":"12345-abcde-67890","signed_by":"Jane Smith, VP Operations"},"id":"ACT_CONTRACT_EXECUTION"},{"F4":"invoice","F9":125000,"F12":"2026-01-21T09:00:00Z","F15":"issued","F22":["ARR_SF_OPPORTUNITY"],"F23":["ACC_REVENUE_RECOGNITION_Y1"],"F24":["ANT_CUSTOMER_PAYMENT"],"F25":{"description":"Invoice generated from Salesforce CPQ","due_date":"2026-02-20","invoice_id":"a0BDn000001ABC1DEF","invoice_number":"INV-2026-00089"},"id":"ACT_INVOICE_GENERATED"},{"F4":"payment_receipt","F6":"Acme Corporation","F9":125000,"F12":"2026-01-25T11:00:00Z","F15":"completed","F16":"wire","F21":[{"allocation_type":"full","amount":125000,"currency":"USD","ref":"ANT_CUSTOMER_PAYMENT","ref_type":"anticipation","remaining_balance":0}],"F22":["ARR_SF_OPPORTUNITY"],"F23":["ACC_REVENUE_RECOGNITION_Y1"],"F24":["ANT_CUSTOMER_PAYMENT"],"F25":{"description":"Wire payment received from Acme Corporation"},"id":"ACT_PAYMENT_RECEIVED"}],"component_hashes":{"accruals":"sha256:PLACEHOLDER","actions":"sha256:PLACEHOLDER","anticipations":"sha256:PLACEHOLDER","arrangements":"sha256:PLACEHOLDER"},"merkle_root":"sha256:PLACEHOLDER","blockchain_anchor":{"anchored_at":null,"block_height":null,"confirmation_time_ms":null,"kaspa_tx_id":null}}

Canonical-bytes SHA-256: 44c1012da0f0e251eeb8b6b195887e23e6a91cba8bb2c83984f3ef7d1d0799d7

Validated against the live validator (POST /api/validate-foray): 0 errors, 0 warnings.