Okay
  Public Ticket #3520806
Auto sale agent
Closed

Comments

  •  2
    Alexander started the conversation

    How can i set it so that when a customer makes an account on my site they are automatically assigned to a sales agent for example the websites admin account will bte the main sales agent how can i make it so when a customer makes an account they are under that agent by default

  •  2
    Alexander replied

    and how can i move someone that has an account made on my site to be under an agent so i can place an order for them


  •  1,906
    WebWizards replied

    I believe you can achieve that as follows:

    1. Enable the "assign agent automatically at registration" setting:

    3474037119.png

    2. If you want the agent to be the admin (Rather than a random agent), add this PHP code snippet to your site:

    add_filter('salesking_assign_automatically_agent_id', function($agent_id){
        return 1;
    }, 10, 1);
    

    A PHP snippet can be added to functions.php, or by following our guide here: https://woocommerce-b2b-plugin.com/docs/how-to-add-a-snippet-php-or-js/



    and how can i move someone that has an account made on my site to be under an agent so i can place an order for them

    To do that, you can go to the user's profile page on the backend. Then, scroll down to this area and select an agent:

    4864824519.png



    Kind regards,

    Stefan