Internal system · Orders, sales and purchasing
An order that prepares itself
The situationGkazas imports olive oil and sells it to wholesalers and shops. Orders arrived as email with an attachment and were retyped into Salesforce by hand, and purchasing was planned on instinct and a pivot table. We turned that into two things running on the same data: an order desk that prepares the work, and a monthly forecast per article that purchasing steers on.
- One model call per email
- Classify and extract, with the sentence every figure came from attached. That is the whole of the language model in it.
- Money is ordinary code
- Prices come from the live price list, discounts from the promotion calendar per wholesaler per week, and the carrier from the rule table. The model touches none of it.
- Nothing leaves without a person
- Salesforce is shown a prepared transaction and the customer gets a draft in the existing thread. Someone reads it over and presses send.
- Doubt is an outcome
- An unknown article, a customer that cannot be matched, a complaint rather than an order: anything uncertain goes to a separate pile for a person.
- A model per article
- For every article a machine-learning model is weighed against a handful of simpler statistical ones, on a test that walks forward a month at a time. Whichever predicted that article best wins. For articles that only move now and then, that is often the simple one.
- A range, not a number
- Every forecast comes with a low and a high, calibrated against the months that have since been and gone. So you can see per article which are worth steering on and which need buying wide.
- Promotions are in the model
- The same promotion calendar the order desk prices from goes into the model as a feature. A planned promo week changes the forecast before it happens.
- It lands where they already work
- Retrained every month and pushed back into Salesforce, so purchasing sees the numbers in the system they already have open.
- 01
The email arrives
Attachment and all, exactly as the customer sent it.
purchasing@example.com
Order week 38
Hi, here is the order for week 38.
Delivery to the depot as usual.
order-4471.pdf - 02
The lines are read
Article numbers and quantities out of the attachment.
- EVOO-500120
- SOW-2540
- TAP-18015
- 03
The customer is matched
Joined to the account that exists, with two years of history.
Example Company
- Account
- Wholesale
- Standing terms
- Tier B
- Last order
- 9 Sep
- 04
The price follows the agreement
From the price list, with this week's promotion applied.
Tier B, promo week€ 4,318.50
- 05
The draft is waiting
Confirmation written, nothing sent yet.
Check and send- EVOO-500120
- SOW-2540
- TAP-18015
€ 4,318.50
- 06
Purchasing works ahead
A trained model per article, with a range around it, retrained every month.
EVOO-500Per article, per monthHistoryForecastRange

