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
dataJobId
}
}{
"data": {
"updateDataSet": {
"dataSetId": "4fe4136f-c007-44a3-b38f-92220xxxxxxxx",
"dataJobId": null
}
}
}A non-null dataJobId means the change hasn't been applied yet. Poll the data job to confirm completion.
Arguments
Arguments required by the updateDataSet object
| Argument | 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. Only name is 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 | 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. | |
mapAs | Enumeration. Valid values: FIRST_NAME, LAST_NAME. | Maps the attribute to a standard personalization field. |
Fields
Fields returned by the updateDataSet mutation
| Field | Values | Required? | Definition |
|---|---|---|---|
dataSetId | ID | Required | The ID of the audience |
dataJobId | ID | Optional | A non-null dataJobId means the change hasn't been applied yet. Poll the data job to confirm completion. |
Possible error messages
| Error code | Definition |
|---|---|
ATTRIBUTE_NOT_DEFINED | There is no contact attribute with this name in the current audience. |
