There is no OOTB method that can do it, you need to customise it.
Start from looking into RegisterUser
method in Sitecore.Commerce.XA.Foundation.Connect.Managers.IAccountManager, Sitecore.Commerce.XA.Foundation.Connect
.
This method calls the commerce.customers.createUser
pipeline and this pipeline calls a pipeline processor Sitecore.Commerce.Engine.Connect.Pipelines.Customers.CreateUser, Sitecore.Commerce.Engine.Connect
that creates a customer in commerce engine.
The code in the processor
- Gets an entity view for the customer from commerce engine, an entity view contains the property collection which you can set, (this is similar to BizFx where you click Add button for a customer)
- Then it sets the specific property with values received in request, e.g.
DomainName
, LoginName
etc.
- Then it calls a
DoAction
API operation to save it in commerce engine.
Copy the existing processor code and replace with your copied one and debug it, it will give you good idea.
You need to send your tags details in the "Tags" property.
It depends on your specific scenario that how much you need to customize but you can replace the AccountManager
implementation with yours as well if needed.