Sanka

Track cost and margin by deal

Use Claude or Codex to connect revenue, purchasing, inventory, outsourcing, and fees so Sanka can show margin by deal, customer, item, and owner.

Last updated: May 16, 2026

This guide shows how to use Sanka to manage cost and margin at the deal or order level. Start by asking Claude or Codex to collect the revenue and cost sources, then review the margin calculation before using it for reporting or approval.
Claude/Codex
Review this won deal and calculate draft margin in Sanka. Pull revenue from the order, attach purchasing, inventory, outsourcing, shipping, and fee costs, then show margin and margin rate. Do not finalize the report yet.
Preparing margin draftI prepared a draft margin calculation. Please review revenue, cost sources, missing costs, and margin rate before publishing it to reports.
Ask for another margin check...

Before you start

Check that you have the following ready.
  • Deals, quotes, or orders are available in Sanka
  • Item costs, purchase orders, inventory costs, outsourcing costs, shipping fees, and payment fees are available or ready to add
  • Your team has rules for which costs count as direct cost
  • You have permission to view revenue, cost, and margin reports

Ask AI to collect revenue and cost sources

Ask Claude or Codex to list every source that affects margin. Keep the calculation as a draft until finance or the business owner reviews it.
Sample prompt
/sanka For this deal, list revenue, item cost, purchase cost, outsourcing cost, shipping, payment fees, discounts, and any missing cost source. Calculate draft gross margin and margin rate, but keep it as a draft.
Review:
  • Revenue by line item
  • Direct item or inventory cost
  • Purchase orders and outsourced work linked to the deal
  • Shipping, handling, payment, or platform fees
  • Discounts or credits that reduce revenue
  • Missing or estimated costs that should not be used in final reporting yet

Create the margin view

Once the inputs look correct, create the margin view by deal, order, customer, item, and owner. This lets sales and management review profit, not only revenue.
Sample prompt
/sanka Create a margin view for this deal. Show revenue, direct cost, gross margin, margin rate, and the records used as evidence. Flag any estimated or missing cost.
Use the draft to decide whether the deal needs action:
  • Low margin because of discounting
  • Missing purchase cost or outsourced work
  • Shipping or payment fees reducing profit
  • Item cost that changed after the quote was created
  • Customer or item patterns that affect future pricing

Publish to reports after review

After a teammate confirms the calculation basis, publish the margin result to reports or forecasts. Avoid using AI-only calculations as final numbers without source records and approval history.

Checkpoints

Use Sanka logs and tables to confirm who added each cost, which records support the calculation, and when the margin result was approved for reporting.
Search Sanka...
Review cost and margin activity

Logs

Search logsAll actionsAll dates
ID / ActionDateTarget / ItemChangeActor
4Margin published2026/05/12 16:30Acme renewal / DealPublished reviewed margin to reportFinance manager
3Cost source added2026/05/12 15:55Acme renewal / Purchase orderLinked outsourced setup costOperations owner
2Margin draft reviewed2026/05/12 15:30Acme renewal / DealChecked revenue, costs, and missing inputsClaude / Codex
1Margin draft created2026/05/12 15:10Acme renewal / DealCalculated draft margin from linked recordsClaude / Codex

You can also confirm revenue, cost records, margin, margin rate, and report status from the deal or order table.

Next guides