younifyd
Menu

invoice

Find a Invoice entity.

Use it in a workflow

  1. Add a step and choose the Fluent Commerce connector.
  2. Pick the invoice action (under Invoice).
  3. Fill in the fields below, then reference the result from later steps as {{invoice.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 Invoice($ref: String!) {
  invoice(ref: $ref) {
    attributes {
      name
      type
      value
    }
    billingAccount {
      address {
        city
        companyName
        country
        latitude
        longitude
        name
        postcode
        region
        state
        street
        timeZone
      }
      attributes {
        name
        type
        value
      }
      createdOn
      customer {
        ref
      }
      id
      name
      ref
      retailer {
        id
      }
      status
      type
      updatedOn
      workflow {
        ref
        version
      }
      workflowRef
      workflowVersion
    }
    createdOn
    creditMemos {
      attributes {
        name
        type
        value
      }
      billingAccount {
        address
        attributes
        createdOn
        customer
        id
        name
        ref
        retailer
        status
        type
        updatedOn
        workflow
        workflowRef
        workflowVersion
      }
      createdOn
      currency {
        alphabeticCode
      }
      defaultTaxType {
        country
        group
        tariff
      }
      id
      invoice
      issueDate
      order {
        ref
        retailer
      }
      ref
      returnOrder {
        ref
        retailer
      }
      status
      subTotalAmount {
        amount
        scale
        unscaledValue
      }
      totalAmount {
        amount
        scale
        unscaledValue
      }
      totalBalance {
        amount
        scale
        unscaledValue
      }
      totalTax {
        amount
        scale
        unscaledValue
      }
      type
      updatedOn
      workflow {
        ref
        version
      }
      workflowRef
      workflowVersion
    }
    currency {
      alphabeticCode
    }
    defaultTaxType {
      country
      group
      tariff
    }
    dueDate
    fulfilment {
      ref
    }
    id
    issueDate
    order {
      ref
      retailer {
        id
      }
    }
    ref
    status
    subTotalAmount {
      amount
      scale
      unscaledValue
    }
    totalAmount {
      amount
      scale
      unscaledValue
    }
    totalBalance {
      amount
      scale
      unscaledValue
    }
    totalTax {
      amount
      scale
      unscaledValue
    }
    type
    updatedOn
    workflow {
      ref
      version
    }
    workflowRef
    workflowVersion
  }
}

Variables

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

refstringrequired

Max character limit: 100.

json
{
  "ref": "string"
}

Response

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

attributesarray<object>
nameobject
typeobject
valueobject
billingAccountobject
addressobject11 fields
attributesarray<object>
createdOnstring
customerobject1 fields
idstring
namestring
refstring
retailerobject1 fields
statusstring
typestring
updatedOnstring
workflowobject2 fields
workflowRefstring
workflowVersionstring
createdOnstring
creditMemosarray<object>
attributesobject
billingAccountobject
createdOnobject
currencyobject
defaultTaxTypeobject
idobject
invoiceobject
issueDateobject
orderobject
refobject
returnOrderobject
statusobject
subTotalAmountobject
totalAmountobject
totalBalanceobject
totalTaxobject
typeobject
updatedOnobject
workflowobject
workflowRefobject
workflowVersionobject
currencyobject
alphabeticCodestring
defaultTaxTypeobject
countrystring
groupstring
tariffstring
dueDatestring
fulfilmentobject
refstring
idstring
issueDatestring
orderobject
refstring
retailerobject1 fields
refstring
statusstring
subTotalAmountobject
amountnumber
scalenumber
unscaledValuenumber
totalAmountobject
amountnumber
scalenumber
unscaledValuenumber
totalBalanceobject
amountnumber
scalenumber
unscaledValuenumber
totalTaxobject
amountnumber
scalenumber
unscaledValuenumber
typestring
updatedOnstring
workflowobject
refstring
versionnumber
workflowRefstring
workflowVersionnumber

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

Was this page helpful?
invoice — Fluent Commerce — Documentation