n8n SAP Service Layer: classify order failures before another POST
Plan n8n SAP Service Layer order recovery: separate confirmed creation, business rejection, session failure and uncertain writes before authorizing another POST.

Checked against the cited sources on .
Define the n8n SAP Service Layer recovery boundary
An n8n SAP Service Layer workflow should distinguish confirmed creation, confirmed business rejection, session failure and uncertain write outcomes before attempting another order POST. This guide offers an editorial decision framework for SAP Business One teams, rather than a complete recovery implementation.
SAP's API reference says that, from SAP Business One FP 2405, Service Layer deprecates OData v3 and primarily supports v4. Record your deployment's hosting, database variant and release, and assign a recovery owner before applying the framework.
We think a clear decision about when to stop is more valuable than an automatic retry branch whose safety nobody can explain.
Sources: Service Layer API Reference
Capture the response before choosing a branch

When choosing n8n nodes for SAP Service Layer recovery, start with what HTTP Request exposes. n8n documents an option to return response headers, status and body together. Its Never Error option accepts any returned HTTP status, so successful node execution must not become your definition of successful order creation.
As editorial advice, preserve the source order reference alongside the returned response. The following table suggests categories for reviewing an n8n SAP Service Layer recovery design; it does not provide executable matching rules. Verify returned-response routing, transport-exception routing and source-order context preservation together on your deployed n8n version before relying on these categories.
| Category | Contract to verify | Suggested review question |
|---|---|---|
| Confirmed creation | Creation response and SAP identifier | When is submission complete? |
| Business rejection | Deployment-specific rejection body | What correction is required? |
| Session failure | Authentication and renewal behavior | When must recovery stop? |
| Uncertain write | Order and applicable-draft reconciliation | Who resolves an ambiguous outcome? |
Sources: Logging In and Out Using Basic Authentication with Service Layer, Performing Basic Operations Using Service Layer API, HTTP Request | Nodes | n8n Docs, https://d1.awsstatic.com/builderslibrary/pdfs/timeouts-retries-and-backoff-with-jitter.pdf
Separate rejection from session failure
SAP's OData v4 sales-order exercise expects HTTP 201 after successful creation and asks developers to retain DocEntry. It uses the Demo UK International database and does not establish approval-dependent outcomes. Business-error matching requires sales-order rejection bodies verified for your release and deployment; this guide does not provide those matching rules.
SAP's Service Layer exercise demonstrates HTTP 401 with an invalid-session message on a v4 metadata request after logout. That example does not establish that every 401 means expiration. Our suggested policy is to correct a confirmed business rejection before resubmitting, and to renew and verify authentication for a session-specific failure before deciding whether another POST is justified.
Before enabling session recovery, verify the login request, cookie extraction and propagation, session verification, and a bounded response to repeated authentication failures on your deployment. This guide does not provide that implementation.
Sources: Logging In and Out Using Basic Authentication with Service Layer, Performing Basic Operations Using Service Layer API
Reconcile uncertain writes and possible drafts

Amazon's Builders' Library explains that a failed or timed-out call may already have produced side effects, and uses an unanswered EC2 creation request to explain reconciliation. Applying that principle to n8n SAP Service Layer order recovery is editorial advice.
A 2021 SAP Community support reply reports that SAP Business One 10.0 FP 2105 Service Layer could return 404 while a Location header identified a created draft. This historical community report cites a SAP Note second-hand; it neither establishes current sales-order behavior nor justifies ignoring 404 responses.
Before automating resubmission, define a supported external identifier, order and applicable-draft lookup coverage, uniqueness and concurrency safeguards, and acceptance criteria for another POST. This guide does not establish that reconciliation contract or a native order-POST idempotency, exactly-once processing or duplicate-prevention guarantee. Query support alone cannot justify another POST after an uncertain write.
In our view, an ambiguous match belongs with the assigned SAP integration owner rather than a branch that guesses whether to create another order.
Sources: Query Options | SAP Help Portal, https://d1.awsstatic.com/builderslibrary/pdfs/timeouts-retries-and-backoff-with-jitter.pdf, https://d1.awsstatic.com/builderslibrary/pdfs/making-retries-safe-with-idempotent-apis-malcolm-featonby.pdf, Error creating document when it is subject to an a... - SAP Community
Bound recovery and make the handoff explicit

n8n documents Retry on Fail with maximum tries and a wait between retries for HTTP Request. Those controls do not establish that repeating an order POST is safe. Our editorial recommendation is to leave automatic POST retries disabled until the applicable recovery contract is established.
n8n's error-handling reference describes configuring continueErrorOutput and wiring its separate output to a handler. Its workflow-level reference warns that a wired, handled node error does not trigger the workflow-level error workflow; payload shape can also vary between versions. Give that handled branch its own notification or tracking.
Use this suggested sandbox or simulated-endpoint checklist to review the team's decisions. These are editorial exercises, not validated tests or claims of firsthand testing.
Sources: skills/skills/n8n-error-handling-official/references/NODE_ERROR_OUTPUTS.md at main · n8n-io/skills · GitHub, skills/skills/n8n-error-handling-official/references/ERROR_WORKFLOWS.md at main · n8n-io/skills · GitHub, n8n-docs/docs/integrations/builtin/core-nodes/n8n-nodes-base.httprequest/common-issues.md at main · n8n-io/n8n-docs · GitHub


