Business systems

When Should You Integrate Business Systems? Choosing the Right Integration Approach

Learn when business systems should be integrated, how to define data ownership, and when to use synchronous APIs, asynchronous messaging, events, or scheduled synchronization.

The Drix TeamPublished Updated 6 min read
  • Systems Integration
  • Shopify
  • API Integration
  • Event-Driven Architecture
  • Data Synchronization
Business system integration architecture connecting ERP, CRM, APIs, events, and scheduled sync

Business system integration is not just connecting two applications. A useful integration begins with the business process that crosses system boundaries, the exact data that must move, the authoritative system for each domain, how fresh the data must be, and what should happen when communication fails. This guide helps product and engineering teams choose between synchronous APIs, asynchronous messaging/events, or scheduled synchronization, and shows practical patterns for retries, idempotency, monitoring, and ownership after launch.

1. Start With the Business Process, Not the API

Before choosing an API, webhook, message queue, or integration platform, describe the business process that must cross systems: what starts it, which system owns the data, who needs the result, and how critical is immediate response?

  • What business event starts the integration?
  • Which system creates the information?
  • Which system needs it and why?
  • Is an immediate response required?
  • What should happen when the receiving system is unavailable?
  • Who owns ongoing support and monitoring?

2. Define the System of Record Before Synchronizing

Synchronizing the same entity across multiple systems without an authoritative owner causes drift. Assign one authoritative system for each important data domain and document the contract for replicated fields.

  • Assign ownership for entities such as customer, product catalog, inventory, and invoices.
  • Document which fields are authoritative and which can be overwritten.
  • Design reconciliation and conflict-resolution procedures.

3. Decide How Fresh the Data Actually Needs to Be

Not every integration requires real-time updates. The business process should determine whether data must be immediate, near-real-time, or acceptable as a scheduled batch.

  • Real-time: payment confirmation or checkout inventory checks.
  • Near-real-time: order routing to a WMS.
  • Scheduled: nightly analytics or catalog enrichment.

4. Shopify’s cart attributes change and what it enables

On August 6, 2026 Shopify announced that the standard storefront updateCart action now supports cart attributes and that a new shopify:cart:attributes-update event fires whenever an attributes update is initiated. The event carries the complete attributes set (replace‑all semantics) and includes a required promise that resolves with a CartAttributesUpdateResult or rejects on failure.

  • The event fires when a buyer, theme, or app initiates an attributes update and includes the full attributes array that the cart should end up with.
  • event.promise lets front-end code implement optimistic UI by applying event.attributes immediately and awaiting confirmation or rollback.
  • The CartAttributesUpdateResult's returned cart object does not include attributes; consumers should read event.attributes or fetch attributes separately after success.
  1. 1See the Shopify changelog for the announcement and date: https://shopify.dev/changelog/events-and-actions-cart-attributes-support.
  2. 2Consult the event reference for payload shape, promise semantics, and examples: https://shopify.dev/docs/api/storefront-events-and-actions/events/cart-attributes-update.
  3. 3Review updateCart action docs to understand how attributes integrate with existing cart updates and refresh behavior: https://shopify.dev/docs/api/storefront-events-and-actions/actions/update-cart.

5. Optimistic UI pattern using shopify:cart:attributes-update

Implement an optimistic update by applying event.attributes to the UI immediately, then await event.promise. If the promise resolves cleanly, keep the changes; if it resolves with userErrors or rejects, revert and surface the errors.

  • Apply event.attributes on event dispatch to reduce perceived latency.
  • Store a snapshot of prior attributes to support rollback if needed.
  • Handle resolved userErrors by reverting optimistic state and showing an accessible, actionable error message.
  • On promise rejection, dispatch or listen for shopify:cart:error per Shopify guidance to coordinate cross-component error workflows.
  1. 1When dispatching an update, send the full attributes array (replace-all).
  2. 2Before applying optimistic UI, cache the previous attribute set for deterministic rollback.
  3. 3Await event.promise; on success keep changes, on userErrors or rejection revert and log details (cart id, errors) for debugging.

6. When to call Shopify.actions.updateCart vs direct Storefront API

Prefer Shopify.actions.updateCart inside themes or when you want consistent storefront refresh semantics and event emission. Use direct Storefront API for server-side workflows or when you must bypass theme refresh behavior.

  • Pros of updateCart: unified client-side behavior, standard event emission, and potential in-place UI refresh depending on theme configuration.
  • Pros of direct Storefront API: appropriate for server-to-server writes, bulk operations, or when you intentionally bypass theme refresh behavior.
  • Do not assume identical refresh across stores—if a storefront hasn't configured standard actions, the fallback may be a full-page reload.

7. Testing & QA checklist

Concrete tests to validate optimistic flows, rollback behavior, and interoperability across themes and apps.

  • Simulate concurrent attribute updates from theme and third-party apps to expose race conditions.
  • Test optimistic update followed by network failure and verify rollback and error messaging.
  • Validate that omitting attributes in the payload removes them from the cart (replace-all semantics).
  • Test across multiple themes to detect different refresh behaviors (in-place vs full reload).
  • Verify accelerated checkout and payment flows to ensure attributes persist as required; treat this as an uncertainty and validate per-store.

8. Security, data integrity, and a sample migration plan

Cart attributes are client-settable and should not be trusted for security-critical decisions. Log promise outcomes and plan a staged migration for shops that previously used direct Storefront API calls or polling.

  • Validate attribute values on the server before using them in business logic.
  • Log event.promise resolutions/rejections and userErrors with cart id for observability and debugging.
  • Migration checklist: inventory current attribute write callers, implement the event/action pattern in a small canary subset, monitor for desyncs, then expand rollout.
  • Add automated tests for rollback paths, race conditions, and accessibility of error messages.
  1. 1Inventory callers that modify attributes (theme code, apps, server integrations).
  2. 2Implement optimistic listener/dispatcher in staging and run simulated concurrent updates.
  3. 3Monitor metrics (userErrors, promise rejections) and add alerts before full production rollout.
  4. 4Update docs and QA suites to include new event-based flows.

Frequently Asked Questions

Does shopify:cart:attributes-update include a promise? Yes. The event includes a required promise property that resolves with a CartAttributesUpdateResult when the update completes and rejects on failure; the promise may resolve with userErrors describing validation issues.

Will attributes appear in the cart object returned by the promise? No. The CartAttributesUpdateResult's cart object does not include attributes; consumers should read event.attributes for the set saved to the cart or fetch attributes separately after success.

Conclusion

Shopify's updateCart attribute support and the shopify:cart:attributes-update event provide a standard, event-driven way to implement optimistic cart-attribute updates that interoperate across themes and apps. Implementers should apply event.attributes optimistically, await event.promise, test rollback and race conditions, and prefer updateCart inside storefronts while using Storefront API for server-side needs.

Limitations

Shopify's changelog and docs announce the feature but do not explicitly state rollout scope per shop; teams should validate availability and accelerated-checkout interactions in their stores.

Sources and references

Have a project idea and need a clear technical decision? Let’s define the right next step

We help you understand the requirements and define the right scope before development begins.

Book a consultation