SDK reference
Core concepts

Business results

Separate successful execution from what the process accomplished.

Status and result together

An import can complete and still skip records. A failed order can have already captured payment. Report the facts someone needs to decide what happens next.

run.done({
  result: { imported: 988, skipped: 12 },
})

result is an optional bounded JSON-safe object on done() or fail(). Choose a small, explicit summary from your application's return value. Never pass an entire response, invoice collection, or raw function result without reviewing what it contains.

Three different kinds of information

InformationExampleAPI
Context: what this execution concernsbatchId, provider, environmentworkflow() / setProperties()
Progress: what was last reported so far600 of 1,000 products updatedprogress()
Result: what the run produced988 imported, 12 skippeddone({ result }) / fail({ result })

A failed run can still report what it produced before stopping. Use that summary together with checkpoints, progress, and the failure code.

Make summaries useful to people

Prefer domain names and small counts: imported, skipped, booked, or shipmentId. Technical status codes alone rarely explain the outcome to someone outside engineering.

Flowmark displays the summary your code attaches. Review what you put in result, especially for browser instrumentation.

Bounds and privacy

Results share the same JSON bounds as properties. Avoid credentials, personal data, raw errors, and payment details. See done() and fail() for terminal behavior.

On this page