SAP / ERP Integration — business view

Technical trace: SAP / ERP Integration

1. Business Summary

Centralised cron-driven synchronization of accounts, resources, all invoice types, and payments — with retry queue, blacklist, and post-sync reconciliation.

2. Business Value

Keeps the financial books aligned with operations; enables consolidated reporting.

3. Users / Stakeholders

Finance, executives, IT/integration owners.

4. Workflows

  • A queue captures pending sync requests.
  • Each entity-type sync function builds a payload, calls SAP, captures the result, and writes the SAP ID locally.
  • Failures are logged; retries follow configured intervals up to a cap.
  • Inbound payment endpoints accept payloads from SAP to create payments locally.

5. Sub-Features

  • Queue table; retry log; audit log.
  • Endpoint configuration per operation (add/update/cancel/post/delete) per entity.

6. Business Rules

  • Hard-coded date cutoffs for eligibility (e.g., post-2018).
  • Default currency placeholders for missing data.
  • Submitted-and-not-yet-posted gating.
  • Retry caps (number of failures, time intervals).

7. Data Entities

SAP cron job queue, retry log, audit log; all synced business entities.

8. Entry Points

  • SAP cron; inbound REST endpoints (client/vendor payment).

9. Inputs & Outputs

  • Inputs: queue items, REST payloads.
  • Outputs: SAP requests, IDs persisted, retries, logs.

10. Integrations

  • SAP B1 / HANA endpoints.

11. Calculations / Logic

  • Currency rate lookups, tax mappings, distribution-rule selection.

12. Status Lifecycle

  • Queue: pending → success/error/retry/skipped.

13. Permissions

  • Service-to-service auth; internal cron.

14. Reports & KPIs

  • Sync success rate, retry counts, failure reasons.

15. Risks & Observations

  • Hard-coded credentials in configuration.
  • Retry without exponential back-off (thundering-herd risk).
  • Idempotency relies on SAP IDs only.
  • No transaction guarantees across multi-line invoices + payment details.

16. Source Code Evidence

  • app/Controller/SapController.php.

← Deep dives index