Anchor to section titled 'undefined'

companyLocationAssignStaffMembers
mutation

Requires write_customers access scope or write_companies access scope. Also: The API client must be installed on a Shopify Plus store.

Creates one or more mappings between a staff member at a shop and a company location.


Anchor to companyLocationId
companyLocationId
required

The ID of the company location to assign the staff member to.

Anchor to staffMemberIds
staffMemberIds
required

The list of IDs of the staff members to assign.


Was this section helpful?

The list of created staff member assignments.

The list of errors that occurred from executing the mutation.


Was this section helpful?
Hide code
Mutation reference
Copy
mutation companyLocationAssignStaffMembers($companyLocationId: ID!, $staffMemberIds: [ID!]!) {
  companyLocationAssignStaffMembers(companyLocationId: $companyLocationId, staffMemberIds: $staffMemberIds) {
    companyLocationStaffMemberAssignments {
      # CompanyLocationStaffMemberAssignment fields
    }
    userErrors {
      field
      message
    }
  }
}
Hide code
Input
Copy
{
  "companyLocationId": "gid://shopify/<objectName>/10079785100",
  "staffMemberIds": [
    "gid://shopify/<objectName>/10079785100"
  ]
}