Salesforce  /  Use Cases  /  01 · AmLaw firm signs an Opportunity close intent before the wire
01 STANDARD Financial Services / Legal

AmLaw firm signs an Opportunity close intent before the wire

Outside counsel proves to the client org that the close was sanctioned, before treasury releases the funds.

01Scenario

An AmLaw 200 firm using Salesforce Service Cloud closes an Opportunity tied to a $14M client settlement. The firm's treasury workflow refuses to release any wire unless a counterparty-verifiable receipt of the close decision is present in the client's org.

When the partner agent fires opportunity.close.intent, HiveForce mints an Ed25519-signed receipt, lands it on the Opportunity in the firm's org, and replicates an INBOUND receipt to the client's Account record. If the receipt fails JCS verification on the client side, the After-Insert trigger rolls back the action and the wire is blocked at the gate.

The receipt is portable. Outside auditors and the firm's malpractice carrier can verify it from a JSONL line alone — no Salesforce login required.

02Handles

action_type
opportunity.close.intent
handle
HiveReceiptMinter.mint(Id, Map<String,Object>)
lands on
Opportunity
rail
STANDARD $0.50/receipt, Hive-billed

03APEX

Opportunity opp = [SELECT Id, Amount, AccountId, Owner.Name, Account.Name
                     FROM Opportunity WHERE Id = :oppId];

Map<String, Object> payload = new Map<String, Object>{
  'opportunity_id'    => opp.Id,
  'amount_usd'        => opp.Amount,
  'counterparty_acct' => opp.Account.Name,
  'closing_partner'   => opp.Owner.Name,
  'closing_basis'     => 'settlement_agreement_executed',
  'wire_required'     => true
};

Id receiptId = HiveReceiptMinter.mint(
  opp.Id,                                  // anchor record
  'opportunity.close.intent',              // action_type
  'did:hive:0xClientCounterparty',         // counterparty DID
  'salesforce:opportunity:' + opp.Id,      // scope
  payload                                  // JCS-canonicalized
);

// Trigger fires synchronously. If verification fails,
// receipt.Verification_Status__c = FAILED and the
// HiveReceiptInsertTrigger throws DmlException — the
// Opportunity update is rolled back atomically.

04Flow XML

<Flow xmlns="http://soap.sforce.com/2006/04/metadata">
    <processType>AutoLaunchedFlow</processType>
    <start>
        <connector><targetReference>mint_close_intent</targetReference></connector>
        <object>Opportunity</object>
        <recordTriggerType>UpdatedAndConditionMet</recordTriggerType>
        <filters>
            <field>StageName</field><operator>EqualTo</operator>
            <value><stringValue>Closed Won</stringValue></value>
        </filters>
        <triggerType>RecordAfterSave</triggerType>
    </start>
    <actionCalls>
        <name>mint_close_intent</name>
        <label>Mint Hive close-intent receipt</label>
        <actionName>HiveReceiptMinter</actionName>
        <actionType>apex</actionType>
        <inputParameters>
            <name>recordId</name>
            <value><elementReference>$Record.Id</elementReference></value>
        </inputParameters>
        <inputParameters>
            <name>actionType</name>
            <value><stringValue>opportunity.close.intent</stringValue></value>
        </inputParameters>
    </actionCalls>
    <status>Active</status>
</Flow>

05The receipt that lands in Hive_Receipt__c

{
  "agent_id": "did:hive:0xFirmPartnerAgent",
  "counterparty_did": "did:hive:0xClientCounterparty",
  "action_type": "opportunity.close.intent",
  "scope": "salesforce:opportunity:0061a00000XYZ",
  "action_ref": "sha256(did:hive:0xFirmPartnerAgent||opportunity.close.intent||salesforce:opportunity:0061a00000XYZ||1716333215000)",
  "payload_hash": "sha256:7a3b9e...c14f",
  "signature": "ed25519:5e91c2...e0a4",
  "timestamp_ms": 1716333215000,
  "jurisdiction": "US-CA",
  "direction": "OUTBOUND",
  "verification_status": "VERIFIED",
  "skip_verification": false
}

06Verification

Verify the receipt from JSONL alone (no Salesforce access)

curl -sS https://hivemorph.onrender.com/v1/verify \
  -H 'content-type: application/json' \
  --data-binary @receipt.json | jq

# expected:
# {
#   "verified": true,
#   "action_ref_matches": true,
#   "signature_valid": true,
#   "pubkey": "fd9d10abe60de7510c61ef649c8da598a519468dd2a2b827106d76487a899444",
#   "jurisdiction": "US-CA"
# }

07Economics

Per-receipt fee$0.50 (Standard rail)
Free tierFirst 100 receipts/month free
Monthly cap$499 — above 998 receipts/mo, additional are no-charge
Typical AmLaw 200 firm~40 settlement closes/mo → $20/mo, under the free cap
Billed viaSquare invoice or Hive monthly ACH (firm picks at signup)
Audit shapeJSONL portable; SOC-2 + bar-counsel + malpractice carrier compatible

08Compliance and audit shape

  • Receipt is a Federal Rules of Evidence 902(14) self-authenticating digital record (Ed25519 signature, hash-bound preimage).
  • Privilege boundary: receipt encodes only metadata (Opportunity Id, counterparty Account, closing basis) — no privileged communication is signed or transmitted.
  • Retention: receipts land in Hive_Receipt__c and are subject to the firm's existing Salesforce retention policy. Hive does not retain receipt bodies; only the Ed25519 attestation hash.

09Trust anchors

Every claim on this page is verifiable against these public constants. No login. No NDA.

RailSTANDARD — $0.50/receipt, Hive-billed
Hive Ed25519 pubkeyfd9d10abe60de7510c61ef649c8da598a519468dd2a2b827106d76487a899444
CanonicalizationRFC 8785 JCS over the JSON receipt body
Signature algorithmEd25519 (RFC 8032)
Backend roothttps://hivemorph.onrender.com
Verify any receiptthehiveryiq.com/verify
MIT starterthehiveryiq.com/salesforce/install
Billing$0.50/receipt, 100/mo free, $499/mo cap. Square invoice or monthly ACH — buyer picks.
Pricingthehiveryiq.com/pricing