Ad

Shopify Create User Activation Email

- 1 answer

How can one disable activation email when using Shopify Storefront API: https://help.shopify.com/en/api/custom-storefronts/storefront-api/guides/updating-customers#creating-an-access-token

{
  "input": {
    "email": "[email protected]",
    "password": "HiZqFuDvDdQ7"
  }
}

when I try adding:

send_email_welcome": false

EDIT:

                Variables = new
                {
                    input = new
                    {
                        email = model.Email,
                        password = model.Password,
                        firstName = model.FirstName,
                        lastName = model.LastName
                    },
                    sendemailwelcome = false
                }

I get an error.

When I look at their Store API it lets you skip activation email: https://help.shopify.com/en/api/reference/customers/customer#account_activation_url

Ad

Answer

I was able to solve this using ShopifyShart. Turns out when you CreateAsync() with password options an invitation email can be set there:

        var data = await m_service.CreateAsync(new Customer
            {
                Email = user.Email,
                FirstName = user.FirstName,
                LastName = user.LastName
            },
            new CustomerCreateOptions
            {
                SendEmailInvite = false,
                SendWelcomeEmail = false,
                Password = password,
                PasswordConfirmation = password
            });
Ad
source: stackoverflow.com
Ad