Skip to main content

Assign users to order list

Assign contacts to an order list so the list's product restrictions apply to them.

Mutation

mutation AssignUsersToOrderlist($id: Int!, $input: OrderlistUsersInput!) {
orderlistAssignUsers(id: $id, input: $input) {
id
usersPaginated(input: { offset: 50, page: 1 }) {
items {
... on Contact {
contactId
firstName
lastName
}
}
itemsFound
}
}
}

Variables

{
"id": 230,
"input": {
"userIds": [312, 42]
}
}

Response

{
"data": {
"orderlistAssignUsers": {
"id": 230,
"usersPaginated": {
"items": [
{ "contactId": 312, "firstName": "Lisa", "lastName": "de Vries" },
{ "contactId": 42, "firstName": "Tom", "lastName": "Hendriks" }
],
"itemsFound": 2
}
}
}
}

How it works

Pass the order list id and a list of userIds (contact IDs) to assign. The response includes the full user list so you can verify the assignment. To assign at the company level instead of individual contacts, use orderlistAssignCompanies with companyIds.

See also