Quick Overview
This workflow receives order exception events via a webhook, gathers order/customer/inventory context from your OMS APIs, asks Anthropic Claude to select a single approved resolution action, and then executes that action via payment, shipping, or OMS APIs or escalates to Slack, with pre/post execution logging.
How it works
- Receives an order exception payload via a webhook (or a manual test payload).
- Fetches order details, customer profile/history, and inventory/substitute SKU options from your OMS and related APIs and combines them into a single context.
- Sends the exception context to Anthropic Claude and asks it to return one action from a fixed allow-list with the required parameters.
- Validates and, if needed, overrides the AI decision based on hard policies (allowed actions, fraud flag, approval thresholds, and refund/credit limits).
- Logs the approved/overridden decision before execution and routes to the matching executor to call the payment API, carrier/shipping API, or OMS API, or escalates the case to a Slack channel.
- Merges the execution outcome, records the post-execution result, and notifies the customer via an OMS notification endpoint unless the case is escalated.
Setup
- Add HTTP Header Auth credentials for your OMS/order API, customer API, inventory API, payment processor API, carrier/shipping API, and the Anthropic API.
- Add Slack credentials and set the target escalation channel ID in the configuration values.
- Update the configuration values for API base URLs, audit log sheet ID, and policy limits (refund/credit caps and human-approval threshold).
- If using the webhook trigger, copy the webhook URL and configure your OMS/order platform to POST exception events to it.