Skip to content
Indiana
Dashboard
Docs
Browse docs / Funnel backend orchestration

Funnel backend orchestration

Send custom receipts, read node results and integrate signed HTTPS tasks with durable retries.

SDK 0.0.1Updated

Send business receipts and read results

npm @tinkerlandai/indiana-sdk@0.0.1 exports createFunnelOrchestrationClient. Use the App/environment backend Secret Key with sessions:create and funnels:run. Declare the event name and data fields in a Funnel wait node and publish. Hosts must verify business events and run ownership. Browsers cannot send receipts, and custom receipts cannot assert payment success.

Receipts may arrive before the wait node. Retry the same eventId and data; changed data conflicts. Each Run/wait node accepts one receipt; timeout or termination rejects new receipts. Conditions and tasks reference consumed results as nodeId.field. Unexecuted or unconsumed results remain absent.

server/funnel-receipts.ts · fragmentTypeScript
import { createFunnelOrchestrationClient } from "@tinkerlandai/indiana-sdk/server"; const orchestration = createFunnelOrchestrationClient({  baseUrl: process.env.GROOVE_BASE_URL!,  apiKey: process.env.GROOVE_SECRET_KEY!,  scope: { projectId: process.env.GROOVE_PROJECT_ID!, environment: "sandbox" },});// Save eventId and this complete input with your verified business event.const receipt = await orchestration.signal({  runId: verifiedRunId,  nodeId: "offer_receipt",  eventName: "offer_used",  eventId: retainedEventId,  data: { used: true },});const { results } = await orchestration.readResults(verifiedRunId);// accepted acknowledges receipt; results appear only after node consumption.

External HTTPS tasks and retries

Bind an enabled Sandbox notification endpoint to an external-task node and declare taskKey, input mappings and output types. Verify X-Grow-Signature as HMAC-SHA256(timestamp + '.' + raw body), checking the time window and X-Grow-Key-Id. Do not reserialize JSON before verification. Deduplicate by eventId (Action Receipt ID); delivery is at least once.

Return { outcome: 'success', data: { ...declaredFields } }; failure is a business rejection. 429, 5xx and transient transport errors retry within the frozen budget; ordinary 4xx and type errors do not. Recovery preserves input, Receipt ID, deadline and spent attempts. Current execution is serial with receipt waits, without parallel/join. External calls are Sandbox-only, public HTTPS on port 443 without redirects, with up to 8 KiB/20 data fields.