AXTHORM

© AXTHORM

Developer library

Build AI into a business workflow

The AI can interpret a customer’s message. The order system owns inventory, payments and fulfilment.

Walkthrough

1. Interpret

Extract the requested product, variant and quantity; ask when the request is ambiguous.

2. Verify

Read live inventory and quote from the backend; request confirmation before creating checkout.

3. Fulfil

Act on verified payment events and route exceptions to staff.

Worked example

Keep explicit order states so a payment event cannot skip the staff review required for an exception.

Open the example
JavaScript · order state example
const nextState = {
  awaiting_payment: ["paid", "cancelled"],
  paid: ["ready_to_fulfil", "needs_review"],
  needs_review: ["ready_to_fulfil", "refunded"],
};

Try it yourself

What should mark an order as paid?