Skip to Content
Apr 28, 2020 at 09:29 AM

Replicate B2B Customer from Sap Commerce to Erp - Customer ID not generated



we used secureportaladdon to allow the registration of a b2b customer, the procedure is successful the b2b customer is registered.

We have configured customer replication from sap commerce to erp but the Customer ID is not generated.

Following the guide B2B Early Login User Experience, when an approver accepts the request the Interceptor DefaultB2BCustomerInterceptor is invoked

but the check on the basestore if (!getB2bCustomerExportService().isB2BCustomerReplicationEnabled())

it gets us out of the method. The reason is that having operated from the backoffice (an approver has just accepted a request and for this reason a b2b customer is created) no basestore is set in session.

Thie DefaultB2BCustomerInterceptor class is invoked at other times such as when an approver sets the password to the b2b client, but also in this case we have no basestore in session.

The first time the user logs in, the DefaultB2BCustomerInterceptor class is called again but because the b2b customer is not new, this code is not executed

and consequently the Customer ID is not generated for the b2b customer