younifyd
Menu

pointOfSaleDeviceAssignToCashDrawer

Assigns a point of sale device to a cash drawer, removing any prior assignment.

Use it in a workflow

  1. Add a step and choose the Shopify connector.
  2. Pick the pointOfSaleDeviceAssignToCashDrawer action (under Point).
  3. Fill in the fields below, then reference the result from later steps as {{pointofsaledeviceassigntocashdrawer.response.data}}.

Query

This is the mutation the action sends by default. Edit it in the step's Query field to change which fields come back.

graphql
mutation PointOfSaleDeviceAssignToCashDrawer($cashDrawerId: ID!, $pointOfSaleDeviceId: ID!) {
  pointOfSaleDeviceAssignToCashDrawer(
    cashDrawerId: $cashDrawerId
    pointOfSaleDeviceId: $pointOfSaleDeviceId
  ) {
    pointOfSaleDevice {
      activePaymentSession {
        cashCountedAtClose
        cashCountedAtOpen
        cashDrawer
        closingAdjustment
        closingBalance
        closingNote
        closingStaffMember
        closingTime
        currency
        expectedCashAtClose
        expectedCashAtOpen
        id
        location
        netCashSales
        netSales
        openingNote
        openingStaffMember
        openingTime
        pointOfSaleDevice
        status
        totalAdjustments
        totalCashRefunds
        totalCashSales
        totalDiscrepancy
        totalRefunds
        totalSales
        totalsReady
      }
      cashDrawer {
        balance
        id
        location
        name
      }
      id
    }
    userErrors {
      code
      field
      message
    }
  }
}

Variables

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

cashDrawerIdstringrequired

The cash drawer to assign the device to.

pointOfSaleDeviceIdstringrequired

The point of sale device to assign.

json
{
  "cashDrawerId": "string",
  "pointOfSaleDeviceId": "string"
}

Response

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

pointOfSaleDeviceobject
activePaymentSessionobject27 fields
cashDrawerobject4 fields
idstring
userErrorsarray<object>
codeobject
fieldobject
messageobject

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