SAP Business One¶
Applies to: e-Invoice · e-Way Bill · Which modules do I have?
Purpose¶
Connect SAP Business One to Complifly: where to trigger, which Business One objects supply the required data, the traps specific to this product, and how outcomes return to the document.
Audience¶
Business One partners and integration developers.
Prerequisites¶
- The Integration Pattern — read first
- Business One developer effort allocated
- Sandbox credentials
- Raw sample output per document type
Verify: Whether a Complifly add-on exists for Business One, or this is a pattern a partner implements, is not established here. Recorded as assumption F1 in the Assumptions Register.
Steps¶
1. Choose the trigger¶
| Option | Suits | Note |
|---|---|---|
| Add-on reacting to document add | Tight integration, immediate feedback | Requires add-on development and deployment to each client |
| Service Layer polling | External service, no add-on deployment | Simpler to maintain centrally; a short delay |
| Scheduled export | Low volume | Simplest; rejections found later |
Business One's document lifecycle is short — a marketing document is added and is effectively final. Trigger on add rather than trying to find a later state change.
2. Source the required fields¶
| Complifly needs | Typically from |
|---|---|
| Document number and date | The marketing document header |
| Document type | Document object type, translated by a lookup |
| Supplier registration | The branch assigned to the document |
| Buyer registration and address | Business partner master and its addresses |
| Place of supply | Determined in Business One; a tax position |
| Values | Document totals |
| Line details | Document lines |
| Classification codes | Item master |
Once you know where each value lives, build the translation in the product rather than in ERP code: Build a Mapping Template walks through creating the template, loading these fields from a sample, and dragging them onto their NIC counterparts with the right direct, date or lookup rule.
3. Handle the Business One traps¶
| Trap | Symptom | Fix |
|---|---|---|
| Branch determines the registration | Wrong supplier registration | In multi-branch installations the branch, not the company, carries it. Map from the document's branch |
| Numbering series per branch or per document type | Duplicate rejections | Confirm the series is unique per registration per financial year |
| Unit of measure and quantity scaling | Quantities or values wrong | Confirm which unit and price the mapping should use — Business One carries several |
| Rounding on the document total | Total mismatch | Map the actual document total, not a recomputed one |
| User-defined fields | Required data absent from the standard payload | Include them in the export; they are frequently where classification codes live |
| Draft documents | Sending something not yet final | Trigger on the posted document, never a draft |
| Cancellation documents | A reversal sent as an invoice | Map cancellations to the correct type or exclude them |
4. Return the outcome¶
Store the reference number and acknowledgement against the marketing document — typically in user-defined fields on the document header. Store the signed QR where printing happens in Business One.
Consume the write-back feed on a schedule; do not block document creation waiting for a reference number.
5. Handle rejections visibly¶
Business One has no built-in work queue for this. Provide one: a report, an alert, or a user-defined table a person reviews daily. Without it, rejections accumulate unseen.
Validation¶
| Check | Method | Pass condition |
|---|---|---|
| Branch mapping correct | Send from each branch | Correct supplier registration each time |
| Numbering unique | Review the series across branches and years | No possibility of collision |
| Quantities and prices correct | Compare the mapped payload against the document | Exact match |
| Total matches | Compare the total | Exact, including rounding |
| User-defined fields carried | Inspect the mapped payload | Present |
| Drafts excluded | Create a draft | Not sent |
| Cancellations handled | Cancel a document | Correct type, or excluded |
| Outcome reaches Business One | Complete one document end to end | Reference number visible on the document |
| Printing works | Print one, if printing in Business One | Signed QR scans from paper |
| Rejections visible | Force a rejection | A person sees it the same day |
Troubleshooting¶
| Symptom | Cause | Action |
|---|---|---|
| Wrong supplier registration | Mapped from the company rather than the branch | Map from the document's branch |
| Duplicate rejections across branches | Numbering series overlap | Make the series unique per registration per year |
| Quantities wrong by a factor | Wrong unit of measure mapped | Confirm which unit and price the mapping uses |
| Total mismatch | Recomputed rather than taken from the document | Map the document's own total |
| Required field empty | It lives in a user-defined field not included in the export | Include it |
| Drafts registered | Trigger fires on draft add | Trigger on the posted document only |
| Reversal registered as an invoice | Cancellation not mapped | Map or exclude. A registered document cannot be un-registered |
| Reference number never returns | Write-back not consumed | Check the flag, the subscription, then the consumer |
| Rejections unnoticed | No work queue | Build a report or alert and assign an owner |
Related Articles¶
- Build a Mapping Template — the field mapping, screen by screen
- The Integration Pattern — everything common
- SAP ECC and S/4HANA — the larger SAP products
- Mapping Templates API
- Ingest Failures