---
updatedAt: 2026-09-02T13:22:56.000Z
---

# Connect reference sets

To start taking advantage of the data in your reference sets, you must connect them to your audience and — if necessary — to each other.

In the example below, we map the **Last Order ID** audience attribute to the **ID** attribute in the **Order History** reference set. This will enable Connect to pull order details for each client.

```graphql Mutation
mutation {
  addReferenceSetAssociation(
    dataSetAssociation: {
      to: "b4fc145e-680a-4fc6-9d7a-00000000001"
      from: "a7c170d2-51d5-4c86-9a28-000000au1"
      mappings: { toAttribute: "ID", fromAttribute: "Last Order ID" }
    }
  ) {
    to {
      name
      dataSetId
      type
    }
    from {
      name
      dataSetId
      type
    }
  }
}
```
```json Response
{
  "data": {
    "addReferenceSetAssociation": {
      "to": {
        "name": "Order history",
        "dataSetId": "b4fc145e-680a-4fc6-9d7a-00000000001",
        "type": "REFERENCE_SET"
      },
      "from": {
        "name": "Marketing",
        "dataSetId": "a7c170d2-51d5-4c86-9a28-000000au1",
        "type": "AUDIENCE"
      }
    }
  }
}
```

# How it works

* 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](https://connect.goacoustic.com/hc/en-us/articles/31249187795097-Create-connections).

# Running the mutation

If you haven't used our API before, see [Using the Connect API](https://developer.goacoustic.com/acoustic-connect/reference/base-url) for instructions. It explains how to authenticate your calls and suggests some tools for testing.

# Mutation structure

## Arguments

The `addReferenceSetAssociation` mutation has the `dataSetAssociation` argument at the top level. Here are the input fields supported by the argument. All of them are **required**.

[block:parameters]
{
  "data": {
    "h-0": "Field",
    "h-1": "Nested field",
    "h-2": "Values",
    "h-3": "Definition",
    "0-0": "`to`",
    "0-1": "",
    "0-2": "ID",
    "0-3": "The ID of the target data set ",
    "1-0": "`from`",
    "1-1": "",
    "1-2": "ID",
    "1-3": "The ID of the source data set.  \n  \n:warning: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.",
    "2-0": "`mappings`",
    "2-1": "`toAttribute`",
    "2-2": "String",
    "2-3": "The attribute in the target data set to use for mapping ",
    "3-0": "",
    "3-1": "`fromAttribute`",
    "3-2": "String",
    "3-3": "The attribute in the source data set to use for mapping "
  },
  "cols": 4,
  "rows": 4,
  "align": [
    "left",
    "left",
    "left",
    "left"
  ]
}
[/block]

## Fields

Fields returned by the `addReferenceSetAssociation` mutation

[block:parameters]
{
  "data": {
    "h-0": "Field",
    "h-1": "Nested field",
    "h-2": "Values",
    "h-3": "Required?",
    "h-4": "Definition",
    "0-0": "`to`",
    "0-1": "`dataSetId`",
    "0-2": "ID",
    "0-3": "Required",
    "0-4": "The ID of the target data set",
    "1-0": "",
    "1-1": "`name`",
    "1-2": "String",
    "1-3": "Optional ",
    "1-4": "The name of the target data set",
    "2-0": "",
    "2-1": "`type`",
    "2-2": "Enumeration. Valid values:  \n  \n- `AUDIENCE`\n- `REFERENCE_SET`",
    "2-3": "Optional ",
    "2-4": "The type of the target data set ",
    "3-0": "`from`",
    "3-1": "`dataSetId`",
    "3-2": "ID",
    "3-3": "Required",
    "3-4": "The ID of the source data set",
    "4-0": "",
    "4-1": "`name`",
    "4-2": "String",
    "4-3": "Optional",
    "4-4": "The name of the source data set",
    "5-0": "",
    "5-1": "`type`",
    "5-2": "Enumeration. Valid values:  \n  \n- `AUDIENCE`\n- `REFERENCE_SET`",
    "5-3": "Optional",
    "5-4": "The type of the source data set "
  },
  "cols": 5,
  "rows": 6,
  "align": [
    "left",
    "left",
    "left",
    "left",
    "left"
  ]
}
[/block]