younifyd
Menu

customers

Search for Customer entities.

Use it in a workflow

  1. Add a step and choose the Fluent Commerce connector.
  2. Pick the customers action (under Customers).
  3. Fill in the fields below, then reference the result from later steps as {{customers.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 Customers($after: String, $before: String, $country: [String], $createdOn: DateRange, $department: [String], $first: Int, $firstName: [String], $last: Int, $lastName: [String], $primaryEmail: [String], $primaryPhone: [String], $promotionOptIn: [Boolean], $ref: [String], $status: [String], $timezone: [String], $title: [String], $updatedOn: DateRange, $username: [String]) {
  customers(
    after: $after
    before: $before
    country: $country
    createdOn: $createdOn
    department: $department
    first: $first
    firstName: $firstName
    last: $last
    lastName: $lastName
    primaryEmail: $primaryEmail
    primaryPhone: $primaryPhone
    promotionOptIn: $promotionOptIn
    ref: $ref
    status: $status
    timezone: $timezone
    title: $title
    updatedOn: $updatedOn
    username: $username
  ) {
    edges {
      cursor
      node {
        attributes
        country
        createdOn
        department
        firstName
        id
        lastName
        primaryEmail
        primaryPhone
        promotionOptIn
        ref
        retailer
        status
        timezone
        title
        updatedOn
        username
      }
    }
    pageInfo {
      hasNextPage
      hasPreviousPage
    }
  }
}

Variables

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

afterstring

Returns the elements in the list that come after the specified global ID

beforestring

Returns the elements in the list that come before the specified global ID

countryarray<string>

The country the customer is operating from

createdOnobject
fromstring
tostring
departmentarray<string>

The department/team that the customer belongs to

firstnumber

Returns the first n elements from the list

firstNamearray<string>

The customer's first name

lastnumber

Returns the last n elements from the list

lastNamearray<string>

The customer's last name

primaryEmailarray<string>

Email

primaryPhonearray<string>

Phone number

promotionOptInarray<boolean>

Whether the customer has opted to receive promotions

refarray<string>

Username of the customer

statusarray<string>

Status

timezonearray<string>

Timezones

titlearray<string>

The customer's title

updatedOnobject
fromstring
tostring
usernamearray<string>

Username

json
{
  "after": "string",
  "before": "string",
  "country": [
    "string"
  ],
  "createdOn": {
    "from": "string",
    "to": "string"
  },
  "department": [
    "string"
  ],
  "first": 0,
  "firstName": [
    "string"
  ],
  "last": 0,
  "lastName": [
    "string"
  ],
  "primaryEmail": [
    "string"
  ],
  "primaryPhone": [
    "string"
  ],
  "promotionOptIn": [
    false
  ]
}

Response

Read the result with {{customers.response.data.data.customers}}. If the API returns errors, the step fails and they are at {{customers.response.data.errors}}.

edgesarray<object>
cursorobject
nodeobject
pageInfoobject
hasNextPageboolean
hasPreviousPageboolean

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