Custom order (Claude order)
foran_custom_orderCreates a Foran order from product names, shopping lists, or photos, combining catalogue and custom items from one store; returns a quote first, then submits a pending cash-on-delivery order.
Instructions
Create a Foran order from what the customer sent: product names, a shopping list, or photos. Mix catalogue items (item_id) with custom items that are not in the app (name + estimated_price_rs). All items must be bought from ONE store: pick the nearest open store that has most items (foran_list_stores / foran_search_products). The order lands in the Foran admin panel as a pending 'Claude order' with the photos attached; the team confirms custom prices before dispatch. Who can use it: a logged-in customer (session_key; the order goes on their account) or Foran staff (staff_session; any customer name + phone, e.g. a WhatsApp customer). ALWAYS call first WITHOUT confirm: it returns the quote (items, delivery charge, MCP fee Rs 150, total, warnings). Show it to the user, and only after a clear yes call again with the same inputs and confirm=true. Cash on delivery.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| note | No | Anything else for the team / rider. | |
| road | No | Street / lane / block. | |
| house | No | ||
| items | Yes | ||
| images | No | Photos the customer sent (product photos, a handwritten list, a prescription). | |
| address | Yes | Full delivery address as given: house, street, precinct/area, city. | |
| channel | No | Where the request came from, e.g. 'WhatsApp', 'Claude chat', 'Instagram DM'. | |
| confirm | No | true ONLY after the user approved the quote. | |
| latitude | No | Map pin (from foran_find_location or a shared WhatsApp location). Without it the minimum delivery charge is used and the team confirms the address. | |
| store_id | Yes | The one store to buy from. | |
| longitude | No | ||
| address_id | No | Customer mode: a saved address_id from foran_my_addresses (fills address + pin). | |
| session_key | No | Customer mode: session_key from foran_login. | |
| customer_name | No | Staff mode: customer's name (e.g. WhatsApp profile name). | |
| staff_session | No | Staff mode: staff_session from foran_staff_login. | |
| customer_phone | No | Staff mode: customer's mobile, e.g. 03001234567. |