How CertiPOS integrates with SAP Business One
CertiPOS treats SAP Business One as the book of record. The register never calls SAP; the central server posts every business event through the Service Layer and keeps the evidence of each call.
Interface
- All reads and writes go through the Service Layer; the DI API is never used and nothing is written into the company schema. This keeps one code path for HANA and SQL Server and works with a hosted SAP.
- Sessions are pooled per company and renewed on expiry. The raw request, the answer and the timing of every call are stored on the posting job.
- Bulk reads may use an optional read-only view pack when the Connect Agent has database access; feature code never runs ad-hoc SQL.
Documents per business event
- Cash sale: A/R Invoice, then an Incoming Payment per cash currency; foreign cash is exchanged through a clearing account by a journal entry.
- Return and exchange: A/R Credit Memo based on the invoice and an Outgoing Payment; an exchange is one ticket with both directions.
- Deposits and down payments: A/R Down Payment Invoice and its payment; the final invoice draws the down payment.
- On account: an open A/R Invoice on the business partner with a credit check at the register.
- Cash management: journal entries and payments for cash in and out, over and short, tip payouts, on the accounts you map.
- Gift cards, store credit and loyalty: the sale as an item line; redemptions as transfer means on the liability accounts; accrual and expiry journals.
- Inventory: Goods Receipt, Goods Issue, Inventory Transfer and Request, Inventory Counting; documents intercepted by a SAP approval procedure are reported with their own error code.
- Orders and deliveries: Sales Order, Delivery Note, and an invoice based on the order that draws the down payment at handover.
Per ticket or roll-up
Per-ticket posting is the default: one invoice and payment per ticket, which gives SAP a drill-back per sale and is what e-invoicing regimes expect. A company can choose a daily roll-up instead: one invoice and payment per company and day with aggregated lines, and the ticket detail written to the @CP_TICKETS and @CP_TICKETLINES user tables.
Fields and tables
A portal action provisions the user-defined fields on documents (ticket, register, promotion, coupon and others) and the user tables for roll-up. An existing field definition is never changed. The provisioning is idempotent and can be re-run after an SAP upgrade.
Exactly once and reversals
- Every ticket and mutating event carries a client ULID; every posting job and chained follow-up has its own idempotency key, so a retry never creates a second document.
- The invoice posts, its DocEntry is persisted, then the payment posts based on it; a crash between the two resumes at the right step.
- Every reversal mirrors what was posted: cancellation where SAP allows it, a mirrored document where it refuses.
- Every posting flow is accepted only after a real document was posted to a live company and reversed.
Master data and events
Items, prices, barcodes, units, business partners, price lists, tax codes, the chart of accounts, serial numbers, currencies and rates sync by delta every minute and in full once a day; the registers pull a version-ordered stream. SAP-side changes reach CertiPOS by polling or through a signed webhook receiver.