0

We have a scenario where the client will add customers (company information) with properties like Company Id, Company Name from the business tool as user specific.

Lets say a scenario, where I am the storefront user, I have created an account from the website. So the business team will map this user to the different CommerceCustomers.

As we know, we usually create the CommerceCustomer using the CustomerServiceProvider and its pipelines.

As per our case, we wanted to create the commerce customer from the plugin and do the mappings.

Please suggest me a solution for this. Thanks in advance !

Here are the few screenshots of the process we have.

enter image description here

0

I would suggest to create a new one commerce entity like Company. This entity will have fields like Company Id, Company Name and etc.

Extend Customer entity with custom component, which will store the entity id reference to the related company entity.

Then you can go with OOTB user registration flow and when user will be created in commerce engine you can manually set/change linked company through the XC BizFx interface.

Of course, it's a high level solution, but something similar you should implement.

| improve this answer | |
  • Well exactly. I have implemented more similar to what you are referring for. I have created a Company Component in User entity. So that user can add multiple companies in his profile and stored on his entity. We have an API written which will triggered from engine when any company is approved the CommerceCustomer entity will be created for mappings. So this way we have achieved B2C model – Vignesh Chandrasekar Sep 30 at 3:24
  • Thanks for your suggestion ! – Vignesh Chandrasekar Sep 30 at 3:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.