Okay
  Public Ticket #3534057
Registration Role
Closed

Comments

  •  1
    Yunkin started the conversation

    Hello!

    I want to be able to change a customer Registration role in the user registration data section. 

    Some of my B2B customers registered but did not register as the B2B Client (requires approval) role, and I would like to switch them to this registration role. 

    Is this possible?

    Also, how do I change a B2C customer to a registered B2B customer with a registration role?

    Cheers!

    Attached files:  Screenshot 2023-11-30 at 4.40.20 PM.png

  •  1,910
    WebWizards replied

    Hello Yunkin,


    In our plugin, only the group here is the option that controls whether the user is B2C or B2B:

    6562763526.png

    This is found on the same user profile page. To change the user from B2C to B2B or viceversa, you would just change the group.



    The registration role there cannot be changed as this just represents "what the customer chose during the initial registration". It does not have any functionality, it just refers to what was originally chosen.


    I hope that clarifies it. Or is there anything you are not able to achieve by changing the group?


    Kind regards,

    Stefan




  •  1
    Yunkin replied

    Hi Stefan,

    Thank you for the clarification on this, and if there is a way to change the registration role for the customer, please let me know because it helps us identify who are B2B users in an export we use. 

    We use ALL EXPORT, which helps us sort if they're registered as a B2B user from a B2C user. 

    How can we register them as a B2B Client (requires approval) if we manually create their account?

    I want to be able to change all my wholesale customers to have this in their Registration role.

    Cheers!

  •  1,910
    WebWizards replied

    Hi Yunkin,


    (1) I would like to give a few more details on this: as mentioned previously, the registration role does not identify if a user is B2B or B2C, it only shows the option the user requested during initial registration.


    Normally, you can export users and know which users are B2B and which are B2C, by checking this user meta key:

    b2bking_b2buser

    This user meta key has the value yes for B2B users, OR is empty / has value "no" for B2C users.

    This is what we would recommend you look at during a user export.


    In order to manually create a B2B user, all that is needed is to create a user in the B2B users group.

    8794088813.png

    Such a user will have the meta key b2bking_b2buser set to yes, which should also help you identify them in exports.


    (2) If you absolutely must use registration roles for your project, you should know the registration role of a user is set as user metadata for that user. 

    It uses the user meta key: b2bking_registration_role

    This has a value such as: role_1234 where 1234 with the ID of the registration role.


    For example: on my local test site I have the role wholesaler, which has the ID 12 (the ID is in the URL when editing the role):

    3323055197.png

    A user with this registration role will have the following user metadata:

    8568447180.png



    You would need to set this metadata for a user in order to set or change the role.

    There is currently no built-in option in our plugin to allow changing this via some button or functionality, as we only built this for the purpose of knowing what the user originally requested. It can only be changed by modifying the user metadata.


    Kind regards,

    Stefan