Customer Pools
Last updated
Last updated
About
Team© 2024 Sylius. All Rights Reserved
Customer Pool is a collection of Customers that is assigned to a specific channel. Thanks to this concept, if you have two channels, each of them has a separate customer pool, then customers that have accounts in channel A, and have not registered in channel B, will not be able to log in to channel B with credentials they have specified in channel A (which is the behavior happening in Sylius CE). This feature allows you to sell via multiple channels, creating an illusion of shopping in completely different stores, while you still have one administration panel.
Customer pool management is available in the administration panel in the Customers section.
New customer pools can be added through the admin UI in the section Customer Pools or via fixtures, as it is configured in src/Resource/config/fixtures.yaml
for the plus
fixture suite.
The configuration looks like that:
Customer Pool can be assigned to a Channel, but only during its _creation_ in the Admin panel. Currently, it is not possible to modify the User Pool after the channel is created, as it would lead to certain edge cases with customers losing access to channels, after improper admin operations.
There is also a possibility to choose a specific customer pool during channel or shop customer creation in fixtures (remember to create a customer pool before assigning it to a channel):
As usual, use a factory. The only required fields for the CustomerPool entity are code
and name
, provide them before adding it to the repository.
To assign a Customer Pool to a Channel programmatically use this simple trick: