Staff and Agent Functionality Overview¶
Key functionalities
- Distributor Staff Registration and Permissions
- Agent Management by Distributor Staff
- Asset and Permissions Assignment
Queries for Retrieving Information
Workflow
Additional Notes
Testing Distributor Staff
Documentation for Distributor Staff and Agent Functionality¶
Overview
This section of the documentation outlines the functionalities and roles of Distributor Staff and Agents within our system. Distributor Staff, deriving their permissions from the Master Distributor, have extensive access rights, including the creation of Agents. Agents' access and control are limited and defined by the permissions allocated to them by the Distributor Staff.
A Distributor Staff member is a user associated with a particular Distributor. Their functions closely resemble those of a Distributor, with the exception that a Distributor Staff member is unable to create another Distributor Staff. Instead, they possess the ability to create Agents.
Moreover, a Distributor Staff member holds the authority to assign Asset Accounts to Agents. This responsibility entails managing the distribution of these accounts within the network.
These staff members are designated specific roles and responsibilities by the master distributor. To access the system, they are granted login privileges using unique tokens. These tokens confer upon them precise permissions and access rights corresponding to their designated roles.
It's important to highlight that the email addresses of distributor staff cannot be employed for making API calls or engaging with the system in that fashion. This limitation is in place to uphold security measures and exercise control over API usage. This approach enables distributor staff to effectively carry out their designated tasks within their authorized operational scope while maintaining the system's integrity.
Key Functionalities¶
Distributor Staff Registration and Permissions
● Mutation: distributorRegisterDistributorStaff
- Purpose: To register new Distributor Staff.
- Input: distributorRegisterDistributorStaffInput
- Returns: DistributorStaff
● Mutation: updateDistributorStaff
- Purpose: To update the details of existing Distributor Staff.
- Input: updateDistributorStaffInput
- Returns: DistributorStaff
● Mutation: deleteDistributorStaff
- Purpose: To remove a Distributor Staff from the system.
- Input: distributorStaffId
- Returns: String (confirmation message)
● Mutation: signUpDistributorStaff
- Purpose: To complete the registration process for a Distributor Staff.
- Input: signUpDistributorStaffInput
- Returns: User
Agent Management by Distributor Staff¶
●Mutation: distributorStaffRegisterAgent
- Purpose: To register a new Agent under the Distributor Staff.
- Input: distributorStaffRegisterAgentInput
- Returns: Agent
● Mutation: updateAgent
- Purpose: To update an Agent's details.
- Input: updateAgentInput
- Returns: Agent
● Mutation: deleteAgent
- Purpose: To delete an Agent.
- Input: agentId
- Returns: String
Asset and Permissions Assignment¶
● Mutation: assignAssetAccountToAgentByDistributorStaff and removeAssetAccountFromAgentByDistributorStaff
- Purpose: To assign or remove asset accounts to/from an Agent.
- Input: assignAssetAccountToAgentInput
- Returns: Success
● Mutation: assignItemToAgent and removeItemFromAgent
- Purpose: To assign or remove items to/from an Agent.
- Input: assignItemToAgentInput
- Returns: Success
● Mutation: assignPermissionsToAgent and deletePermissionsFromAgent
- Purpose: To assign or delete permissions for an Agent.
- Input: assignPermissionToSubRoleInput
- Returns: Success
Queries for Retrieving Information¶
● Query: getAllAgentsForSpecificDistributorStaff and getAllDistributorStaff
- Purpose: To retrieve lists of all Agents or Distributor Staff.
- Parameters: search, before, after, first, last
- Returns: GetAllAgentsResponse or GetAllDistributorStaffResponse
● Query: getSpecificDistributorStaff and getSpecificAgent
- Purpose: To retrieve details of a specific Distributor Staff or Agent.
- Input: id
- Returns: DistributorStaff or Agent
Workflow¶
● Registration Process: The registration of Distributor Staff and Agents is initiated by the Master Distributor and Distributor Staff respectively. An email is sent to the invitee to complete the registration.
● Permission Allocation: Distributor Staff allocate permissions to Agents based on the access rights granted to them by the Master Distributor. These permissions can be assigned in bulk or individually.
● Asset and Item Management: Distributor Staff can assign and remove asset accounts and items to/from Agents. The assigned permissions dictate the Agent's functional scope related to these assets and items.
The diagram below will explain in how Distributor Staff is linked to masterDistributor and the Agent.

Distributor-staff Arch PlantUml code. (1)
Lets break down the diagram.
- Master Distributor - The starting point, responsible for registering Distributor Staff.
- Distributor Staff - Have various functions such as updating their details, managing agents, assigning assets and permissions, and making queries.
- Agent - Managed by Distributor Staff, with limited access and control.
Additional Notes
● Access Limitations: Distributor Staff cannot create another Distributor Staff or generate certain codes eg. (DAYSCODE, RESETCODE, FREECODE) via the API, though they can do so on the ERM portal.
● Permissions Hierarchy: The permissions available to the Distributor Staff are a subset of those held by the Master Distributor. This hierarchy governs the scope of permissions that can be
Testing Distributor Staff¶
To test the functionality of the distributor staff, you need to test against the permission that the distributor staff is tied to. The following are the permissions that a distributor staff has:
Distributor Staff Permissions
"name": "getSpecificCodeEvent" =
"name": "generateCodeGenerator"
"name": "generateDaysCode"
"name": "generateFreeCode"
"name": "generateResetCode"
"name": "getSpecificCodeGenerator"
"name": "initializeCodeGen"
"name": "getAllCodeSystems"
"name": "getSpecificCodeSystem"
"name": "getSpecificItem"
"name": "getSpecificItemBatch"
"name": "getSpecificItemFleet"
"name": "getSpecificItemSKU"
"name": "getSpecificItemStock"
"name": "getSpecificShipment"
"name": "getAllEvents"
"name": "getSpecificEvent"
"name": "assignCodeGeneratorToItem"
"name": "getSpecificAssetAccount"
"name": "getSpecificAssetAccountCreditBalance"
"name": "getItemFleetsForClient"
"name": "getAllClientItemsInItemFleet"