To start taking advantage of the data in your reference sets, you must connect them to your audience and — if necessary — to each other.
You can connect the audience to a reference set that is connected to another reference set. Unlike the audience, reference sets support only one-level connections.
Connections are established based on a common attribute. The source and destination attributes must be of the same type (for example, text/text or date/date). To learn more about the options, see our marketing guide - Create connections.
To establish any of these connections, use the addReferenceSetAssociation
object.
mutation {
addReferenceSetAssociation(
dataSetAssociation: {
to: "b4fc145e-680a-4fc6-9d7a-00000000001"
from: "a7c170d2-51d5-4c86-9a28-000000au1"
mappings: { toAttribute: "ID", fromAttribute: "Unique ID" }
}
) {
to {
dataSetId
name
}
from {
dataSetId
name
}
}
}
{
"data": {
"addReferenceSetAssociation": {
"to": {
"dataSetId": "b4fc145e-680a-4fc6-9d7a-00000000001",
"name": "Focus group participants"
},
"from": {
"dataSetId": "a7c170d2-51d5-4c86-9a28-000000au1",
"name": "Green store"
}
}
}
}
Arguments
Arguments supported by the addReferenceSetAssociation
mutation
Argument | Nested field - level 1 | Nested field - level 2 | Values | Required? | Definition |
---|---|---|---|---|---|
dataSetAssociation | to | ID | Required | The ID of the target reference set | |
from | ID | Required | The ID of the source data set. If you are connecting a resource set to the audience, the audience is always the source data set. It cannot be a target data set. | ||
mappings | toAttribute | String | Required | The name of the key attribute in the reference set (it will be used for mapping) | |
fromAttribute | String | Required | The name of the attribute that the reference set will be mapped to |
Fields
Fields returned by the addReferenceSetAssociation
mutation
Field | Nested field - level 1 | Definition |
---|---|---|
to | dataSetId | The ID of the target data set |
name | The name of the target data set | |
from | dataSetId | The ID of the source data set |
name | The name of the source data set |