Rana Maninder Singh
Lesson 3 of 8ERP Systems & Digital Transformation

Sales and Order-to-Cash

Lesson opener

In one line: Order-to-cash (OTC) is the chain quote → order → credit/stock check → delivery → invoice → cash — and every skip is a policy you must write down, not a habit.

Why it matters: If credit is optional and quantities live in a spreadsheet, you ship what you cannot collect and invoice what you did not ship. The 300-row customer file is the demand side of that chain: 49 already churned, 2 are still active with more than five tickets. Those two would fail a "block at order if tickets > 5" rule. OTC is not a sales process — it is a cash-generation machine. Every skip in the chain is a policy decision you must write down, not a habit.

Before this lesson: Master Data Management and Governance. Pairs with Sales dashboards.

Prerequisites

PrerequisiteWhy it matters
Completed ERP2Understands master data dependencies (customer, item, price, credit)
Completed ERP1Understands document chain and ERP as integrated system
Basic sales process awarenessKnows what a quote, order, delivery, and invoice are

Lesson roadmap

By the end of this lesson you will:

  1. Expand OTC as quote → order → credit/ATP → delivery → invoice → cash.
  2. Place five control points: price, credit, ATP, partials, returns.
  3. Size a credit hold against 300 real customers (49 churned, 2 high-ticket active).
  4. Name four design mistakes (CRM-won-without-order, free-text discount, ship without GI, invoice from Excel).
  5. Write a hold rule as code and check it against real data.
  6. Diagnose an order blocked by credit, stock, pricing, or missing master data.

The OTC backbone

Lead / Opportunity (CRM)
  → Quote (price, validity)
  → Sales Order (the promise)
  → Credit + ATP (can we collect, can we ship?)
  → Delivery / PGI (stock moves)
  → Invoice (what finance books)
  → Receipt / Clearance (cash)

A skip is allowed only as a written exception ("counter sales: quote = order"). Tribal "we always skip credit for Gold customers" is how disputes start. Every bypass must be a documented policy with an owner and an expiry date.

Teacher note: This lesson uses a 300-row customer file (data/customers.csv) to size controls on real data. The Python is only to size the control — how many real customers would a given hold catch.


Teacher demonstration: Size two holds on real customers

Scenario: You manage credit for a distributor with 300 customers. You need to size two hold rules before implementing them in ERP.

Customer file structure (data/customers.csv):

ColumnMeaning
customer_idUnique key (C0001–C0300)
segmentGold / Silver / Platinum
churned1 = churned, 0 = active
support_ticketsOpen tickets count
credit_limitApproved limit (₹)
current_exposureCurrent open AR + open orders (₹)

Step 1 — Churned customers are not new-order demand

Policy: No new sales orders for churned customers without a win-back approval.

Data:

import pandas as pd

df = pd.read_csv("data/customers.csv")
print(int((df["churned"] == 1).sum()))   # churned
print(int((df["churned"] == 0).sum()))   # active

Expected output:

49
251

Interpretation: 49 of 300 customers are churned. A "won" CRM flag on those 49 rows without an ERP sales order is the first common design mistake — CRM "won" with no ERP order means revenue never hits OTC.


Step 2 — A ticket hold: block new orders for active customers with >5 support tickets

Policy: Block a new order if the account is active and support_tickets > 5.

import pandas as pd

df = pd.read_csv("data/customers.csv")
hold = (df["churned"] == 0) & (df["support_tickets"] > 5)
print(int(hold.sum()))
print(list(df.loc[hold, "customer_id"]))

Expected output:

2
['C0004', 'C0068']

Interpretation: Two active customers (C0004, C0068) have >5 open tickets. C0004 is Silver with 6 tickets. If credit sits only at invoice, those two already consumed stock. The control is early or it is theatre.

Key insight: Credit at order stops the promise before stock moves. Credit at invoice is too late — goods may already have left.


The five control points every manager must answer

PointQuestion a manager must answerERP configuration
PricingPrice list, contract, or override with an approval?Pricing procedure; condition types; approval workflow for manual overrides
CreditBlock at order, at delivery, or at invoice?Credit management: risk category, credit limit, check at order/delivery/invoice
ATP / StockPromise only what can ship this week?Checking rule (ATP check); checking group; scope of check
Partial DeliveryAllowed? How is the leftover invoiced?Delivery completeness flag; partial delivery agreement; invoice split config
ReturnsRMA required before a credit note?Return order type; inspection type; credit memo block until GR

Teacher note: These are not IT settings — they are business policies that IT configures. If the business cannot answer the question, IT should not configure the setting.


Four design mistakes that leak revenue

#MistakeWhat happensWhy it mattersFix
1CRM "won" with no ERP orderDeals marked won in CRM never become sales ordersRevenue never hits OTC; CRM "win" is a ghostCRM won = ERP order mandatory; nightly reconciliation
2Free-text discount, no approvalSales types discount in free text; no approval trailPrice list becomes a rumour; margin leaksDiscount condition type with approval workflow; no free-text
3Ship without Goods Issue (PGI)Warehouse ships from spreadsheet; no PGI in ERPStock and COGS stay wrong; finance cannot reconcileNo shipment without PGI; system-enforced sequence
4Invoice from spreadsheet quantitiesFinance types invoice from Excel, not from PGIFinance cannot reconcile to PGI; quantity mismatchesInvoice created from delivery (PGI) only; no manual qty entry

Teacher demonstration: The deliberate mistake — month-end "sales" in CRM is 40 orders higher than ERP invoices. Diagnosis: deals marked won never became sales orders, or invoices were typed from Excel after a skip. Correction: one backbone, written skips, credit before stock moves. Prevention: each morning, count CRM-won minus ERP orders. That gap is the design leak.


Guided practice: Gold and churned

Task: How many Gold customers have already churned? Those need a win-back path, not a silent new quote.

import pandas as pd

df = pd.read_csv("data/customers.csv")
print(int(((df["segment"] == "Gold") & (df["churned"] == 1)).sum()))

Expected output:

11

Interpretation: 11 Gold customers are churned. They need a win-back path, not a silent new quote. If Sales quotes them without a win-back plan, you're quoting dead accounts.


Independent practice: Platinum still active

Task: Print how many Platinum customers are still active (churned == 0).

import pandas as pd

df = pd.read_csv("data/customers.csv")
print(int(((df["segment"] == "Platinum") & (df["churned"] == 0)).sum()))

Expected output:

21

Acceptance criteria: Code runs without error; output matches 21.


Teacher demonstration: Diagnose an order blocked by credit, stock, pricing, or missing master data

Scenario: Order SO-2026001 for Customer C0045 (Gold, active) for 100 units of Item WIDGET-X @ ₹500/unit is blocked.

Step-by-step diagnosis:

CheckQuestionHow to check in ERPResultAction
CreditIs customer over limit or blocked?Credit management: risk category, credit limit, current exposureExposure ₹48L, Limit ₹50L, Order ₹5L → would exceedRequest credit limit increase or partial delivery
ATPIs stock available in delivering plant?ATP check: checking rule, scope, plant50 units available, need 100Offer partial (50 now, 50 next week) or backorder
PricingIs there a valid price for this customer/item/date?Condition technique: access sequence, condition recordsNo condition record for this customer/itemCreate condition record or use manual price with approval
Master DataAre all master records complete and valid?Customer: payment terms, credit limit, reconciliation account. Item: base UoM, valuation class, MRP type.Customer missing reconciliation accountBlock order until master data complete

Diagnosis result: All four checks fail on this illustrative order. Credit fails because ₹48 lakh exposure plus a ₹5 lakh order exceeds the ₹50 lakh limit. ATP fails because only 50 of 100 units are available. Pricing fails because there is no condition record. Master data fails because the customer has no reconciliation account. Fixing only the price record would still leave the order blocked.

Resolution path:

  1. Finance creates a condition record for this customer, item, and date.
  2. Finance adds a reconciliation account on the customer master.
  3. Sales agrees a partial quantity that ATP can promise, or waits for supply.
  4. A named finance approver raises the credit limit or splits the order. The order stays blocked until credit, price, stock, and master data all pass. Amounts are illustrative.

Pause and think

Q1. Why block at order rather than at invoice for credit control?

Invoice is too late: goods may already have left. Credit at order stops the promise.

Q2. What does PGI (Post Goods Issue) change that a packing list does not?

Goods issue (some products label this PGI) moves stock in the ERP. It reduces unrestricted stock and posts cost of goods. A packing list is a document only. It moves no stock and hits no ledger.

Q3. Are the two hold customers (C0004, C0068) "bad" customers?

They are a policy test. The file says they are active with more than five tickets. The manager decides whether that is a hold.

Q4. A salesperson creates a quote with a 15% discount typed in free text. No approval workflow exists. What control is missing?

Discount condition type with approval workflow. Free-text discount makes the price list a rumour.


Second workplace example: The "Gold customer exception" trap

Scenario: "Gold customers never need credit approval" — tribal knowledge. Six months later:

Root cause: "Gold customer exception" was never a written policy with an owner and expiry. It was tribal knowledge.

Correction:

  1. Write the exception as a formal policy: "Gold customers with >2 years tenure and <5% overdue may exceed limit by 20% with Finance Controller approval."
  2. Configure in ERP: Risk category "Gold-Exception" with 20% tolerance, requires Finance Controller approval workflow.
  3. Add expiry date: policy reviewed quarterly.

Lesson: Every exception must be a documented policy with an owner, conditions, and expiry date. No tribal knowledge in credit.


Guided practice: Diagnose a blocked order

Task: Order SO-2026001 for Customer C0045 (Gold, active) for 100 units of Item WIDGET-X @ ₹500/unit is blocked. Use the diagnosis table to find the root cause.

Step-by-step hints:

  1. Check credit: Customer C0045 — limit ₹50L, exposure ₹48L. Order value ₹5L. Would exceed limit by ₹3L.
  2. Check ATP: Item WIDGET-X in Plant Pune — 50 units available. Order needs 100.
  3. Check Pricing: No condition record for Customer C0045 / Item WIDGET-X / valid date.
  4. Check Master Data: Customer C0045 missing reconciliation account. Item WIDGET-X base UoM = PC, vendor sells in BOX.

Expected diagnosis:

Proposed resolution:

  1. Finance creates a condition record for this customer, item, and price.
  2. Finance adds a reconciliation account on the customer master.
  3. Sales agrees a partial delivery: 50 units now, 50 next week, and the invoice follows the goods issue.
  4. Finance approves a credit-limit increase before the full order is released. Amounts here are illustrative.

Independent practice: Design an order-to-cash control matrix and exception report

Task: Design a one-page OTC control matrix and a weekly exception report for your organization.

Control Matrix (one page):

Control PointPolicyERP ConfigOwnerMonitoring FrequencyException Report
Pricing
Credit
ATP / Stock
Partial Delivery
Returns / RMA

Weekly Exception Report (sample):

Exception TypeCountTop 3 CustomersOwner ActionSLA
Credit Block
ATP Shortfall
Pricing Missing
Master Data Incomplete
Return without RMA

Acceptance criteria:

Model approach: Start with the five control points. For each, write the policy in one sentence. Map to ERP config (e.g., credit check at order = "Check at order" in credit management). Assign a named owner (not a department). Set frequency (daily/weekly). Define the exception report column that triggers action.


Common mistakes

#MistakeCauseConsequenceCorrectionPreventive control
1CRM "won" with no ERP orderSales uses CRM as primaryRevenue never hits OTC; CRM "win" is ghostCRM won = ERP order mandatory; nightly reconciliationNightly job: CRM Won (open) minus ERP Open Orders = design leak
2Free-text discount, no approvalNo discount condition typePrice list becomes a rumour; margin leaksDiscount condition type with approval workflowCondition type with approval workflow; no free-text discount field
3Ship without PGIWarehouse uses spreadsheetStock and COGS stay wrong; finance cannot reconcileNo shipment without PGI; system-enforced sequenceSystem-enforced: no delivery without PGI
4Invoice from spreadsheet quantitiesFinance types from ExcelFinance cannot reconcile to PGI; quantity mismatchesInvoice created from PGI only; no manual qty entryInvoice program reads from PGI; manual qty disabled
5Credit check only at invoice"We check at invoice"Goods ship, then customer can't payCredit check at order (or delivery); block before promiseCredit management: check at order = mandatory
6Partial delivery without agreement"We'll ship what we have"Customer receives partial, invoiced for fullPartial delivery agreement in master; invoice split configCustomer master: partial delivery flag; invoice split config

Assessment: Quick check

  1. OTC in erp3 expands to what chain?
  2. How many of the 300 customers are already churned?
  3. Active customers with >5 tickets: how many?
  4. The two hold customer_ids are:
  5. What does PGI change that a packing list does not?
  6. Why block at order rather than at invoice for credit?
  7. A skip in the OTC chain is allowed when:
  8. The deliberate mistake in erp3 is:

Answers

  1. Quote → Order → Credit/ATP → Delivery/PGI → Invoice → Cash
  2. 49
  3. 2
  4. C0004 and C0068
  5. PGI moves stock and hits COGS/Inventory ledgers. A packing list is just a PDF.
  6. Invoice is too late: goods may already have left. Credit at order stops the promise.
  7. Only as a written exception (e.g., counter sales: quote = order).
  8. CRM-won higher than ERP invoices because deals never became orders, or invoices typed from Excel.

Closure

What you can now do:

Essential ideas:

One workplace action:

Run the two Python snippets against your customer file (or a sample). How many churned? How many high-ticket active? Share with your Sales Ops lead.

Bridge to next lesson:

What's next: Procurement and Procure-to-Pay — cash-out has the same discipline on the buy side. Three-way match, approval matrices, and blanket vs spot buys.