{"revision":"c10276e953456835cdbb1f3a60d58ae1980be353","document":{"id":50927,"path":"source-to-pay-operations/supplyon-async-callback-schema.md","title":"SupplyOn async callback request schema and branches","bundle":null,"doc_type":null,"release":"australia","body":"\n# SupplyOn async callback request schema and branches\n\nThe request schema of the async status callback, the correlation contract, the processing branches, and sample payloads.\n\nThe async callback endpoint is `POST /api/sn_supplyon_po/supplyon_outbound_po_async_callback`. The request body follows the SupplyOn status notification schema, a pure status acknowledgment:\n\n-   **uuid** \\(required\\): The correlation key. Equals the synchronous 201 transaction ID.\n-   **status** \\(required\\): Strictly OK or ERROR.\n-   **Errors** \\(optional\\): A list of items, each with a Code and Text.\n\nNo line-level positions ride the callback. Supplier confirmations come only from the confirmation pull.\n\nCorrelation contract. The send subflow stamps `SON-TXN:<TransactionID>` into the outbound header message at status 20. The callback uuid is that transaction ID, so the subflow looks up the row by message and then overwrites the message with the outcome text. The subflow does not use **erp\\_number** for correlation. On the success branch only, the subflow stamps **erp\\_number** with the order number so the framework **Handle Status Change** business rule fires on status 30.\n\n|Branch|Condition|Behavior|\n|------|---------|--------|\n|Invalid body|No uuid, or unparseable|Logs an error. Nothing is updated.|\n|No matching row|Valid uuid, no header message matching the token|Logs a warning. Safe no-op. The flow returns HTTP 200 \\(no retry storm\\).|\n|Success|status = OK|Header and lines move to 30 \\(Processed\\). Header erp\\_number set to the order number. Message set to a success note.|\n|Failure|status = ERROR|Header and lines move to 40 \\(Failed\\). Message set to the error category and verbatim error text. No erp\\_number write.|\n\nHeader and lines move in lockstep in both branches. A duplicate or re-delivered callback re-applies the same status \\(idempotent\\). An unexpected error in the subflow is caught by the native Error Handler.\n\n## Sample callback payloads\n\n```\n// Success\n{ \"uuid\": \"2491C8AF4F962D2CCB87CC102AFCXXXX\", \"status\": \"OK\", \"Errors\": [] }\n\n// Failure\n{\n  \"uuid\": \"2491C8AF4F962D2CCB87CC102AFCXXXX\",\n  \"status\": \"ERROR\",\n  \"Errors\": [{ \"Code\": \"BOOK_017\", \"Text\": \"Order rejected: unknown supplier for routing triple.\" }]\n}\n```\n\n"}}