Zorqelio / Inventory destination integration
A complete protected inventory write
Deploy a separate Cloudflare Worker and D1 database in your own account. The example includes the destination endpoint, guarded SDK client, atomic inventory updates, durable business-operation receipts and a reconciliation lookup. It is a reference integration, not a Shopify connector.
Download the runnable integration · SHA-256 checksum
Set up the destination
tar -xzf zorqelio-inventory-destination.tgz cd zorqelio-inventory-destination npm install --save-dev wrangler npx wrangler d1 create my-protected-inventory # Replace the placeholder database ID in wrangler.toml. npx wrangler d1 execute my-protected-inventory --remote --file=schema.sql npx wrangler secret put DESTINATION_TOKEN npx wrangler deploy npm install https://zorqelio.xyz/downloads/zorqelio-sdk-js-0.3.0.tgz
Authorize the integration service
Create the example policy through guided setup. Create a restricted agent key with evaluate, inspect and execute permissions for that workflow and policy. Configure these server-side secrets and settings: ZORQELIO_AGENT_KEY, ZORQELIO_POLICY_ID, ZORQELIO_WORKFLOW, INVENTORY_DESTINATION_URL, INVENTORY_DESTINATION_TOKEN, BUSINESS_OPERATION_ID and HANDOFF_OPERATION_ID. Pin policy/contract versions when they differ from version 1.
node run.mjs payload.json # If a claim or destination result is uncertain, inspect first: node run.mjs --reconcile
Two identifiers with different purposes
The handoff ID identifies one checked payload and authorization. A corrected payload needs a new stable handoff operation ID. The business operation ID identifies the supplier event across restarts and re-evaluations. The destination atomically commits the item and receipt; repeated identical business operations return the stored receipt, while conflicting payloads return 409.
Handling uncertainty
A found receipt proves this destination committed its update; compare it with the intended payload. An unavailable lookup does not prove failure. Do not automatically repeat a business action after an unknown outcome. A new handoff can reuse the same business ID after confirmed absence and operator review.
The integration service holds the destination credential; an untrusted agent should not receive it. Code holding destination access can bypass the SDK, so normal application authorization still matters. This example incurs resources in the customer's Cloudflare account when deployed; it is not pre-deployed into Zorqelio production.