younifyd
Menu

prices

Search for Price entities.

Use it in a workflow

  1. Add a step and choose the Fluent Commerce connector.
  2. Pick the prices action (under Prices).
  3. Fill in the fields below, then reference the result from later steps as {{prices.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 Prices($after: String, $before: String, $currency: [String!], $first: Int, $last: Int, $type: [String!], $value: [Float!]) {
  prices(
    after: $after
    before: $before
    currency: $currency
    first: $first
    last: $last
    type: $type
    value: $value
  ) {
    edges {
      cursor
      node {
        currency
        type
        value
      }
    }
    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

currencyarray<string>

The currency of the Price, for example 'USD', 'GBP', 'AUD', etc.

firstnumber

Returns the first n elements from the list

lastnumber

Returns the last n elements from the list

typearray<string>

The type field is used to identify different types of prices, for example 'RRP', 'SALE', etc. No Price type values are enforced by the platform.

valuearray<number>

The price value itself

json
{
  "after": "string",
  "before": "string",
  "currency": [
    "string"
  ],
  "first": 0,
  "last": 0,
  "type": [
    "string"
  ],
  "value": [
    0
  ]
}

Response

Read the result with {{prices.response.data.data.prices}}. If the API returns errors, the step fails and they are at {{prices.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?
prices — Fluent Commerce — Documentation