Cert++
Close

Synchronous service calls versus asynchronous job-based integration

Key Takeaway

A synchronous service call makes the storefront request wait until the third party responds or times out. Use it for live answers and keep its timeout low. Use a scheduled job when the data doesn't need to be current right now.

B2C Commerce connects to third-party systems in two main ways. A synchronous integration calls a service in real time through the web service framework, while the storefront request waits for the answer. An asynchronous integration runs as a job at a set time. The job moves data through files or API calls when no shopper is waiting on the result. Your choice decides whether shoppers see live data and how long they might wait for it.

Synchronous and asynchronous integration

B2C Commerce has two main integration interfaces: the web service framework and scheduled jobs. Both are available in Business Manager. Which one you use depends on whether the data must be current right now.

Synchronous (real-time)Asynchronous (batch)
InterfaceWeb service frameworkScheduled jobs
When data movesImmediately: data is visible or updated right awayAt a specific time
Use it whenA stateless design needs live answersReal-time data views or updates are not necessary
ExamplesLoyalty points, tax calculation, a real-time order history view from an order management system (OMS)Catalog imports from a product information management (PIM) system, order exports to an OMS, customer data exports to a CRM

For tax calculation, send the whole basket in one request rather than one request per product line item. Per-item requests make the integration stateful and force retries when one item fails. They also risk hitting the quota of eight HTTP requests per storefront page.

The two interfaces are not either/or. One project can use both. The best practice is for a job to make its file uploads, downloads, and third-party API calls through the web service framework.

B2C Commerce Developer Study Guide

Checklist progress

0/237Learned

Prepare for the Exam

Play Today's Certle

Study Community

Ask questions and get the latest info from other B2C Commerce Developer studiers. 796 members and growing.