To assign a contact attribute to another category or to reset the current category selection, use the updateDataSet
mutation.
mutation {
updateDataSet(
where: { dataSetId: "4fe4136f-c007-44a3-b38f-92220xxxxxxxx" }
to: {
attributes: {
update: [
{ name: "iPhone user", category: "Demographic" }
{ name: "First Name", category: "Contact information" }
]
}
}
) {
dataSetId
}
}
{
"data": {
"updateDataSet": {
"dataSetId": "4fe4136f-c007-44a3-b38f-92220xxxxxxxx"
}
}
}
Arguments
Arguments required by the updateDataSet
object
Argument name | Nested field | Values | Definition |
---|---|---|---|
where | dataSetId | ID | The ID of your audience |
to | attributes | See nested fields | The changes you want to make |
Fields nested inside attributes
(all of them are required)
Field | Nested field | Values | Definition |
---|---|---|---|
update | name | String (case-sensitive) | The name of the contact attribute to update |
category | String To reset the current category, submit the null value. | The name of a new category for the contact attribute. Use the Get all categories of contact attributes query to get the list of supported values. |
Fields
Fields returned by the updateDataSet
mutation
Field | Values | Required? | Definition |
---|---|---|---|
dataSetId | ID | Required | The ID of the audience |
Possible error messages
Error code | Definition |
---|---|
ATTRIBUTE_NOT_DEFINED | There is no contact attribute with this name in the current audience. |