Walkthroughs

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.

1

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 GmbHQuote 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.
Tip: Don't pre-compute totals in the template. Let Claude (or your CRM) supply the final numbers in the JSON — that way discounts, tax rules, and currency formatting stay in one place instead of being half in Word and half in code.
2

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, and lineItems as required. Leave optional fields like discountNote off.
  • 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."
Note: The description and example values are what make the schema "AI-native." Claude reads them through get_template_schema and uses them as few-shot hints when constructing the JSON payload, so vague descriptions = wobbly output.
3

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.json and 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>"
      ]
    }
  }
}
Heads up: Treat the API key like a password — anyone with it can generate documents on your quota. If it leaks, revoke it on the API keys page and mint a new one.
4

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 .xlsx or .csv into 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.
Tip: For the first run, just type the line items in the prompt. Once that works end-to-end, swap in a real catalog source. Don't try to wire everything at once.
5

Run a dry-run preview

Open a new Claude Desktop chat and prompt:

  • Claude calls list_templates, picks quote.docx by its description, then calls get_template_schema to see the placeholder list.
  • It assembles a JSON payload and calls preview_generate, which returns a structured response with missingFields, unresolvedFields, tableStats, and a normalizedPreviewText.
  • Read what Claude reports back. If missingFields is 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.
Note: preview_generate persists nothing and doesn't count against your monthly document quota — iterate freely until the preview looks right.
6

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 containing downloadUrl (HMAC-signed, valid 15 minutes) and expiresAt.
  • 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.
Tip: Need a Word file instead of a PDF? Pass format: "docx" in the prompt — e.g. "…generate it as a .docx so I can edit before sending."
?

Troubleshooting

Claude says it can't find the template.
Make sure the template description is filled in on the template detail page — Claude uses that field, not the filename, to pick the right template. If the description is empty, list_templates returns nothing actionable.
The line-item table only shows one row.
Check that {{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.
Upload rejects with <code>unsupported_placeholders</code>.
Your template contains Monday-specific tokens ({{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.
The PDF's fonts look wrong on a server but fine on my Mac.
This only matters if you're self-hosting. The hosted app at app.docexport.ai already ships bundled OFL fonts (Liberation, Carlito, Caladea, DejaVu) so PDF rendering on Linux matches Windows output.

Still stuck?

Email [email protected] with your template and the prompt you're trying to run — we usually reply same day.