younifyd
Menu

users

Search for User entities.

Use it in a workflow

  1. Add a step and choose the Fluent Commerce connector.
  2. Pick the users action (under Users).
  3. Fill in the fields below, then reference the result from later steps as {{users.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 Users($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], $type: [String!], $updatedOn: DateRange, $username: [String!]) {
  users(
    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
    type: $type
    updatedOn: $updatedOn
    username: $username
  ) {
    edges {
      cursor
      node {
        apps
        attributes
        country
        createdOn
        department
        firstName
        id
        language
        lastName
        primaryEmail
        primaryLocation
        primaryPhone
        primaryRetailer
        promotionOptIn
        ref
        roles
        status
        timezone
        title
        type
        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>

Country

createdOnobject
fromstring
tostring
departmentarray<string>

Department

firstnumber

Returns the first n elements from the list

firstNamearray<string>

User's first name

lastnumber

Returns the last n elements from the list

lastNamearray<string>

User's last name

primaryEmailarray<string>

User's primary email

primaryPhonearray<string>

User's primary phone number

promotionOptInarray<boolean>

Determines if the user has opted to receive promotions

refarray<string>

External reference of the object. Recommended to be unique.

statusarray<string>

Status

timezonearray<string>

Timezone

titlearray<string>

The user's title. For example _Mr._, _Miss_, _Dr._, _Ms._ etc

typearray<string>

Type of the user

updatedOnobject
fromstring
tostring
usernamearray<string>

Unique name for the user used for identification and logging purposes.

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 {{users.response.data.data.users}}. If the API returns errors, the step fails and they are at {{users.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.

Was this page helpful?