Manage company structures
Magento Commerce for B2B allows company users to be assigned to company teams and hierarchies.
Manage company teams
Company teams allow you to group company users by location, job responsibilities, or any criteria you choose. You can assign individual company users to a team with the company hierarchy endpoints.
Company team parameters
|id||System-generated team ID||integer||Not applicable for create operations.|
|name||The displayed name of the team||string||Required to create or update a team.|
|description||An optional description of the team.||string||Optional|
Create a team
A newly-created team is placed under Company Admin in the company hierarchy.
The team ID, such as
Update a team
You can only change the name or description of a team.
true, indicating the request was successful
Return all information about a team
GET call returns the team
Delete a team
You cannot delete a team if members are assigned to it.
An empty array
Search for a team
The following query returns information about all teams (
See Search using REST APIs for information about constructing a search query.
In the B2B storefront, a buyer can view the company structure represented as a hierarchy tree. The tree can display multiple levels of company subdivisions (teams) as well as company users. The company hierarchy can have any number of items and levels.
You can use REST endpoints to retrieve the current structure and move teams and buyers within the hierarchy. You cannot delete teams or buyers.
Return all information about the company hierarchy
In the following example, the following company hierarchy has already been established:
Admin (structure_id = 2) |-- East (team, structure_id = 8) | |-- Bryce Martin (customer, structure_id = 4) | |-- Melanie Shaw (customer, structure_id = 3) | |-- West (team, structure_id = 7) | |-- Marcus Thomas (customer, structure_id = 6) | |-- Teresa Gomez (customer, structure_id = 5)
Assign a new parent to teams and company users
The following example moves Bryce Martin (
structure_id = 4) to the West team (
structure_id = 7)
 (an empty array)