Cart checkout and orders — SAP Guided Tutorial
Free sample lesson · open to everyone
The order journey in SAP Commerce: cart calculation, checkout steps (addresses, delivery, payment), payment authorisation, order placement, the order business process, and handover to ERP for fulfilment.
In this lessonShow sectionsHide sections
Visual overview
The situation: a real project scenario
During a sale, ERP was slow and order exports timed out. Orders stayed 'created' without alerts; customers received no confirmation for hours. Adding retries, an alert on stuck orders and decoupling confirmation emails from the ERP step fixed it.
Explanation
With products and prices in place, customers need to actually buy something, and that journey runs through three connected pieces: the cart, checkout, and the order business process.
The cart holds line entries — product, quantity, unit — and is recalculated whenever something changes, reapplying prices, promotions and taxes so the totals shown to the customer are always current.
Commerce supports both anonymous carts (for guests browsing before they log in) and carts tied to a logged-in customer, and a common requirement is merging an anonymous cart into the customer's account cart at login so items aren't lost.
Stock should be checked before checkout completes, not only at add-to-cart time, since stock levels can change between when an item is added and when the order is placed.
Checkout collects the delivery address, delivery mode (with its associated cost), and payment details, then places the order. Payment is normally authorized through a payment service provider (PSP) integration rather than handled directly by Commerce — card data should never be stored in the Commerce database, and features like tokenization and 3-D Secure are typically the PSP's responsibility, not something built from scratch in the platform.
Once an order is placed, a business process engine runs a defined sequence of steps — commonly fraud screening, export of the order to the ERP for fulfilment, and a confirmation email. This is where a lot of real-world fragility shows up: if any step in that sequence can fail (and ERP connectivity timing out is a very common failure), the process needs retries and a clearly visible error state, otherwise an order can get stuck in limbo between Commerce and the ERP with no one aware anything is wrong.
After the ERP accepts the order as a sales order, status updates (shipped, delivered, invoiced) are expected to flow back so the customer's order history in their account reflects reality, and so customer service isn't guessing at order state from two disconnected systems.
Watch out
Common mistakes
Storing card data in Commerce instead of relying entirely on PSP tokenization: beyond being a security risk, this usually violates PCI-DSS scope requirements the business didn't intend to take on.
Having no retry logic or alerting when the ERP export step fails: orders sit silently in a 'created' or 'pending' state, customers get no confirmation, and the business often only finds out when customer service complaints start arriving.
Not merging anonymous and logged-in carts at login: a customer who added items before signing in loses their cart, which is a surprisingly common and avoidable source of abandoned carts.
Not checking stock immediately before payment is captured: an item can go out of stock between add-to-cart and checkout completion, and charging a customer for something that then can't be fulfilled creates a refund and support burden that proper stock validation at checkout would have prevented.
Do this
Best practices
Always route payment through a PSP with tokenization — Commerce should never see or store raw card data, and 3-D Secure / strong customer authentication should be delegated to the PSP's flow.
Build the order business process with retries and explicit, visible failure states for integration steps like ERP export, and alert on orders stuck past a reasonable time threshold, so a stuck order is caught by monitoring within minutes rather than by a customer complaint hours later.
Decouple customer-facing steps like the confirmation email from backend-dependent steps like ERP export where possible, so a slow or failing ERP doesn't also delay the one thing the customer is actually waiting for — confirmation their order was received.
Make sure order and delivery status updates flow back from the ERP into the customer's account promptly, so support isn't the only channel for 'where is my order.'
In the interview
Interview angle
Interviewers like to ask 'A customer says they paid but never got a confirmation email — how do you investigate?' The weak answer is to check the email server.
The strong answer recognizes that the confirmation email is usually one step in an order business process that also includes fraud check and ERP export, so the first move is to look at where that specific order's process instance stopped — if it's stuck waiting on an ERP export that timed out, the email step may never even have been reached.
Candidates who can explain why decoupling the confirmation step from the ERP-dependent step is a deliberate design choice — not just a nice-to-have — demonstrate they've actually debugged order flow issues in production, not just described the happy path.
Practice this lesson
Original educational case studies for SAP consultants, not official SAP certification exam questions. Verify product edition and implementation details against the current SAP documentation.
Quick check
0 of 4 questions attempted
Question 1 of 4
Where should credit card numbers be stored in a SAP Commerce shop?
Question 2 of 4
What runs after an order is placed in SAP Commerce?
Question 3 of 4
Orders are stuck because ERP export failed. What should exist?
Question 4 of 4
What should happen to an anonymous cart when the customer logs in?
Practise this in an interview
Answer in your own words and get instant feedback, the way an interviewer would judge it.
1Walk me through the order flow in SAP Commerce from cart to ERP.
2How do you handle ERP downtime for a web shop?
Was this lesson helpful?
Keep exploring
Check before use: lesson examples are educational, not a guarantee of correctness for your SAP edition or release. Sample code has not been executed on your SAP system. Confirm API availability, syntax, authorizations and business impact in an approved development or test environment.