WooCommerce · Arazzo Workflow

WooCommerce Upsert Customer by Email

Version 1.0.0

Find a customer by email and create the account only if it does not already exist.

1 workflow 1 source API 1 provider
View Spec View on GitHub E-CommerceOpen-SourceOrderProductWordPressArazzoWorkflows

Provider

woocommerce

Workflows

upsert-customer-by-email
Upsert a customer keyed on email, creating it only when missing.
Searches existing customers by email and either reads the matched customer or creates a new account when no match exists.
3 steps inputs: email, firstName, lastName outputs: createdCustomerId, customerId
1
findCustomer
Search existing customers for one matching the supplied email, returning at most one result.
2
getExisting
Read the matched customer to confirm the current account details.
3
createNew
Create a new customer account when no existing customer matched the email.

Source API Descriptions

Arazzo Workflow Specification

Raw ↑
arazzo: 1.0.1
info:
  title: WooCommerce Upsert Customer by Email
  summary: Find a customer by email and create the account only if it does not already exist.
  description: >-
    Avoids duplicate customer accounts when importing buyers. The workflow
    searches existing customers by email, then branches: when a match is found
    it reads the existing customer, and when no match is found it creates a new
    customer account. Every step spells out its request inline so the flow can
    be read and executed without opening the underlying OpenAPI description.
  version: 1.0.0
sourceDescriptions:
- name: customersApi
  url: ../openapi/woocommerce-customers-api-openapi.yml
  type: openapi
workflows:
- workflowId: upsert-customer-by-email
  summary: Upsert a customer keyed on email, creating it only when missing.
  description: >-
    Searches existing customers by email and either reads the matched customer
    or creates a new account when no match exists.
  inputs:
    type: object
    required:
    - email
    properties:
      email:
        type: string
        description: Email address used to detect an existing customer.
      firstName:
        type: string
        description: First name to use when creating a new customer.
      lastName:
        type: string
        description: Last name to use when creating a new customer.
  steps:
  - stepId: findCustomer
    description: >-
      Search existing customers for one matching the supplied email, returning
      at most one result.
    operationId: listCustomers
    parameters:
    - name: email
      in: query
      value: $inputs.email
    - name: per_page
      in: query
      value: 1
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      matchedCustomerId: $response.body#/0/id
    onSuccess:
    - name: customerExists
      type: goto
      stepId: getExisting
      criteria:
      - context: $response.body
        condition: $.length > 0
        type: jsonpath
    - name: customerMissing
      type: goto
      stepId: createNew
      criteria:
      - context: $response.body
        condition: $.length == 0
        type: jsonpath
  - stepId: getExisting
    description: >-
      Read the matched customer to confirm the current account details.
    operationId: getCustomer
    parameters:
    - name: id
      in: path
      value: $steps.findCustomer.outputs.matchedCustomerId
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      customerId: $response.body#/id
      customerEmail: $response.body#/email
    onSuccess:
    - name: done
      type: end
  - stepId: createNew
    description: >-
      Create a new customer account when no existing customer matched the email.
    operationId: createCustomer
    requestBody:
      contentType: application/json
      payload:
        email: $inputs.email
        first_name: $inputs.firstName
        last_name: $inputs.lastName
    successCriteria:
    - condition: $statusCode == 201
    outputs:
      customerId: $response.body#/id
      customerEmail: $response.body#/email
  outputs:
    customerId: $steps.getExisting.outputs.customerId
    createdCustomerId: $steps.createNew.outputs.customerId

Work with this as data

Every workflow here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for arazzo workflows

4 MCP tools reach this
  • find_arazzoBrowse and filter every workflow in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This workflow
curl "https://apis.io/api/v1/arazzo/woocommerce-upsert-customer-by-email-workflow"
All arazzo workflows
curl "https://apis.io/api/v1/arazzo?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.