Use cases

Here are use cases that demonstrate the basics of how to use the Dimensions API.

Use case 1: Create a transaction with dimensions

Use the Accounting REST API to create an invoice transaction and send DefinitionId with values from Step 1 below. This example creates an invoice with dimensions.

Step 1: Use appFoundationsCustomDimensionDefinitions (query) with pagination in the GraphQL API to read the Dimension Definition ID.

Query

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
  query ActiveCustomDimensionDefinitionsQuery {
      appFoundationsActiveCustomDimensionDefinitions (
          first: 5
          after: null
          last: null
          before: null
      ) {
          edges {
              node {
                  ...CustomDimensionDefinitionAttributes
              }
          }
      }
  }

  fragment CustomDimensionDefinitionAttributes on AppFoundations_CustomDimensionDefinition {
      id
      label
      active
  }

Response

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
  {
      "data": {
          "appFoundationsActiveCustomDimensionDefinitions": {
              "edges": [
                  {
                      "node": {
                          "id": "1000000003",
                          "label": "Dimension #1",
                          "active": true
                      }
                  },
                  {
                      "node": {
                          "id": "1000000006",
                          "label": "Dimension #2",
                          "active": true
                      }
                  },
                  {
                      "node": {
                          "id": "1000000009",
                          "label": "Residential",
                          "active": true
                      }
                  },
                  {
                      "node": {
                          "id": "1000000053",
                          "label": "Commercial",
                          "active": true
                      }
                  },
                  {
                      "node": {
                          "id": "1000000056",
                          "label": "Ordinary",
                          "active": true
                      }
                  }
              ]
          }
      }
  }

Step 2: Next, fetch the Dimension Value ID based on the Dimension Definition ID fetched in the previous step.

Query

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
  query GetActiveCustomDimensionValues (
      $first: Int,
      $after: String,
      $last: Int,
      $before: String,
      $filters: AppFoundations_ActiveCustomDimensionValuesFilterBy!
  ) {
      appFoundationsActiveCustomDimensionValues (
          first: $first
          after: $after
          last: $last
          before: $before
          filters: $filters
      ) {
          edges {
              node {
                  id
                  definitionId
                  label
                  active
                  parentId
                  fullyQualifiedLabel
                  level
              }
          }
          pageInfo {
              hasNextPage
              hasPreviousPage
              startCursor
              endCursor
          }
          totalCount
      }
  }

Variables

1
2
3
4
5
6
7
8
9
  { "first":null,
    "after":null,
    "last":null,
    "before":null,
    "filters": {
          "definitionId":"1000000009",
          "parentId":1000000010
      }
  }

Response

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
  {
      "data": {
          "appFoundationsActiveCustomDimensionValues": {
              "edges": [
                  {
                      "node": {
                          "id": "1000000094",
                          "definitionId": "1000000009",
                          "label": "Site-1-a",
                          "active": true,
                          "parentId": "1000000010",
                          "fullyQualifiedLabel": "Site1:Site-1-a",
                          "level": 1
                      }
                  },
                  {
                      "node": {
                          "id": "1000000096",
                          "definitionId": "1000000009",
                          "label": "Site-1-b",
                          "active": true,
                          "parentId": "1000000010",
                          "fullyQualifiedLabel": "Site1:Site-1-b",
                          "level": 1
                      }
                  }
              ],
              "pageInfo": {
                  "hasNextPage": false,
                  "hasPreviousPage": false,
                  "startCursor": "0",
                  "endCursor": "1"
              },
              "totalCount": 2
          }
      }
  }

Step 3: Use the Accounting REST API resource to create an invoice. Use CustomExtensions to send dimension data. The definitionId retrieved in previous step is the Dimension Definition ID and id is the Dimension value. Attach definitionId to Key and id to Value.

Request

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
      {
          "TxnDate": "2025-05-29",
          "CurrencyRef": {
              "value": "USD",
              "name": "United States Dollar"
          },
          "LinkedTxn": [],
          "Line": [
              {
                  "Id": "101101",
                  "LineNum": 1,
                  "Description": "Test1",
                  "Amount": 1.32,
                  "DetailType": "SalesItemLineDetail",
                  "CustomExtensions": [
                      {
                          "AssociatedValues": [
                              {
                                  "Value": "1000000010",
                                  "Key": "1000000009"
                              }
                          ],
                          "ExtensionType": "DIMENSION"
                      }
                  ],
                  "SalesItemLineDetail": {
                      "ItemRef": {
                          "value": "2"
                      },
                      "UnitPrice": 5.26,
                      "Qty": 0.25,
                      "ItemAccountRef": {
                          "value": "1",
                          "name": "Sales"
                      },
                      "ClassRef": {
                          "value": "758612"
                      }
                  }
              },
              {
                  "Amount": 1.31,
                  "DetailType": "SubTotalLineDetail",
                  "SubTotalLineDetail": {}
              },
              {
                  "Id": "101102",
                  "LineNum": 2,
                  "Description": "Test1",
                  "Amount": 1.32,
                  "DetailType": "SalesItemLineDetail",
                  "CustomExtensions": [
                      {
                          "AssociatedValues": [
                              {
                                  "Value": "1000000094",
                                  "Key": "1000000009"
                              }
                          ],
                          "ExtensionType": "DIMENSION"
                      }
                  ],
                  "SalesItemLineDetail": {
                      "ItemRef": {
                          "value": "2"
                      },
                      "UnitPrice": 5.26,
                      "Qty": 0.25,
                      "ItemAccountRef": {
                          "value": "1",
                          "name": "Sales"
                      },
                      "ClassRef": {
                          "value": "758612"
                      }
                  }
              },
              {
                  "Amount": 1.31,
                  "DetailType": "SubTotalLineDetail",
                  "SubTotalLineDetail": {}
              }
          ],
          "Tag": [],
          "CustomerRef": {
              "value": "1"
          },
          "CustomField": [
              {
                  "DefinitionId": "1000000011",
                  "StringValue": "Test"
              }
          ],
          "BillAddr": {
              "Id":"34168","Line1":"1000 Sutton Place",
              "City":"Horn Lake","Country":"USA","CountrySubDivisionCode":"MS","PostalCode":"38637"
          },
          "ShipAddr":{"Id":"34169","Line1":"1000 Sutton Place",
          "City":"Horn Lake","Country":"USA","CountrySubDivisionCode":"MS","PostalCode":"38637"},
          "FreeFormAddress": false,
          "SalesTermRef": {
              "value": "3",
              "name": "Net 30"
          },
          "TotalAmt": 1.32,
          "Balance": 1.32
      }

Response

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
  {
      "Invoice": {
          "AllowIPNPayment": false,
          "AllowOnlinePayment": false,
          "AllowOnlineCreditCardPayment": true,
          "AllowOnlineACHPayment": true,
          "domain": "QBO",
          "sparse": false,
          "Id": "268",
          "SyncToken": "0",
          "MetaData": {
              "CreateTime": "2025-07-11T14:29:23-07:00",
              "LastModifiedByRef": {
                  "value": "9341453539654484"
          },
          "LastUpdatedTime": "2025-07-11T14:29:23-07:00"
      },
      "CustomField": [
          {
              "DefinitionId": "1",
              "Name": "Document Status",
              "Type": "StringType"
          }
      ],
      "TxnDate": "2025-05-29",
      "CurrencyRef": {
          "value": "USD",
          "name": "United States Dollar"
      },
      "LinkedTxn": [],
      "Line": [
          {
              "Id": "1",
              "LineNum": 1,
              "Description": "Test1",
              "Amount": 1.32,
              "DetailType": "SalesItemLineDetail",
              "SalesItemLineDetail": {
                  "ItemRef": {
                      "value": "2",
                      "name": "Hours"
                  },
                  "UnitPrice": 5.26,
                  "Qty": 0.25,
                  "ItemAccountRef": {
                      "value": "5",
                      "name": "Sales"
                  },
                  "TaxCodeRef": {
                      "value": "NON"
                  },
                  "TaxClassificationRef": {}
              },
              "CustomExtensions": [
                  {
                      "ExtensionType": "DIMENSION",
                      "AssociatedValues": [
                          {
                              "Key": "1000000009",
                              "Value": "1000000010"
                          }
                      ]
                  }
              ]
          },
          {
              "Id": "2",
              "LineNum": 2,
              "Description": "Test1",
              "Amount": 1.32,
              "DetailType": "SalesItemLineDetail",
              "SalesItemLineDetail": {
                  "ItemRef": {
                      "value": "2",
                      "name": "Hours"
                  },
                  "UnitPrice": 5.26,
                  "Qty": 0.25,
                  "ItemAccountRef": {
                      "value": "5",
                      "name": "Sales"
                  },
                  "TaxCodeRef": {
                      "value": "NON"
                  },
                  "TaxClassificationRef": {}
              },
              "CustomExtensions": [
                  {
                      "ExtensionType": "DIMENSION",
                      "AssociatedValues": [
                          {
                              "Key": "1000000009",
                              "Value": "1000000094"
                          }
                      ]
                  }
              ]
          },
          {
              "Amount": 2.64,
              "DetailType": "SubTotalLineDetail",
              "SubTotalLineDetail": {}
          }
      ],
      "TxnTaxDetail": {
          "TxnTaxCodeRef": {
              "value": "2"
          },
          "TotalTax": 0,
          "TaxLine": [
              {
                  "Amount": 0,
                  "DetailType": "TaxLineDetail",
                  "TaxLineDetail": {
                      "TaxRateRef": {
                          "value": "2"
                      },
                      "PercentBased": true,
                      "TaxPercent": 0,
                      "NetAmountTaxable": 0
                  }
              }
          ]
      },
      "CustomerRef": {
          "value": "1",
          "name": "King's Groceries1"
      },
      "BillAddr": {
          "Id": "406",
          "Line1": "1000 Sutton Place",
          "City": "Horn Lake",
          "Country": "USA",
          "CountrySubDivisionCode": "MS",
          "PostalCode": "38637"
      },
      "ShipAddr": {
          "Id": "407",
          "Line1": "1000 Sutton Place",
          "City": "Horn Lake",
          "Country": "USA",
          "CountrySubDivisionCode": "MS",
          "PostalCode": "38637"
      },
      "FreeFormAddress": false,
      "ShipFromAddr": {
          "Id": "408",
          "Line1": "2600 Marine Way",
          "Line2": "Mountain View, CA  94043-1126",
          "Line3": "USA"
      },
      "SalesTermRef": {
          "value": "3",
          "name": "Net 30"
      },
      "DueDate": "2025-06-28",
      "TotalAmt": 2.64,
      "ApplyTaxAfterDiscount": false,
      "PrintStatus": "NeedToPrint",
      "EmailStatus": "NotSet",
      "Balance": 2.64,
      "TaxExemptionRef": {}
      },
      "time": "2025-07-11T14:29:22.678-07:00"
  }
Use case 2: Manage single-entity custom dimension values

The original custom Dimension API is now enhanced to allow you to create, update, and disable custom dimension values.

For single-entity companies, use definitionId, id, and parentId as the company-local IDs.

Use cases

We’ve provided the following use cases:

Create custom dimension value

Creates a new custom dimension value within a definition.

Use appFoundationsCommonCreateCustomDimensionValue, passing the definitionId and label values.

Mutation

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
  mutation appFoundationsCommonCreateCustomDimensionValue(
      $input: AppFoundations_CustomDimensionValueCreateInput!
      ) {
          appFoundationsCommonCreateCustomDimensionValue(input: $input) {
              id
              definitionId
              label
              active
              parentId
              fullyQualifiedLabel
              level
              sharedInfo {
                  sharedId
                  sharedDefinitionId
                  sharedParentId
                  sharedAccountIds
              }
          }
        }

Variables (root-level value)

1
2
3
4
5
6
  {
      "input": {
          "definitionId": "100000001",
          "label": "Marketing"
      }
  }

Omit parentId (or pass null) to create a root-level value.

Variables (child value)

1
2
3
4
5
6
7
  {
      "input": {
          "definitionId": "100000001",
          "label": "Digital",
          "parentId": "400000001"
      }
  }

parentId is the ID of the parent value returned from a prior create call.

Response (root-level value)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
  {
      "data": {
          "appFoundationsCreateCustomDimensionValue": {
              "id": "400000001",
              "definitionId": "100000001",
              "label": "Marketing",
              "active": true,
              "parentId": null,
              "fullyQualifiedLabel": "Marketing",
              "level": 0,
              "sharedInfo": null
          }
      }
  }
Update custom dimension value

Updates the label of an existing custom dimension value. When a parent value’s label is updated, the fullyQualifiedLabel of all its descendants is automatically recalculated.

Step 1: Use appFoundationsCustomDimensionDefinitions (query) with pagination in the GraphQL API to get the input values.

Step 2: Update the custom dimension value using appFoundationsCommonUpdateCustomDimensionValue, passing the id, definitionId, and label values.

Mutation

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
  mutation appFoundationsCommonUpdateCustomDimensionValue(
      $input: AppFoundations_CustomDimensionValueUpdateInput!
  ) {
      appFoundationsCommonUpdateCustomDimensionValue(input: $input) {
          id
          definitionId
          label
          active
          parentId
          fullyQualifiedLabel
          level
          sharedInfo {
              sharedId
              sharedDefinitionId
              sharedParentId
              sharedAccountIds
          }
      }
     }

Variables

1
2
3
4
5
6
7
  {
      "input": {
          "id": "400000001",
          "definitionId": "100000001",
          "label": "Marketing - Updated"
      }
  }

If Marketing had a child "Digital" (fullyQualifiedLabel: "Marketing:Digital"), its fullyQualifiedLabel is automatically updated to "Marketing - Updated:Digital".

Response (child value)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
  {
      "data": {
          "appFoundationsUpdateCustomDimensionValue": {
              "id": "400000002",
              "definitionId": "100000001",
              "label": "Digital Ads",
              "active": true,
              "parentId": "400000001",
              "fullyQualifiedLabel": "Marketing:Digital Ads",
              "level": 1,
              "sharedInfo": null
          }
      }
  }
Disable custom dimension value

Disables (soft-deletes) a custom dimension value. The value remains in the system but becomes inactive. For ME accounts, the disable propagates to all shared accounts. Disabling cascades to children.

Use appFoundationsCommonDisableCustomDimensionValue, passing the id and definitionId values.

Mutation

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
  mutation appFoundationsCommonDisableCustomDimensionValue(
      $input: AppFoundations_CustomDimensionValueDisableInput!
  ) {
      appFoundationsCommonDisableCustomDimensionValue(input: $input) {
          id
          definitionId
          label
          active
          parentId
          fullyQualifiedLabel
          level
          sharedInfo {
              sharedId
              sharedDefinitionId
              sharedParentId
              sharedAccountIds
          }
      }
    }

Variables

1
2
3
4
5
6
  {
      "input": {
          "id": "400000001",
          "definitionId": "100000001"
      }
  }
Use case 3: Manage multi-entity dimensions

The Dimensions API supports multi-entity (ME) companies, where a single dimension definition and its values can be shared across multiple entities (realm IDs). You can use the same API surface for both single-entity (SE) and multi-entity companies. The routing is determined automatically based on the IDs you provide.

SE and ME routing

The resolver inspects the ID values in your request to determine SE or ME routing as follows:

Scenario IDs you provide Internal routing sharedInfo in response
Single-entity (SE) Local IDs (definitionId, id) Routes to entity null
Multi-entity (ME) Shared IDs (sharedDefinitionId, sharedId) Cascades to all linked entities Populated with sharedId, sharedDefinitionId, sharedAccountIds

To detect where a dimension is shared across entities, check if sharedInfo is null (SE) or populated (ME). Updates and disables on shared dimensions cascade across all entities for a multi-entity company.

Multi-entity dimensions use cases

We’ve provided some multi-entity dimensions use cases:

Create a shared dimension value

Creates a dimension value that is automatically shared across all entities in Intuit Enterprise Suite.

Step 1: Query appFoundationsActiveCustomDimensionDefinitions to get the active definitions with sharedInfo and sharedDefinitionId.

Step 2: Use the appFoundationsCommonCreateCustomDimensionValue mutation, passing the shared definition ID as definitionId.

Mutation

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
  mutation CreateValue($input: AppFoundations_CustomDimensionValueCreateInput!) {
      appFoundationsCreateCustomDimensionValue(input: $input) {
          id
          definitionId
          label
          active
          parentId
          fullyQualifiedLabel
          level
          sharedInfo {
              sharedId
              sharedDefinitionId
              sharedParentId
              sharedAccountIds
          }
      }
  }

Variables

1
2
3
4
5
6
  {
      "input": {
          "definitionId": "SD-5001",
          "label": "East Coast"
      }
  }

Response

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
  {
      "data": {
          "appFoundationsCreateCustomDimensionValue": {
              "id": "1000000102",
              "definitionId": "1000000003",
              "label": "East Coast",
              "active": true,
              "parentId": null,
              "fullyQualifiedLabel": "East Coast",
              "level": 0,
              "sharedInfo": {
                  "sharedId": "SV-7003",
                  "sharedDefinitionId": "SD-5001",
                  "sharedParentId": null,
                  "sharedAccountIds": ["9341452164365778", "9341452164365779"]
              }
          }
      }
  }

Note

Note: The value is automatically created across all company/realm IDs the definition is shared with. There is no support for granular per-account value creation. The value is always shared with the same companies/realms as its parent definition.
Create a shared child value

To create a child value under an ME parent, pass the parent’s sharedId as parentId:

Variables

1
2
3
4
5
6
7
  {
      "input": {
          "definitionId": "SD-5001",
          "label": "New York",
          "parentId": "SV-7003"
      }
  }

Response

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
  {
      "data": {
          "appFoundationsCreateCustomDimensionValue": {
              "id": "1000000103",
              "definitionId": "1000000003",
              "label": "New York",
              "active": true,
              "parentId": "1000000102",
              "fullyQualifiedLabel": "East Coast:New York",
              "level": 1,
              "sharedInfo": {
                  "sharedId": "SV-7004",
                  "sharedDefinitionId": "SD-5001",
                  "sharedParentId": "SV-7003",
                  "sharedAccountIds": ["9341452164365778", "9341452164365779"]
              }
          }
      }
  }
Read definitions with shared info

Reads active dimension definitions including sharedInfo.

Use appFoundationsActiveCustomDimensionDefinitions. For ME companies, sharedInfo is populated.

Query

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
  query ActiveDefinitions(
      $first: Int,
      $after: String,
      $filters: AppFoundations_ActiveCustomDimensionDefinitionFilterBy
  ) {
      appFoundationsActiveCustomDimensionDefinitions(
          first: $first
          after: $after
          filters: $filters
      ) {
          edges {
              node {
                  id
                  label
                  active
                  sharedInfo {
                      sharedId
                      sharedAccountIds
                  }
              }
          }
          pageInfo {
              hasNextPage
              hasPreviousPage
              startCursor
              endCursor
          }
      }
  }

Variables

1
2
3
4
  {
      "first": 10,
      "after": null
  }

Response

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
  {
      "data": {
          "appFoundationsActiveCustomDimensionDefinitions": {
              "edges": [
                  {
                      "node": {
                          "id": "1000000003",
                          "label": "Region",
                          "active": true,
                          sharedInfo": {
                              "sharedId": "SD-5001",
                              "sharedAccountIds": ["9341452164365778", "9341452164365779"]
                          }
                      }
                  },
                  {
                      "node": {
                          "id": "1000000006",
                          "label": "Department",
                          "active": true,
                          "sharedInfo": {
                              "sharedId": "SD-5002",
                              "sharedAccountIds": ["9341452164365778", "9341452164365779"]
                          }
                      }
                  }
              ],
              "pageInfo": {
                  "hasNextPage": false,
                  "hasPreviousPage": false,
                  "startCursor": "0",
                  "endCursor": "1"
              }
          }
      }
  }
Read values with shared info

Reads active dimension values including sharedInfo.

Step 1: Use appFoundationsCustomDimensionDefinitions (query) to get the input values.

Step 2: Read the values using appFoundationsActiveCustomDimensionValues. Each value includes its shared identifiers and the list of account IDs it is shared with.

Query

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
  query ActiveValues(
      $first: Int,
      $after: String,
      $filters: AppFoundations_ActiveCustomDimensionValuesFilterBy!
  ) {
      appFoundationsActiveCustomDimensionValues(
          first: $first
          after: $after
          filters: $filters
      ) {
          edges {
              node {
                  id
                  definitionId
                  label
                  active
                  parentId
                  fullyQualifiedLabel
                  level
                  sharedInfo {
                      sharedId
                      sharedDefinitionId
                      sharedParentId
                      sharedAccountIds
                  }
              }
          }
          pageInfo {
              hasNextPage
              hasPreviousPage
              startCursor
              endCursor
          }
          totalCount
      }
  }

Variables

1
2
3
4
5
6
7
  {
      "first": 10,
      "after": null,
      "filters": {
          "definitionId": "1000000003"
      }
  }

Response

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
  {
      "data": {
          "appFoundationsActiveCustomDimensionValues": {
              "edges": [
                  {
                      "node": {
                          "id": "1000000100",
                          "definitionId": "1000000003",
                          "label": "West Coast",
                          "active": true,
                          "parentId": null,
                          "fullyQualifiedLabel": "West Coast",
                          "level": 0,
                          "sharedInfo": {
                              "sharedId": "SV-7001",
                              "sharedDefinitionId": "SD-5001",
                              "sharedParentId": null,
                              "sharedAccountIds": ["9341452164365778", "9341452164365779"]
                          }
                      }
                  },
                  {
                      "node": {
                          "id": "1000000101",
                          "definitionId": "1000000003",
                          "label": "San Francisco",
                          "active": true,
                          "parentId": "1000000100",
                          "fullyQualifiedLabel": "West Coast:San Francisco",
                          "level": 1,
                          "sharedInfo": {
                              "sharedId": "SV-7002",
                              "sharedDefinitionId": "SD-5001",
                              "sharedParentId": "SV-7001",
                              "sharedAccountIds": ["9341452164365778", "9341452164365779"]
                          }
                      }
                  }
              ],
              "pageInfo": {
                  "hasNextPage": false,
                  "hasPreviousPage": false,
                  "startCursor": "0",
                  "endCursor": "1"
              },
              "totalCount": 2
          }
      }
  }

Use the sharedInfo.sharedId and sharedInfo.sharedDefinitionId values when performing write operations on ME companies.

Update a shared dimension value

Updates a shared dimension value by passing shared IDs. For ME accounts, the update propagates to all shared accounts. The value update cascades across all entities.

Step 1: Use appFoundationsCustomDimensionDefinitions (query) to get the input values.

Step 2: Update the shared dimension value using appFoundationsCommonUpdateCustomDimensionValue (mutation) mutation, passing shared IDs in the id and definitionId fields.

Mutation

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
  mutation UpdateValue($input: AppFoundations_CustomDimensionValueUpdateInput!) {
      appFoundationsUpdateCustomDimensionValue(input: $input) {
          id
          definitionId
          label
          active
          parentId
          fullyQualifiedLabel
          level
          sharedInfo {
              sharedId
              sharedDefinitionId
              sharedParentId
              sharedAccountIds
          }
      }
  }

Variables

1
2
3
4
5
6
7
  {
      "input": {
          "id": "SV-7004",
          "definitionId": "SD-5001",
          "label": "NYC Metro"
      }
  }

Response

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
  {
      "data": {
          "appFoundationsUpdateCustomDimensionValue": {
              "id": "1000000103",
              "definitionId": "1000000003",
              "label": "NYC Metro",
              "active": true,
              "parentId": "1000000102",
              "fullyQualifiedLabel": "East Coast:NYC Metro",
              "level": 1,
              "sharedInfo": {
                  "sharedId": "SV-7004",
                  "sharedDefinitionId": "SD-5001",
                  "sharedParentId": "SV-7003",
                  "sharedAccountIds": ["9341452164365778", "9341452164365779"]
              }
          }
      }
  }
Disable a shared dimension value

Disables a shared dimension value across all entities.

Step 1: Use appFoundationsActiveCustomDimensionDefinitions (query) to get the definitionId value.

Step 2: Disable the shared dimension value using AppFoundations_CustomDimensionValueDisableInput (mutation), passing shared IDs in the id and definitionId fields.

Mutation

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
  mutation DisableValue($input: AppFoundations_CustomDimensionValueDisableInput!) {
      appFoundationsDisableCustomDimensionValue(input: $input) {
          id
          definitionId
          label
          active
          sharedInfo {
              sharedId
              sharedDefinitionId
              sharedParentId
              sharedAccountIds
          }
      }
  }

Variables

1
2
3
4
5
6
  {
      "input": {
          "id": "SV-7004",
          "definitionId": "SD-5001"
      }
  }

Response

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
  {
      "data": {
          "appFoundationsDisableCustomDimensionValue": {
              "id": "1000000103",
              "definitionId": "1000000003",
              "label": "NYC Metro",
              "active": false,
              "sharedInfo": {
                  "sharedId": "SV-7004",
                  "sharedDefinitionId": "SD-5001",
                  "sharedParentId": "SV-7003",
                  "sharedAccountIds": ["9341452164365778", "9341452164365779"]
              }
          }
      }
  }