B2B integrations in Magento 2: Profiles, Mappings and sync control in B2B Suite

12 min read 8 views

Integrating Magento 2 with ERP, PIM, WMS or CRM involves more than sending data to an API. You also need to identify the company concerned, link identifiers, check the outcome and handle messages the other system rejects. In B2B sales, these steps determine whether orders reach fulfillment, customers are correctly identified and agreed price lists reach the right channel.

Integrations in Kowal B2B Suite organizes this work into five areas: Profiles, Mappings, Sync Jobs, Dead Letter Queue and Sync Errors. Below, we explain how they work and how to use them in everyday B2B integration operations.

This description reflects the implementation reviewed in November 2026. Examples are illustrative and assume an adapter has been deployed for the relevant system and operation.

What does Integrations provide, and what does the adapter do?

Integrations supplies shared infrastructure: profile configuration, ID mappings, a job register, attempt tracking, results and error history. An adapter handles the actual ERP, PIM, WMS or CRM connection: it understands that system’s API and data exchange rules.

The adapter defines authentication, message formats, field transformations and operation execution. Selecting “ERP” as the profile type describes its purpose; it does not automatically install a ready-made connection to any ERP application.

Similarly, saving a job registers work to be done. The form itself does not start a recurring background process. Job processing and selection must be connected during implementation, for example through a worker, scheduler or middleware using the provided logic and API.

Five screens, five specific questions

ScreenWhat question does it answer?Use case
ProfilesWhich system, channel and configuration are we working with?Setting an ERP profile for a website
MappingsWhich Magento record corresponds to an external record?Linking a B2B company to an ERP customer record
Sync JobsWhat should run and what is its current outcome?Tracking order exports or data imports
Dead Letter QueueWhich jobs have exhausted their attempts?Operations requiring operator intervention
Sync ErrorsWhat went wrong and which job is affected?Error analysis with profile, website and attempt context

These elements describe the same process from different perspectives. The profile defines context, mappings connect records, a job represents an operation, and the last two views help handle failures.

Profiles: integration configuration for the right website

In B2B > Integrations > Profiles, you create and edit integration profiles. Each belongs to a specific Magento website with B2B enabled. This separates sales-channel configuration, such as domestic and export channels operating as separate websites.

A website is Magento’s organizational sales-channel unit here. Multiple language views within one website do not automatically mean multiple independent integrations.

Profile fieldMeaningExample
WebsiteSales channel covered by the profileWholesale website
Code and NameCode unique within the website and a readable nameerp_orders, “Orders to ERP”
System TypeSystem category: ERP, PIM, WMS or CRMERP
Adapter CodeIdentifier of the adapter handling the connectionCode agreed with the integrator
DirectionImport, Export or BidirectionalExport for sending orders
ActiveProfile activity; new-job forms use active profilesActive after configuration
Max AttemptsDefault attempt limit for a job3 attempts
Config JSONConfiguration interpreted by the adapterEnvironment settings and a credentials reference

Config JSON has no universal field set for every integration. The adapter determines the meaning of its keys. The form validates JSON syntax, but does not replace a connection test against the target system. Supply credentials through references to secure configuration, as required by the adapter.

In practice, the integrator uses a named profile instead of repeating ERP settings across independent scripts. The operator can see which system and exchange direction the process handles.

Mappings: linking Magento and external identifiers

The same company may have ID 42 in B2B Suite and code ERP-C-0084 in ERP. A person recognizes one customer; the integration needs an explicit link to read or update the correct record.

Mappings stores the website, system type, entity type, local ID, external ID and optional JSON metadata. The interface includes companies, customers, products, categories, price lists, orders, RFQs and documents.

Entity typeLocal IDExternal IDMeaning
Company42ERP-C-0084B2B company corresponds to an ERP customer record
Price List7ERP-PRICELIST-DEALERSMagento price list corresponds to a set of commercial terms
Order12345ERP-SO-92018Order has a linked ERP document

The table values are examples. The adapter decides how a local identifier is represented for each entity. Mappings can be looked up using either the local or external ID.

Mappings links record identities; it is not a visual field-transformation editor. A rule such as “ERP customer name goes into Magento’s company field” belongs to the adapter. Saving a mapping alone neither fetches data nor performs synchronization.

Mapping context includes website, system type and entity type. A mapping is not exclusive to one profile. With several connections of the same type within one website, the integrator must plan consistent record identification. Within that context, the database enforces uniqueness of both local and external IDs.

Sync Jobs: tracking work and synchronization progress

A Sync Job represents a specific operation, such as sending one order to ERP. In Schedule Sync Job, select an active profile, entity type and operation. You can supply direction, JSON input, an idempotency key, attempt limit and scheduled time. Unless overridden, direction comes from the profile.

The entity type and operation name must be understood by the adapter. A name such as export_order may be part of your agreed solution, but entering it alone does not implement export support.

Opening a job with View shows its summary, input, adapter result, logs and errors. You can check website, profile, direction, entity, operation, attempt count, idempotency key and scheduled, start and finish times.

StatusMeaning in this mechanism
pendingJob saved and waiting for processing
runningAn execution attempt started and the attempt counter increased
successAdapter finished without throwing an exception and saved a result
failedAdapter execution failed, but the attempt limit has not been reached
retryExisting job scheduled again
deadA failed attempt exhausted the limit; the job appears in Dead Letter Queue

Interpret success according to the adapter’s contract. If the external API only accepts a message for later processing, establish whether the result means request acceptance or confirmed completion of the business operation.

The scheduled time is information for the worker. Setting a date does not replace running that process or defining how it selects jobs ready for execution.

Idempotency: limiting duplicate jobs

Middleware may submit the same operation again after a connection drops. An idempotency key identifies an existing job. Publishing with the same key within the same website returns the existing record instead of creating another.

The key should identify a particular business operation, such as exporting a specific order version. It is shared across the website, so include recognizable system and operation context. Reusing an old key does not update the input of an existing job.

This protects against duplicate job registration. Preventing duplicate effects in ERP, such as a second document after an uncertain connection outcome, must also be addressed by the adapter and external API capabilities.

Dead Letter Queue: jobs needing an operator’s decision

Dead Letter Queue shows jobs with status dead. It is a view of the same job records, not another copy of the messages. It isolates operations that could not finish within their allowed attempts.

With a limit of three, the third failed adapter execution sets the job to dead. This does not mean the module automatically runs three consecutive attempts. Further executions and any delays depend on the retry handling and worker deployed in the store.

The operator opens the job, investigates and fixes the cause, such as a missing customer mapping or connection settings. They can then use Retry Job.

Retry is available for failed and dead jobs. It creates no new job and does not reset the attempt history. It sets retry, schedules the retry for the current time and clears the previous start and finish timestamps. If the limit was exhausted, it increases it to allow one more attempt. The adapter runs only when the job is subsequently processed.

Sync Errors: error history with job context

Sync Errors lists errors recorded during adapter execution: code, message, time and retry eligibility. The list connects these with the current job, profile and website context, helping distinguish a single-customer issue from a connection-wide failure.

Job details contain associated errors and technical logs. Logs show events such as starting, finishing and scheduling retries. Error data also retains a technical trace useful to the integrator.

One job can have several error entries from successive attempts. The number of errors therefore does not equal the number of outstanding operations. A job that later succeeds may still retain earlier errors in its history.

The Retryable flag here depends on the attempts remaining when the error occurs. It does not automatically determine whether the cause is temporary. Retrying alone will not fix an invalid ID, even if another attempt is permitted.

The basic distinction: Sync Errors helps investigate causes; Dead Letter Queue lists jobs that exhausted their attempts.

Scenario 1: linking a B2B company to an ERP customer

Company Alfa has a Magento account and an existing ERP customer record. The team wants to avoid creating a duplicate customer.

  1. The integrator prepares the ERP adapter and a profile for the correct website.
  2. Mappings links company 42 to ERP-C-0084.
  3. The adapter’s job uses the mapping to target the existing record.
  4. The operator checks the result and returned identifiers in Sync Jobs.

The benefit is a consistent customer identity. Which fields are updated and which system owns them remain part of the agreed integration scope.

Scenario 2: a B2B order reaches ERP after an outage

A customer orders and the deployed mechanism creates an export job. ERP is temporarily unavailable. Adapter execution fails, an error is recorded and the job becomes failed or, after exhausting attempts, dead.

Once connectivity returns, the operator checks the previous attempt’s outcome in ERP and schedules Retry for the same job. The adapter should recognize any existing document to avoid recreating it if the original request was accepted despite a lost response.

After successful completion, the job result may contain the ERP document ID and the adapter may save a mapping. Result contents and mapping creation timing depend on the connection implementation.

Scenario 3: updating a price list for the right B2B channel

ERP is the source of agreed commercial terms. The wholesale channel has an import profile and a mapping from price list 7 to ERP-PRICELIST-DEALERS.

The adapter reads ERP data, checks SKUs, currency and quantity breaks, then saves it according to the Pricing module’s rules. A Sync Job tracks the operation, and the adapter result can summarize processed entries. If a problem occurs, the operator has the job context and error message.

Integrations manages the workflow; price-selection rules remain in Pricing. We explain them in the article on B2B price lists and Price List in Magento 2. Validation scope, partial-write handling and index updates must be defined in the adapter.

Scenario 4: a recurring error requires a data correction

A warehouse system rejects an operation because it cannot identify a product. Retrying alone changes nothing. The job exhausts its attempts and appears in Dead Letter Queue.

The operator opens View Job, reads the message and checks IDs. If a missing link is the cause, they correct Mappings. After fixing it, they select Retry Job and check the next execution’s result.

This shows why both mappings and error history matter. The queue makes it possible to revisit an operation, while diagnosis identifies what must be repaired before another attempt.

Implementing Integrations step by step

  1. Choose the first process. Start with order exports, for example, rather than connecting every area at once.
  2. Establish data sources. Decide which system owns customer data, price lists or fulfillment status, and how conflicts are resolved.
  3. Prepare the adapter and worker. Define operations, formats, authentication, execution and retry rules.
  4. Configure Profiles and Mappings. Check website, direction and IDs using real cases.
  5. Test success and failure. Include unavailable APIs, invalid data, repeat submission and exhausted attempts.
  6. Check the business outcome. Confirm the correct target record as well as the job status.
  7. Assign operational ownership. Decide who monitors Sync Errors and Dead Letter Queue and who fixes data or connections.

This measures integration by correctly handled operations and issue-resolution time, rather than merely whether an API connection exists.

Frequently asked questions about Integrations in B2B Suite

Does an ERP profile provide a ready-made integration with every ERP?

No. It stores context and configuration. An adapter built for the system’s API and agreed processes handles communication.

Does Mappings map import fields?

This screen links local and external record IDs. Field transformations and data formatting belong to the adapter.

Does clicking Retry send data immediately?

No. It reschedules the existing job. Data is sent or retrieved on the next execution by the connected processing mechanism.

How does Dead Letter Queue differ from Sync Errors?

Dead Letter Queue shows dead jobs; Sync Errors shows recorded errors with job context. History can retain errors from operations that later succeeded.

Does the module automatically retry every few minutes?

It stores scheduling times, statuses and counters and provides retry support. Processing schedules, delays and any automatic selection for another attempt must be configured in the execution solution.

Can integration be managed through an API?

B2B Suite’s API supports profiles and mappings, publishing, processing and retrying jobs, and reading jobs, logs and errors. It requires integration permissions and website context where the operation uses it.

B2B integration your team can control

Profiles organizes configuration, Mappings record identity, Sync Jobs progress, and Dead Letter Queue and Sync Errors failure handling. Together they provide a foundation for Magento 2 back-office integration that can be extended with company-specific adapters.

Explore Kowal B2B Suite for Magento 2 Open Source or tell us which process you want to connect to ERP, PIM, WMS or CRM. Start with the system, exchange direction and one operation that currently requires manual work.

Read also: reducing manual B2B sales handling and the cost of manual B2B order processing.

Keep reading

B2B price lists in Magento 2: how does Price List work in Kowal B2B Suite?

B2B price lists in Magento 2: how does Price List work in Kowal B2B Suite?

11 min read 6 views
How can you set company prices, combine price lists and use quantity breaks in Magento 2? Explore Price List in Kowal B2B Suite through six practical scenarios.
Read more
How to Reduce Manual B2B Sales Handling in Magento 2?

How to Reduce Manual B2B Sales Handling in Magento 2?

7 min read 14 views
See how Kowal B2B Suite reduces manual order handling and adds contract pricing, RFQ, limits, approvals, and documents to Magento 2.
Read more
How Much Does Manual B2B Order Processing Really Cost?

How Much Does Manual B2B Order Processing Really Cost?

7 min read 7 views
Check where the cost of manual B2B order processing comes from and how Kowal B2B Suite helps move pricing, RFQ, limits, approvals, documents, and quick orders into Magento 2.
Read more
Update cookie preferences