Edit in GitHubLog an issue
B2B feature. Learn more
Thanks to Atwix for contributing this topic!

createCompanyTeam mutation

Use the createCompanyTeam mutation to create a new team for your company.

The target_id input attribute allows you to specify which node in the company structure will be the parent node of the company team. If you do not specify a value, the team will be assigned to the top-level (root) node of the company structure.

You can get the target_id with the company query.

This mutation requires a valid customer authentication token.

Syntax

Copied to your clipboard
mutation {
createCompanyTeam(
input: CompanyTeamCreateInput!
) {
CreateCompanyTeamOutput
}
}

Reference

The createCompanyTeam reference provides detailed information about the types and fields defined in this mutation.

Example usage

The following example shows the minimal payload for adding a new team to a customer's company.

Request:

Copied to your clipboard
mutation {
createCompanyTeam(
input: {
name: "Test Team"
}
) {
team {
id
name
description
}
}
}

Response:

Copied to your clipboard
{
"data": {
"createCompanyTeam": {
"team": {
"id": "MQ==",
"name": "Test Team",
"description": null
}
}
}
}

This example creates a child team of the parent team specified in the target_id field.

Request:

Copied to your clipboard
mutation {
createCompanyTeam(
input: {
name: "Test Child Team"
description: "Test Child Team description"
target_id: "MQ=="
}
) {
team {
id
name
description
}
}
}

Response:

Copied to your clipboard
{
"data": {
"createCompanyTeam": {
"team": {
"id": "Mg==",
"name": "Test Child Team",
"description": "Test Child Team description"
}
}
}
}
  • Privacy
  • Terms of Use
  • Do not sell or share my personal information
  • AdChoices
Copyright © 2024 Adobe. All rights reserved.