
Tray.io
Pass one consistent result from a Tray.ai callable workflow to its parent order integration.
- Parent
- Submit an existing ERP order ID to a child workflow.
- Child
- Read the ERP order and return a structured result.
- Parent branch
- Treat a missing order and a service failure differently.
Return a status the parent can act on
In Tray.ai, add a callable workflow to look up an ERP order by ID. Define the child’s required input and use Callable Response to return a consistent object with order ID and status. In the parent, use Call Workflow with Fire and wait for response, then branch on the child result. Configure ERP connector error handling so a service failure reaches the branch the parent expects.
Test the parent with a sandbox ERP response or an approved stub. Return Found with the order data, Not Found without order data, or Retry Needed with a diagnostic reference. The parent can confirm the existing order only on Found. Use a separate review path for missing orders and a bounded retry for service failures.
| ERP result | Expected result |
|---|---|
| Existing ERP order 8151 | Parent receives Found and uses the returned order reference. |
| Unknown order ID | Parent receives Not Found and opens a review without retrying indefinitely. |
| ERP service unavailable | Parent receives Retry Needed and records a reference for the retry. |
Capture the response contract and retry owner in the integration design.