DOCS

Hello settings

/

Manage Hello Settings

Learn how to configure Hello with GraphQL.

COMING SOON

All of Zonos Hello's settings that can be configured via Dashboard can also be configured via the API using GraphQL via the HelloSettings object.

Retrieve HelloSettings

To retrieve saved Hello settings, you can use the helloSettings query. This will return the HelloSettings object associated with the Organization your API key is associated with.

Query

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
query {
  helloSettings {
    allowedDomains
    anchorElementSelector
    cartUrlPattern
    currencyBehavior
    currencyElementSelector
    excludedUrlPatterns
    id
    createdAt
    createdBy
    mode
    organization
    updatedAt
    updatedBy
    homepageUrlPattern
    productDetailUrlPattern
    productListUrlPattern
    restrictionBehavior
    dutyTaxEstimationBehavior
  }
}

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
{
  "data": {
    "helloSettings": {
      "allowedDomains": ["https://mydomain.com", "https://myotherdomain.com"],
      "anchorElementSelector": ".hello-anchor",
      "cartUrlPattern": "/cart/*",
      "currencyBehavior": "RESTRICT_AND_WARN",
      "currencyElementSelector": ".currency-field",
      "excludedUrlPatterns": ["/excluded/*"],
      "id": "HELLO_SETTINGS_ID",
      "createdAt": "2023-07-12T12:34:56Z",
      "createdBy": "USER_ID",
      "mode": "TEST",
      "organization": "ORG_ID",
      "updatedAt": "2023-07-12T12:34:56Z",
      "updatedBy": "USER_ID",
      "homepageUrlPattern": "/home/*",
      "productDetailUrlPattern": "/product/*",
      "productListUrlPattern": "/product/list/*",
      "restrictionBehavior": "DO_NOTHING",
      "dutyTaxEstimationBehavior": "ESTIMATE_DUTY_TAX"
    }
  }
}

Update HelloSettings

You can update HelloSettings with the helloSettingsUpdate mutation. You only need to include the fields you want to update.

Mutation

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
mutation {
  helloSettingsUpdate(
    input: { id: "HELLO_SETTINGS_ID", cartUrlPattern: "/new-cart/*" }
  ) {
    allowedDomains
    anchorElementSelector
    cartUrlPattern
    currencyBehavior
    currencyElementSelector
    excludedUrlPatterns
    id
    createdAt
    createdBy
    mode
    organization
    updatedAt
    updatedBy
    homepageUrlPattern
    productDetailUrlPattern
    productListUrlPattern
    restrictionBehavior
    dutyTaxEstimationBehavior
  }
}

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
{
  "data": {
    "helloSettingsUpdate": {
      "allowedDomains": ["https://mydomain.com", "https://myotherdomain.com"],
      "anchorElementSelector": ".hello-anchor",
      "cartUrlPattern": "/new-cart/*",
      "currencyBehavior": "RESTRICT_AND_WARN",
      "currencyElementSelector": ".currency-field",
      "excludedUrlPatterns": ["/excluded/*"],
      "id": "HELLO_SETTINGS_ID",
      "createdAt": "2023-07-12T12:34:56Z",
      "createdBy": "USER_ID",
      "mode": "TEST",
      "organization": "ORG_ID",
      "updatedAt": "2023-07-12T12:34:56Z",
      "updatedBy": "USER_ID",
      "homepageUrlPattern": "/home/*",
      "productDetailUrlPattern": "/product/*",
      "productListUrlPattern": "/product/list/*",
      "restrictionBehavior": "DO_NOTHING",
      "dutyTaxEstimationBehavior": "ESTIMATE_DUTY_TAX"
    }
  }
}

Was this page helpful?