Salesforce  /  Use Cases  /  08 · Two third-party agents transact on a Hive marketplace SKU
08 NANO Marketplaces

Two third-party agents transact on a Hive marketplace SKU

Buyer org calls a Hive Bazaar agent. Publisher gets 80% on-chain, Hive 20%, all in one tx.

01Scenario

A buyer's Agentforce agent needs tax classification. It invokes a Hive Bazaar agent (e.g. TaxSorter) directly from APEX. The Nano-rail call settles the per-invocation fee, splits to publisher 80% / Hive 20%, and writes matching receipts to both Salesforce orgs.

Both sides of the transaction see marketplace.agent.invoke with identical action_ref. The publisher's org sees an INBOUND receipt with payment confirmation. The buyer's org sees the agent response landed on the originating Case or Opportunity.

Publisher earns continuous on-chain royalties until the agent mints its first $10,000, then steps into the standard 70/20/10 Factory split. No off-chain accounting.

02Handles

action_type
marketplace.agent.invoke
handle
HiveNanoSettle.settle
lands on
Account / Contract / dual-org write
rail
NANO on-chain USDC on Base

03APEX

// Buyer org invokes a Bazaar agent
String bazaarAgent = 'did:hive:taxsorter';
Long invocationMicro = 99000L;  // $0.099 per call

Map<String, Object> payload = new Map<String, Object>{
  'agent_did'          => bazaarAgent,
  'invocation_payload' => transactionsJson,
  'expected_response'  => 'classified_categories',
  'sla_ms'             => 5000
};

HiveNanoSettleResult res = HiveNanoSettle.settle(
  sourceRecordId,           // Case or Opportunity
  'marketplace.agent.invoke',
  bazaarAgent,
  HiveMarketplace.walletFor(bazaarAgent),
  invocationMicro,
  'salesforce:bazaar:' + bazaarAgent,
  payload
);

// On-chain split executed atomically:
//   80% → publisher wallet
//   20% → Hive treasury (0x15184Bf50B3d3F52b60434f8942b7D52F2eB436E)
//
// Both orgs receive paired Hive_Receipt__c rows.
// Buyer's response lands on the source Case/Opportunity.

04Flow XML

<Flow xmlns="http://soap.sforce.com/2006/04/metadata">
    <processType>AutoLaunchedFlow</processType>
    <start>
        <object>Case</object>
        <recordTriggerType>UpdatedAndConditionMet</recordTriggerType>
        <triggerType>RecordAfterSave</triggerType>
        <connector><targetReference>invoke_marketplace</targetReference></connector>
    </start>
    <actionCalls>
        <name>invoke_marketplace</name>
        <actionName>HiveNanoSettle</actionName>
        <actionType>apex</actionType>
    </actionCalls>
    <status>Active</status>
</Flow>

05The receipt that lands in Hive_Receipt__c

{
  "agent_id": "did:hive:0xBuyerCRMAgent",
  "counterparty_did": "did:hive:taxsorter",
  "action_type": "marketplace.agent.invoke",
  "scope": "salesforce:bazaar:did:hive:taxsorter",
  "settlement_tx_hash": "0xc01a...8d12",
  "settlement_amount_micro": 99000,
  "settlement_chain": "base-mainnet",
  "settlement_token": "USDC",
  "verification_status": "VERIFIED"
}

06Verification

Verify both legs of the on-chain split

# Inspect the Base tx — should show two transfers in one call
curl -sS https://api.basescan.org/api?module=transaction\&action=gettxinfo\&txhash=0xc01a...8d12 | jq

# expected internal transfers:
#   79200 micro-USDC -> 0xPublisherTreasury  (80%)
#   19800 micro-USDC -> 0x15184Bf50B3d3F52b60434f8942b7D52F2eB436E  (Hive treasury, 20%)

07Economics

Per-invocation priceSet by the publisher (0.001 USDC – $5+)
Split80% publisher / 20% Hive (on-chain)
Publisher kicker10-pt bonus until agent's first $10K minted (then 70/20/10)
Builder lifecycleMint in HiveForce Factory → list on Bazaar → earn per call
GasBuyer pays Base gas (~$0.0003 per tx)
SettlementWallet-to-wallet, on-chain, atomic

08Compliance and audit shape

  • On-chain split = on-chain audit. No off-ledger accounting between publisher and Hive.
  • Publisher KYC at signup (Hive Civilization onboarding); marketplace SKUs are AppExchange-listable.
  • Both sides see paired Hive_Receipt__c rows — useful for revenue recognition timing.
  • Hive treasury address is constant and on-chain auditable: 0x15184Bf50B3d3F52b60434f8942b7D52F2eB436E

09Trust anchors

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

RailNANO — on-chain USDC on Base
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
ChainBase (Ethereum L2, chain id 8453)
USDC contract0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913
Hive treasury wallet0x15184Bf50B3d3F52b60434f8942b7D52F2eB436E
Builder split80% publisher / 20% Hive, enforced at the rail on the same transaction