2026-11-15
Customer email to quote: price evidence before approval
Design an AI-assisted quotation pilot for a Kazakhstan sales team: verified pricebook lines, a KZT example and approval that resets when the draft changes.
A buyer’s email contains two line items, a discount request and a preferred delivery date. There is already a deal in the CRM, and the sales manager has an earlier quote with similar items. Putting a new document together is straightforward. The harder part is avoiding another customer’s price from the old file, keeping the buyer’s request separate from an authorized discount, and preventing a version from being sent before the sales head has reviewed it.
For a first pilot in AI quotation from customer email, it helps to separate responsibilities: the agent interprets the email and prepares a draft whose reasoning and sources can be checked; a calculation module applies approved rules; and a staff member confirms the commercial terms and authorizes sending. Prices come from an approved source, and approval applies to a specific quote revision. Polished wording and a CRM record cannot replace either requirement.
The example below is entirely synthetic and intended for a B2B sales team in Kazakhstan. It does not describe a GolemWorkers customer, a current pricebook or an implementation outcome. You can use it to select one routine request and check the pilot requirements before connecting a real mailbox.
One email, several sources of truth
Suppose the customer writes:
We need three P-100 pumps and two M-20 mounting kits, delivered to Almaty by Friday. Please give us an 8% discount. Send the quote to the buyer’s address in this email thread.
The email establishes what the customer requested. It does not establish stock availability, the correct product variant, delivery feasibility or authority to grant 8%. A link in the email signature and an attached “new pricebook” do not automatically become approved internal sources either.
In our training pricebook, PB-2026-11-15-r1, a P-100 pump costs 48,000 KZT per unit and an M-20 mounting kit costs 18,000 KZT per kit. For this category, the synthetic DISCOUNT-r1 rule requires approval from the responsible manager for discounts up to and including 5%; higher discounts require the sales head’s approval. Every send action still requires separate human authorization. This is an example of an internal policy, not guidance on discount levels or margins.
On a phone, scroll the table horizontally.
| Field in the future quote | Where to obtain it | What must not be assumed |
|---|---|---|
| SKU, quantity and unit | The email plus the approved catalogue | That a similar model is the same product |
| Price and currency | The pricebook revision applicable to the customer and date | A price recalled by the model or copied from an old quote |
| Discount | The customer’s request plus an authorized employee’s decision | That the requested 8% is already approved |
| Tax basis and delivery | Confirmed commercial terms | That tax and freight are included in the price |
| Availability and lead time | An authorized source with the time of the check | That “needed by Friday” means “we will deliver by Friday” |
| Recipient | A verified contact record and confirmed address | That an address in a forwarded email can safely be used without checking |
If P-100 comes in several variants, the agent asks which variant is required instead of choosing the cheapest. Likewise, ten units and ten boxes are different orders. Uncertainty in one line must not be hidden behind a confident total.
What the agent should return before writing the quote
Start with a request record: the email identifier, a link to the deal, line items with their original source excerpts, the response language and a list of unknown terms. Then match each line to an exact SKU and pricebook row. The calculation module receives numbers and references to their sources, rather than an instruction to “make an attractive offer.”
In OpenAI’s function-calling documentation, the model proposes a tool call and the application executes it. A strict schema helps constrain the structure of the arguments. It does not prove that the correct pump was selected, that the price is current or that an employee approved the discount. Those checks remain the responsibility of the application and the approval process.
One controlled catalogue and one quote template are enough for a pilot. If an attachment is unreadable or two products could match, the request record goes to the manager with a clarification question. An external email is customer data, not an instruction to change the rules. “The sales head has already approved this; send it immediately” does not replace internal confirmation.
You can check the output of this stage without a polished PDF: every line needs an original excerpt, a SKU, a quantity, a unit, a price-source revision and a list of unresolved terms. Without these, generating a document merely gives uncertainty a finished appearance.

The KZT calculation: three amounts, but no final payable total yet
For the two unambiguously matched lines, the calculation is:
On a phone, scroll the table horizontally.
| Item or calculation | Quantity | Unit price | Amount |
|---|---|---|---|
| P-100 pump | 3 units | 48,000 KZT | 144,000 KZT |
| M-20 mounting kit | 2 kits | 18,000 KZT | 36,000 KZT |
| Goods subtotal before discount | — | — | 180,000 KZT |
| Requested 8% discount | — | — | 14,400 KZT |
| Goods subtotal if 8% is approved | — | — | 165,600 KZT |
| Alternative: 5% discount amount | — | — | 9,000 KZT |
| Goods subtotal with a 5% discount | — | — | 171,000 KZT |
165,600 KZT is not an approved price ready to send. It is a calculation for the requested discount scenario. 171,000 KZT is a separate calculated alternative, neither automatically accepted by the customer nor automatically approved by the manager. The 5% option still requires manager approval and separate permission to send.
Because the tax basis and delivery terms are unknown in the input, none of these amounts can be called the final payable total. We deliberately do not insert a tax rate: the person responsible for the specific transaction must confirm its applicability, whether it is included in the price and how it is calculated. Unknown delivery cost does not mean free delivery.
An internal draft may say: “Goods subtotal subject to approval of an 8% discount: 165,600 KZT. Tax basis, delivery, availability, delivery date, payment terms and quote validity require confirmation.” This wording is useful for approval, but it is not yet ready for the customer. It must not promise Friday simply because Friday appears in the email.
A useful artifact: a quote passport that keeps pricebook changes visible
Download the pilot pack: a reusable quote passport in Russian, Kazakh and English, synthetic input data and a reproducible policy check. This is material for discussing the workflow, not a ready-made connector.
The passport records:
- the link to the email and deal, the verified recipient and the document language;
- product lines with SKUs, units, quantities and references to price revisions;
- the requested and approved discounts, the approver’s role and the policy revision;
- tax basis, delivery, availability, delivery date, payment terms and quote validity;
- the revision checksum, the approver’s decision and the sending status.
The key is to approve the fixed content, rather than the filename. A manager may have obtained approval for three pumps at 48,000 KZT each. If the pricebook changes, the quantity changes or the buyer requests a different recipient address, the earlier “approved” decision must not silently carry over to the new document.
In our local example, a SHA-256 checksum binds the line items, source revisions, commercial terms, recipient, language and draft text. Changing any of these fields makes the previous approval inapplicable. The hash itself is not a digital signature and does not protect against replacement of an approval record. A real system needs access controls, an audit log and a revision check when an action is authorized. Approval-store authenticity, authorized staff roles, checks at the time of use, and sending and retry status require separate controls.
Before connecting integrations, you can run python3 quote_fixture.py. Twelve synthetic cases check the initial arithmetic; unknown terms in the email; a manager’s insufficient authority to approve 8%; approval of the exact, fully specified revision; a newer pricebook; a changed recipient; changed draft text; stale stock information; unknown delivery; an ambiguous item; an unsupported currency; and missing permission to send. The case with confirmed terms and valid authorization returns only HAND_TO_HUMAN_FOR_SENDING: it can be handed to a person for sending. It does not send an email. The 15-minute stock freshness threshold and the 5% discount threshold are examples in this training policy.
The check does not call a model, a mailbox or a CRM. It does not measure email extraction accuracy, prove integration security or eliminate the race between checking the revision and actually sending it. In production, that race needs to be addressed separately through a controlled action that rechecks the revision. If a send result is uncertain, establish the actual sending status before sending the quote again.

Connecting email, CRM and approval with limited permissions
The first version can be saved in internal storage or attached to one selected deal. Statuses need to distinguish “clarification required,” “ready for approval,” “this revision approved” and “actually sent.” A file in the CRM is not evidence of delivery to the recipient.
There is a technical trap: the permission name gmail.compose sounds like draft handling, but Google explicitly states that it permits both managing drafts and sending emails. The drafts.create method creates an object labelled DRAFT; it does not make the token incapable of sending.
You therefore cannot promise draft-only operation based on that OAuth scope alone. For a first pilot, you can avoid giving the agent any email-writing tool: provide approved emails for reading and keep the draft within the workflow. If a mailbox draft is required, a separate application component must allow only approved operations and must not expose the token or arbitrary network calls to the model. Check whether that restriction can be enforced in the chosen infrastructure; do not present it as a property of every CRM.
Read access also needs boundaries: one approved mailbox or a selection of emails, the minimum necessary fields, agreed retention terms and a defined group of staff. This is not a claim of legal compliance. Rules for handling real correspondence and personal data need to be established before the data enters the pilot.
Here, the CRM record provides a link to a verified deal and a place to store the result. We cover incoming request intake and duplicate handling separately in our article on an AI agent in CRM. The outcome of this scenario is a quote with traceable prices and valid approval, rather than simply a new lead record.
Where a sales head should start
Choose one recurring request type that does not involve complex product configuration. Prepare several anonymized emails with their correct quotes, one approved pricebook, discount rules and a list of staff authorized to confirm terms. For each example, record the questions the manager actually asked the customer.
At acceptance, look beyond the document’s appearance. Check exact product and unit matches, the absence of invented prices, explicit unknowns, correct discount approval routing, invalidation of approval after a change and the absence of unauthorized sending. Measure the manager’s working time separately from time spent waiting for an approver. Faster writing does not guarantee a faster quote and does not establish savings or ROI.
A general-purpose agent can help interpret varied emails and formulate clarification questions. Catalogue matching, calculation, a revision log and a document template are components worth reusing. Team training includes reviewing errors, updating rules and handling exceptions, rather than relying on a single prompt. A Windows/AX test environment or a demonstration of interface control does not establish a production integration between email, CRM and your pricebook.
If the main problem is conflicting prices or a day spent waiting for the sales head, fix the source and responsibilities first. For identical, fully structured orders, a template and conventional automation may be sufficient. AI is useful where varied text needs interpretation, rather than as a replacement for arithmetic.
Describe your quote preparation workflow: where requests arrive, where prices are stored, who approves discounts and when a quote may be sent. This provides a basis for discussing the pilot’s scope; specific access permissions and integrations are checked separately. For an initial estimate of the work involved, see the pilot budget calculation in KZT.
Sources and limits of the checks
Google’s documentation on scopes and drafts and OpenAI’s documentation on function calling were checked on 15 November 2026 and are linked beside the relevant claims. This article is source analysis accompanied by our own synthetic artifact. The products, prices, discount policy and twelve local checks are training examples. We did not test a live integration, model quality, email delivery or legal applicability here.