younifyd
Menu

consentPolicy

Returns the customer privacy consent policies of a shop.

Use it in a workflow

  1. Add a step and choose the Shopify connector.
  2. Pick the consentPolicy action (under Consent).
  3. Fill in the fields below, then reference the result from later steps as {{consentpolicy.response.data}}.

Query

This is the query the action sends by default. Edit it in the step's Query field to change which fields come back.

graphql
query ConsentPolicy($id: ID, $countryCode: PrivacyCountryCode, $regionCode: String, $consentRequired: Boolean, $dataSaleOptOutRequired: Boolean) {
  consentPolicy(
    id: $id
    countryCode: $countryCode
    regionCode: $regionCode
    consentRequired: $consentRequired
    dataSaleOptOutRequired: $dataSaleOptOutRequired
  ) {
    consentRequired
    countryCode
    dataSaleOptOutRequired
    id
    regionCode
    shopId
  }
}

Variables

Pass these as a JSON object in the step's Variables field.

idstring

Return the policy with the provided ID.

countryCodestring

Return policies with the provided country code.

One ofANACADAEAFAGAIALAMAOAQARASATAUAWAXAZBABBBDBEBFBGBHBIBJBLBMBNBOBQBRBSBTBVBWBYBZCA

regionCodestring

Return policies with the provided region code.

consentRequiredboolean

Return policies where consent is required or not.

dataSaleOptOutRequiredboolean

Return policies where data sale opt out is required or not.

json
{
  "id": "string",
  "countryCode": "AN",
  "regionCode": "string",
  "consentRequired": false,
  "dataSaleOptOutRequired": false
}

Need more? See the Shopify guide for connection setup and behaviour shared by every action.

consentPolicy — Shopify — Documentation