Generate a sales quote with Claude
From a Word quote template to a Claude-generated PDF in about 15 minutes — including how to feed Claude your product catalog and customer details.
Prepare your Word template
Open your existing branded quote in Microsoft Word — the one your sales team already sends today. You'll replace every value that changes per customer with a {{placeholder}} token. Keep the logo, fonts, footer, and T&Cs exactly as they are; DocExport renders the file as-is using Aspose.Words, so the PDF you get back looks identical to what you'd produce by hand.
- Replace fixed text with tokens, e.g.
Quote for Acme GmbH→Quote for {{customerName}}. - Format dates inline with a pipe filter:
{{quoteDate | dd.MM.yyyy}}. - For the line-item table, mark the repeating row region. Above the table, type
{{TableStart:lineItems}}on its own line; below it,{{TableEnd:lineItems}}. Inside the row, use tokens like{{description}},{{quantity}},{{unitPrice}},{{lineTotal}}. - Save the file as
quote.docx.
Upload the template and annotate placeholders
Sign in at app.docexport.ai, click New template, and upload quote.docx. DocExport's linter walks the document, extracts every placeholder it found, and shows them in a list.
- For each placeholder, fill in Description, Example value, and toggle Required if the field must be present.
- Write descriptions for the agent, not for a human teammate. Example for
customerName: "Legal entity name as it should appear on the cover page. Use the registered legal form (GmbH, Ltd., Inc.). Example: Acme GmbH." - Mark
customerName,quoteDate, andlineItemsas required. Leave optional fields likediscountNoteoff. - Add a template description at the top of the page — one sentence telling Claude when to pick this template. Example: "Customer-facing sales quote with line-item table. Use for new outbound proposals; not for renewals."
get_template_schema and uses them as few-shot hints when constructing the JSON payload, so vague descriptions = wobbly output. Mint an API key and connect Claude Desktop
From the workspace menu, open API keys and click Create key. The plaintext key (dxp_<prefix>_<secret>) is shown once — copy it now. The same page generates a ready-to-paste Claude Desktop snippet:
- Open Claude Desktop → Settings → Developer → Edit Config.
- Paste the snippet into
claude_desktop_config.jsonand save. - Restart Claude Desktop. You should see a 🔌 icon with four DocExport tools:
list_templates,get_template_schema,preview_generate,generate_document.
{
"mcpServers": {
"docexport": {
"command": "npx",
"args": [
"mcp-remote",
"https://app.docexport.ai/mcp",
"--header",
"Authorization: Bearer dxp_<prefix>_<secret>"
]
}
}
} Decide where Claude gets the product and pricing data from
DocExport doesn't store your catalog — it's purely the rendering layer. Claude needs to source product names, prices, and customer details from somewhere else in the same conversation. Pick whichever fits your stack:
- Type it in the prompt — fine for one-off quotes. "50 seats of Pro at €29/mo, 10% discount."
- Connect a CRM/billing MCP server alongside DocExport — the recommended pattern. If pricing lives in Stripe, add the Stripe MCP. If line items live on a HubSpot or Salesforce deal, add that MCP. Claude calls them to assemble the JSON, then hands it to DocExport.
- Attach a price-list file to the chat — drop your rate-card
.xlsxor.csvinto Claude. Works well for agencies and consultants. - Build a tiny custom MCP — a 50-line Python or Node server wrapping your internal price list. Useful when the catalog isn't in any off-the-shelf tool.
Run a dry-run preview
Open a new Claude Desktop chat and prompt:
- Claude calls
list_templates, picksquote.docxby its description, then callsget_template_schemato see the placeholder list. - It assembles a JSON payload and calls
preview_generate, which returns a structured response withmissingFields,unresolvedFields,tableStats, and anormalizedPreviewText. - Read what Claude reports back. If
missingFieldsis non-empty, that's your cue: either add data to the prompt or improve the placeholder description so Claude knows what to put there.
Draft a quote for Acme GmbH using our standard sales quote template.
50 seats of Pro at €29/month, 10% volume discount, valid 30 days.
Use today's date. Run a preview first — don't generate the final PDF yet. preview_generate persists nothing and doesn't count against your monthly document quota — iterate freely until the preview looks right. Generate the final PDF
Once the preview is clean, ask Claude to generate the document:
- Claude calls
generate_document. The response is a JSON object containingdownloadUrl(HMAC-signed, valid 15 minutes) andexpiresAt. - Click the URL to download the PDF. Forward it to the customer, or save it back to your CRM.
- The document also appears under Documents in the web UI — your monthly quota counter ticks up by one, and an audit log entry is written.
Looks good. Generate the final PDF. format: "docx" in the prompt — e.g. "…generate it as a .docx so I can edit before sending." Troubleshooting
list_templates returns nothing actionable.{{TableStart:lineItems}} and {{TableEnd:lineItems}} are on their own lines, immediately above and below the table row, and that the JSON payload contains a lineItems array (not a single object). Aspose only repeats rows when it sees the region markers paired correctly.{{QR.X}}, {{Signature:1}}, {{Table:X}}, {{Image:X}}). DocExport.ai only supports the standard {{placeholder}} + {{TableStart:X}}…{{TableEnd:X}} syntax. Replace or remove those tokens and re-upload.Still stuck?
Email [email protected] with your template and the prompt you're trying to run — we usually reply same day.