Marketing Double Opt In Configuration for a store is not available to fetch

We are facing a few weird cases where merchants configure marketing double opt in on shopify.

Right now, we are going around this by checking if there are any customers with pending email marketing status. However, this frequently breaks.

It would be great if we could expose this as an attribute on the shop object.

1 Like

Hey @tucosaurus :waving_hand: - you’re correct, this isn’t something that can currently be checked via the API. I definitely get where you’re coming from though, happy to put a feature request through!

Just out of curiosity, how are you currently working around this? Are you using something like the below query?

{
  customers(first: 100, query: "accepts_marketing:true") {
    edges {
      node {
        id
        emailMarketingConsent {
          marketingState
        }
      }
    }
  }
}

Just want to make sure I’m approaching this correctly - speak soon!

Hey @Alan_G - Yes, very similiar.

the query is - email_subscription_status = 'PENDING'

Thanks @tucosaurus, appreciate you following up here. I just did some digging, and just want to clarify, are you using the segmentCreate mutation to pull that info by any chance?

On a “regular” customers object query, email_subscription_status isn’t a valid query argument, but it is one for the segmentCreate mutation. Just wanted to touch base to see if that’s what you’re using and if the issue is essentially that you can’t create the segment with the mutation using that query argument, since that should work.

Hope to speak soon, we’ll get this looked into :slight_smile:

Hi @Alan_G - We are able to create a segment. However, its a workaround to check whether the shop has double optin for email marketing enabled or not.

My request is to expose this attribute in shop data and shop webhook so that we don’t need to do this workaround.
Link to setting it up double optin

I understand why my initial message might have caused a confusion. Apologies for it.

Hey @tucosaurus - no worries! Thanks for clarifying, I’ll definitely put a feature request through for you on this. I can’t guarantee if/when the feature would be implemented, but will get one set up for you for sure so we can send this up to our product team.

Just out of curiosity. you’re just wanting something like this?

{ 
shop {
marketingDoubleOptinstatus
}
}

Wanted to make sure I’m getting your use case correct before I send this up - hope to speak soon!

Hi @Alan_G - Yes, this is precisely what I want.

The double optin status would need to separate for email and sms marketing.

Thanks for confirming @tucosaurus - I’ll get in touch with the team to see if I can share any info with you on this potentially being on our roadmap, but at the very least I’m more than happy to set up an official feature request for you on my end. Speak with you as soon as I have more info to share :slight_smile:

1 Like

Hey again @tucosaurus - just following up with this for you. I was able to get in touch with the customers/customer accounts product team on my end here and can confirm while we don’t have this on our product roadmap at the time, I’m going to log a feature request for double opt-in to be something API users can more easily access.

We do think it’s a good idea, and although I can’t guarantee if/when this will be enabled, I just wanted to let you know our developers are aware of your feature idea. Thanks for flagging this again!