Event Details & Payloads

This page covers all the events and payloads available from Viare.

Table of Events

NameDescription
order.voidedOrder has been voided (cancelled).
order.freight.changedFreight costs or charges have been changed.
order.discount.changedDiscount amount has been changed.
dispatch.shippedOrder has been shipped.
dispatch.collect.receivedOrder marked as received at a Click & Collect location.
dispatch.collect.collectedOrder marked as collected from a Click & Collect location.
order.splitOrder has been split.
order.item.deletedAn order item has been deleted.
order.item.backorderedAn order item has been backordered.
order.item.quantity.changedAn order item quantity has been changed.
order.confirmedCustomer has placed an order.
dispatch.assignedOrder assigned to a dispatch point.
dispatch.shipped.attempteddeliveryConsignment service has notified that delivery was attempted for a shipment.
dispatch.shipped.awaitingcollectionConsignment service has notified that the shipment is awaiting collection.
dispatch.shipped.intransitConsignment service has notified that the shipment is in transit.
dispatch.shipped.outfordeliveryConsignment service has notified that the shipment is out for delivery.
dispatch.shipped.deliveredConsignment service has notified that the shipment has been delivered.
order.replacement.confirmedReplacement of an order has been confirmed.
dispatch.3pl.queuedThe order has been queued for processing with a 3PL service.
dispatch.3pl.processingThe order is being processed by a 3PL service.
dispatch.3pl.errorThere was an error processing the order with a 3PL service.
dispatch.unassignedOrder has been unassigned from a dispatch point.

Payloads

Events carry a JSON payload with data relevant to the specific event. Whilst many events share a common payload format, some events have additional elements, or specific payloads.

Examples of these payloads, and the events they're relevant to, are provided below.

Common Fulfilment Events

order.confirmed, dispatch.shipped.attempteddelivery, dispatch.shipped.awaitingcollection, dispatch.shipped.intransit, dispatch.shipped.outfordelivery, dispatch.shipped.delivered, dispatch.3pl.queued, dispatch.3pl.processing, dispatch.3pl.error, dispatch.unassigned

{
  "subscriber": 1,
  "sequence": 1,
  "type": "order.confirmed ...",
  "message": {
    "orderID": "[Viare order ID]",
    "externalReferences": [
      {
        "id": "[external order ID]",
        "source": "[external order source]"
      }
    ]
  }
}

order.split

{
  "subscriber": 1,
  "sequence": 1,
  "type": "order.split",
  "message": {
    "orderID": "[Viare order ID]",
    "externalReferences": [
      {
        "id": "[external order ID]",
        "source": "[external order source]"
      }
    ],
    "childOrderID": "[child Viare order ID]",
    "item": [
      {
        "id": "[child order item ID]",
        "barcode": "[product item barcode]",
        "quantity": "[new quantity of product item]",
        "iteminfo": {
          "info": {
            "@key": "[key]",
            "@value": "[value]"
          }
        }
      }
    ],
    "vouchers": [
      {
        "id": "[child voucher ID]",
        "quantity": "1"
      }
    ]
  }
}

order.discount.changed

{
  "subscriber": 1,
  "sequence": 1,
  "type": "order.discount.changed",
  "message": {
    "orderID": "[Viare order ID]",
    "externalReferences": [
      {
        "id": "[external order ID]",
        "source": "[external order source]"
      }
    ],
    "discount": "[discount]"
  }
}

dispatch.collect.received, dispatch.assigned

{
  "subscriber": 1,
  "sequence": 1,
  "type": "dispatch.collect.received, dispatch.assigned",
  "message": {
    "orderID": "[Viare order ID]",
    "externalReferences": [
      {
        "id": "[external order ID]",
        "source": "[external order source]"
      }
    ],
    "dispatchPoint": "[dispatch point name]"
  }
}

dispatch.collect.collected

{
  "subscriber": 1,
  "sequence": 1,
  "type": "dispatch.collect.collected",
  "message": {
    "orderID": "[Viare order ID]",
    "externalReferences": [
      {
        "id": "[external order ID]",
        "source": "[external order source]"
      }
    ],
    "dispatchPoint": "[dispatch point name]",
    "collectedBy": "[customer or nominated person]",
    "staffNumber": "[staff number]"
  }
}

dispatch.shipped

{
  "subscriber": 1,
  "sequence": 1,
  "type": "dispatch.shipped",
  "message": {
    "orderID": "[Viare order ID]",
    "externalReferences": [
      {
        "id": "[external order ID]",
        "source": "[external order source]"
      }
    ],
    "dispatchPoint": "[dispatch point name]",
    "freightProvider": "[freight provider name]",
    "shipping": [
      {
        "reference": "[shipping reference]",
        "carrier": "[carrier name]",
        "trackingUrl": "[tracking URL]"
      }
    ]
  }
}

order.freight.changed

{
  "subscriber": 1,
  "sequence": 1,
  "type": "order.freight.changed",
  "message": {
    "orderID": "[Viare order ID]",
    "externalReferences": [
      {
        "id": "[external order ID]",
        "source": "[external order source]"
      }
    ],
    "freight": "[new freight charge]"
  }
}

order.item.quantity.changed

{
  "subscriber": 1,
  "sequence": 1,
  "type": "order.item.quantity.changed",
  "message": {
    "orderID": "[Viare order ID]",
    "externalReferences": [
      {
        "id": "[external order ID]",
        "source": "[external order source]"
      }
    ],
    "item": {
      "id": "[order item ID]",
      "barcode": "[product item barcode]",
      "quantity": "[new order item quantity]",
      "iteminfo": {
        "info": {
          "@key": "[key]",
          "@value": "[value]"
        }
      }
    }
  }
}

order.item.deleted, order.item.backordered

{
  "subscriber": 1,
  "sequence": 1,
  "type": "order.item.deleted, order.item.backordered",
  "message": {
    "orderID": "[Viare order ID]",
    "externalReferences": [
      {
        "id": "[external order ID]",
        "source": "[external order source]"
      }
    ],
    "item": {
      "id": "[order item ID]",
      "barcode": "[product item barcode]",
      "quantity": "[order item quantity]",
      "iteminfo": {
        "info": {
          "@key": "[key]",
          "@value": "[value]"
        }
      }
    }
  }
}

order.voided

{
  "subscriber": 1,
  "sequence": 1,
  "type": "order.voided",
  "message": {
    "orderID": "[Viare order ID]",
    "externalReferences": [
      {
        "id": "[external order ID]",
        "source": "[external order source]",
        "voidReasonCode": "[external void reason code]"
      }
    ]
  }
}

order.replacement.confirmed

{
  "subscriber": 1,
  "sequence": 1,
  "type": "order.replacement.confirmed",
  "message": {
    "orderID": "[Viare order ID]",
    "originalOrderID": "[Viare original order ID]"
  }
}

order.profiler.approved, order.profiler.cancelled

{
  "subscriber": 1,
  "sequence": 1,
  "type": "order.profiler.approved, order.profiler.cancelled",
  "message": {
    "orderID": "[Viare order ID]",
    "user": "System",
    "externalReferences": [
      {
        "externalID": "[external order ID]",
        "externalSource": "[external order source]"
      }
    ]
  }
}

What’s Next

Looking for an API-driven event queue? Check out the related Web Service API