ml-connector
SAP Business OneRamp

SAP Business One and Ramp integration

SAP Business One manages your general ledger, purchase orders, and accounts payable. Ramp consolidates corporate spend, cards, and bills into one platform. Connecting them keeps your vendor master and GL accounts in sync, so bills from Ramp post into SAP without re-keying, vendor records stay current in both systems, and your expense coding is accurate from the moment the bill arrives. ml-connector handles the very different authentication models and the constraints of each API to move the data automatically.

How SAP Business One works

SAP Business One is deployed on-premise or partner-hosted at a customer-specific Service Layer URL with no fixed global endpoint. It exposes business partners, purchase invoices, journals, GL accounts, dimensions, and purchase orders through OData v4 REST at <customer-server>:<port>/b1s/v2/. Authentication is a session token obtained via POST /Login, which expires after 30 minutes of inactivity and returns error code -5002 on timeout. Newer versions (v10.0 FP 2602+) support webhooks for Create/Update/Delete events if the Webhook Messenger Service is activated by the SAP administrator, but polling with an UpdateDate filter is the recommended default. There are no published idempotency keys, so duplicates must be detected via document number before retry.

How Ramp works

Ramp is a SaaS spend management platform exposing bills, vendors, purchase orders, transactions, GL accounts, and users through a REST API at https://api.ramp.com/developer/v1. Every request authenticates with OAuth 2.0 Client Credentials; the token endpoint is POST https://api.ramp.com/v1/developer/token, and access tokens valid for 10 days. Ramp supports push webhooks with HMAC-SHA256 signature verification for real-time event notification on bills, vendors, users, and reimbursements, eliminating the need for polling. However, some entities are read-only: GL accounts and entities support read access only, purchase orders cannot be created (only read and patched for memo and line items), and vendors cannot be directly created but are implicitly created when a bill is added. Vendors are created implicitly via bill submission or a separate intake flow.

What moves between them

The primary data flow is from Ramp into SAP Business One. When a bill is created or updated in Ramp, ml-connector receives a webhook event, then posts the bill to SAP as a purchase invoice mapped to the vendor's SAP business partner record and the corresponding GL account. Vendor records created in Ramp are synced to SAP as business partners so the master data stays current. GL accounts, dimensions, and cost centers are read from SAP and used to validate and categorize incoming bills before they post. The sync happens in real-time via Ramp webhooks, while SAP is pull-only, so ml-connector polls SAP on a schedule to confirm successful posting and detect conflicts.

How ml-connector handles it

ml-connector receives Ramp webhook events with HMAC-SHA256 signatures and validates each signature using the registered shared secret. It refreshes its SAP session token before the 30-minute inactivity window expires, avoiding login delays mid-request. When a bill arrives from Ramp, ml-connector checks SAP's purchase invoices for an existing document with the same vendor bill number (using the DocNum field) to prevent duplicates; if found, it skips posting. If the vendor does not exist in SAP, it creates a new business partner record from the Ramp vendor data. The bill amount, line items, and GL account dimensions are mapped according to Ramp's accounting dimensions, which must be pre-aligned with SAP cost centers and profit centers. Ramp's read-only constraints on GL accounts and purchase orders mean the integration is strictly inbound from Ramp; ml-connector reads GL validation tables from SAP but does not write GL changes back to Ramp. If a webhook fails or a Ramp event is out of order, ml-connector retries with exponential backoff and logs every step in the audit trail for replay.

A real-world example

A mid-market consulting firm uses SAP Business One for accounting and project costing, and Ramp for expense management, corporate cards, and bill pay across three offices. Before the integration, accountants received bills in Ramp, verified the vendor and GL account mapping, then manually entered each bill into SAP's accounts payable module, a process that took 2-3 hours per week and introduced keying errors. GL account allocations in SAP did not always match the project and cost center codes recorded in Ramp, so month-end close required reconciliation and reclassification. After connecting Ramp to SAP via ml-connector, bills arrive in Ramp, are automatically posted to SAP as purchase invoices with the correct GL allocation, and the vendor and cost center data flow without re-entry. The accounting team now spends 20 minutes per week validating rule exceptions instead of 3 hours on manual data entry, and the GL is balanced by the time the books are due for review.

What you can do

  • Receive Ramp bills and vendors via webhooks and post them into SAP Business One as purchase invoices and business partners without re-keying.
  • Keep vendor master data synchronized between Ramp and SAP, creating new business partners as needed when new vendors arrive.
  • Map Ramp accounting dimensions to SAP cost centers, profit centers, and GL accounts so bills are allocated to the correct project or cost center.
  • Refresh SAP session tokens before timeout and deduplicate bills using SAP document numbers to ensure the same bill is never posted twice.
  • Validate GL accounts, cost centers, and vendor codes against SAP before posting, with full audit logs for every transaction and the ability to replay failed events.

Questions

Can bills flow from SAP back into Ramp, or is it one-way from Ramp to SAP?
The integration flows primarily from Ramp into SAP Business One. Bills, vendors, and expense data move inbound to SAP for accounting and GL posting. Some Ramp entities like GL accounts and purchase orders are read-only in the Ramp API, so ml-connector reads them to validate outbound bills but cannot write changes back to Ramp.
How does ml-connector handle SAP's 30-minute session token timeout?
ml-connector refreshes the SAP session token before the 30-minute inactivity window expires, so the session stays active across multiple webhook events. If a session does expire, the next request receives error code -5002, triggering an immediate re-login without blocking the event.
What happens if the same bill is received twice from Ramp, or if a webhook is retried?
ml-connector queries SAP for an existing purchase invoice using the vendor bill number (DocNum). If found, it skips posting and logs the duplicate in the audit trail. Because SAP has no published idempotency keys, this document-number check is the primary safeguard against double-posting.

Related integrations

Connect SAP Business One and Ramp

Free to use. Add your credentials, ping your real systems, and see if we fit.

Get started