Tools

Orders and catalog

Orders customers placed through WhatsApp, and the catalog they ordered from.

list_orders

Orders in one project, filtered by the server. Each row has the order number, its fulfillment and payment status, the total, the customer and the assignee.

project_slugstringrequired

The project to read.

statusstring

Fulfillment stage, one per call: new, confirmed, processing, shipped, ready_for_pickup, completed or cancelled.

payment_statusstring

Payment state, separate from the stage: pending (not yet recorded how it is paid), paid or cod (cash on delivery).

assigned_tostring

An agent's user id, me for the connected account, or unassigned.

customerstring

Matches the customer's name or phone number.

fromstring

ISO date. Orders placed on or after it.

tostring

ISO date. Orders placed on or before it.

limitintegerdefault: 25

Rows to return, from 1 to 100.

Ask it things like

  • "Which orders in acme-store are assigned to me and still processing?"
  • "Show cash on delivery orders placed this week that have shipped."
  • "Which orders have been sitting in confirmed since before Monday?"

"Stuck" is not a status. An order is stuck when it has stayed in an early stage too long, so filter status to new, confirmed or processing and set to to the date it should have moved by.

get_order

One order in full: its line items, how its status changed over time, and whether the customer was notified successfully at each step.

Use it after list_orders to explain what happened to a specific order.

project_slugstringrequired

The project the order belongs to.

order_idstringrequired

The order id, from list_orders.

Ask it things like

  • "Why does the customer on order 1042 say they never heard back?"
  • "When did order 1042 move to shipped?"

list_products

Products in the project's catalog, with price and availability.

Use it to check whether something is listed, what it costs, or whether stock is why an order could not be filled.

project_slugstringrequired

The project whose catalog to read.

searchstring

Matches the product name.

limitintegerdefault: 25

Rows to return, from 1 to 100.

get_catalog_status

Whether the project's catalog is connected to Meta, and when it last synced.

Start here when products are missing from WhatsApp, or a sync seems to have stalled.

project_slugstringrequired

The project whose catalog to check.