Skip to content

Shopify - Create Customer

This module allows creating customers in your Shopify store with contact information, address, and account configuration.

FieldTypeRequiredDescription
credentials_idstringYesShopify credentials ID
emailstringYesCustomer email
first_namestringNoFirst name
last_namestringNoLast name
phonestringNoPhone (E.164 format)
tagsstringNoTags separated by comma
notestringNoInternal notes
verified_emailbooleanNoMark email as verified (default: true)
send_email_welcomebooleanNoSend welcome email (default: false)
tax_exemptbooleanNoTax exempt (default: false)
address1stringNoAddress line 1
address2stringNoAddress line 2
citystringNoCity
provincestringNoProvince/State
countrystringNoCountry
country_codestringNoCountry code (ES, US, etc.)
zipstringNoPostal code
companystringNoCompany

This module requires Shopify credentials. The required fields are:

FieldDescription
shop_domainStore domain (my-store.myshopify.com)
access_tokenAdmin API access token
  • write_customers - Customer write
{
"success": true,
"customer": {
"id": 123456789,
"email": "cliente@ejemplo.com",
"first_name": "Juan",
"last_name": "Garcia",
"...": "other fields"
},
"customer_id": 123456789,
"message": "Customer \"cliente@ejemplo.com\" created successfully"
}
{
"credentials_id": "shopify_tienda",
"email": "nuevo@cliente.com",
"first_name": "Juan",
"last_name": "Garcia"
}
{
"credentials_id": "shopify_tienda",
"email": "cliente@ejemplo.com",
"first_name": "Maria",
"last_name": "Lopez",
"phone": "+34600000000",
"address1": "Calle Mayor 123",
"address2": "Piso 4B",
"city": "Madrid",
"province": "Madrid",
"country": "Spain",
"country_code": "ES",
"zip": "28001"
}
{
"credentials_id": "shopify_tienda",
"email": "compras@empresa.com",
"first_name": "Departamento",
"last_name": "Compras",
"company": "Empresa S.L.",
"phone": "+34910000000",
"tax_exempt": true,
"tags": "b2b, mayorista",
"note": "Wholesale customer - 20% discount"
}
{
"credentials_id": "shopify_tienda",
"email": "nuevo@cliente.com",
"first_name": "Pedro",
"last_name": "Sanchez",
"send_email_welcome": true,
"verified_email": true,
"tags": "newsletter, nuevo"
}
[Webhook Form] -> [Validate data] -> [ShopifyCreateCustomer] -> [Confirmation email]
[Read CSV] -> [Loop] -> [ShopifyCreateCustomer] -> [Log results]
[CRM Webhook] -> [Check exists] -> [ShopifyCreateCustomer] -> [Update CRM]
// Prepare customer data from form
const form = ctx.data.formulario;
ctx.data = {
email: form.email.toLowerCase().trim(),
first_name: form.nombre,
last_name: form.apellido,
phone: form.telefono ? `+34${form.telefono}` : undefined,
address1: form.direccion,
city: form.ciudad,
province: form.provincia,
country: "Spain",
country_code: "ES",
zip: form.cp,
tags: form.newsletter ? "newsletter" : "",
send_email_welcome: true
};

Shopify requires the E.164 format for phones:

CountryFormatExample
Spain+34XXXXXXXXX+34600123456
Mexico+52XXXXXXXXXX+525512345678
Argentina+54XXXXXXXXXXX+5491112345678
Colombia+57XXXXXXXXXX+573001234567
USA+1XXXXXXXXXX+12025551234
ErrorCauseSolution
”Email has already been taken”Email already existsUse ShopifyUpdateCustomer
”Phone is invalid”Incorrect formatUse E.164 format
”Country code is invalid”Country codeUse ISO codes (ES, US, MX)
  • The email must be unique in the store
  • If the email already exists, use ShopifyUpdateCustomer instead
  • The verified_email field prevents Shopify from sending a verification email
  • Tags are useful for segmenting customers in marketing campaigns
  • ShopifyGetCustomers - Get and search existing customers
  • ShopifyUpdateCustomer - Update an existing customer’s data
  • ShopifyGetOrders - Get orders (filterable by customer)