Message Types

A message represents a change or an action performed on a resource (like an Order or a Product). Messages can be seen as a subset of the change history for a resource inside a project. It is a subset because not all changes on resources result in messages. Messages can be pulled via a REST API, or they can be pushed into a Message Queue by defining a Subscription.

Message

The following fields and their meanings are common to all messages:

  • id - String
    The unique ID of the message. It can be safely used to remember the fact that this message was already processed.
  • version - Number
  • sequenceNumber - Number
    A message number in relation to other messages in the context of a specific resource. The sequenceNumber of the next message of this resource is guaranteed to be a successor of the sequenceNumber of the current message. In other words, it will be sequenceNumber + 1.
    sequenceNumber can be used to make sure that all messages of this resource are processed in correct order.
  • resource - Reference to an object
    A reference to the resource on which the change was performed.
  • resourceVersion - Number
    The version of the resource on which the change was performed.
  • type - String
    The type of the message.
  • createdAt - DateTime
  • lastModifiedAt - DateTime

Each message may contain further fields that add information related to the change (for example, the fields of LineItemStateTransition when a transitionLineItemState update action is performed on an Order).

Message fields that can be used in query predicates: createdAt, lastModifiedAt, id, version, sequenceNumber, resource, resourceVersion, type.

Order Messages

These messages represent a change or an action performed on an Order.

LineItemStateTransition Message

This message is the result of the transitionLineItemState update action. In addition to the common Message fields, the LineItemStateTransition message contains the following fields:

  • type - String - "LineItemStateTransition"
  • lineItemId - String
  • transitionDate - DateTime
    The date and time, when state transition was actually performed
  • quantity - Number
  • fromState - Reference to a State
  • toState - Reference to a State
CustomLineItemStateTransition Message

This message is the result of the transitionCustomLineItemState update action. In addition to the common Message fields, the CustomLineItemStateTransition message contains the following fields:

  • type - String - "CustomLineItemStateTransition"
  • customLineItemId - String
  • transitionDate - DateTime
    The date and time, when state transition was actually performed
  • quantity - Number
  • fromState - Reference to a State
  • toState - Reference to a State
DeliveryAdded Message

This message is the result of the addDelivery update action. In addition to the common Message fields, the DeliveryAdded message contains the following fields:

  • type - String - "DeliveryAdded"
  • delivery - Delivery

The Delivery will not contain Parcels if those were part of the initial addDelivery command. In that case an additional ParcelAddedToDelivery message will be emitted containing the Parcels.

DeliveryRemoved Message

This message is the result of the removeDelivery update action. In addition to the common Message fields, DeliveryRemoved message contains the following fields:

  • type - String - "DeliveryRemoved"
  • delivery - Delivery
DeliveryItemsUpdated Message

This message is the result of the setDeliveryItems update action. In addition to the common Message fields, DeliveryItemsUpdated message contains the following fields:

  • type - String - "DeliveryItemsUpdated"
  • deliveryId - String - ID of the delivery
  • items - Array of DeliveryItem
ParcelAddedToDelivery Message

This message is the result of the addParcelToDelivery update action. In addition to the common Message fields, the ParcelAddedToDelivery message contains the following fields:

  • type - String - "ParcelAddedToDelivery"
  • delivery - Delivery
    The delivery updated with the added parcel.
  • parcel - Parcel
    The added parcel.
ParcelRemovedFromDelivery Message

This message is the result of the removeParcelFromDelivery update action. In addition to the common Message fields, ParcelRemovedFromDelivery message contains the following fields:

  • type - String - "ParcelRemovedFromDelivery"
  • deliveryId - String - The ID of the delivery the parcel was removed from
  • parcel - Parcel - The removed parcel
ParcelTrackingDataUpdated Message

This message is the result of the setParcelTrackingData update action. In addition to the common Message fields, ParcelTrackingDataUpdated message contains the following fields:

  • type - String - "ParcelTrackingDataUpdated"
  • deliveryId - String - ID of the affected delivery
  • parcelId - String - ID of the parcel which has been affected
  • trackingData - TrackingData - Optional
ParcelMeasurementsUpdated Message

This message is the result of the setParcelMeasurements update action. In addition to the common Message fields, ParcelMeasurementsUpdated message contains the following fields:

  • type - String - "ParcelMeasurementsUpdated"
  • deliveryId - String - ID of the affected delivery
  • parcelId - String - ID of the parcel which has been affected
  • measurements - ParcelMeasurements - Optional
ParcelItemsUpdated Message

This message is the result of the setParcelItems update action. In addition to the common Message fields, ParcelItemsUpdated message contains the following fields:

  • type - String - "ParcelItemsUpdated"
  • deliveryId - String - ID of the affected delivery
  • parcelId - String - ID of the parcel
  • items - Array of DeliveryItem
DeliveryAddressSet Message

This message is the result of the SetDeliveryAddress update action. In addition to the common Message fields, DeliveryAddressSet message contains the following fields:

  • type - String - "DeliveryAddressSet"
  • deliveryId - String - The ID of the Delivery which has been updated.
  • address - Address - Optional
ReturnInfoAdded Message

This message is the result of the addReturnInfo update action. In addition to the common Message fields, the ReturnInfoAdded message contains the following fields:

  • type - String - "ReturnInfoAdded"
  • returnInfo - ReturnInfo
OrderCreated Message

This message is created when a cart is ordered. In addition to the common Message fields, the OrderCreated message contains the following fields:

  • type - String - "OrderCreated"
  • order - Order
OrderImported Message

This message is created when an order is imported. In addition to the common Message fields, the OrderImported message contains the following fields:

  • type - String - "OrderImported"
  • order - Order
OrderStateChanged Message

This message is created when the OrderState is changed. In addition to the common Message fields, the OrderStateChanged message contains the following fields:

  • type - String - "OrderStateChanged"
  • orderState - OrderState
OrderStateTransition Message

This message is the result of the transitionState update action. In addition to the common Message fields, the OrderStateTransition message contains the following fields:

  • type - String - "OrderStateTransition"
  • state - Reference to a State
  • force - Boolean
OrderCustomerEmailSet Message

This message is created when the customer email of an existing order is modified. In addition to the common Message fields, the OrderCustomerEmailSet message contains the following fields:

  • type - String - "OrderCustomerEmailSet"
  • email - String - Optional
OrderCustomerSet Message

This message is created when the customer ID of the existing order is modified. In addition to the common Message fields, the OrderCustomerSet message contains the following fields:

OrderShippingAddressSet Message

This message is created when the shipping address of an existing order is changed. In addition to the common Message fields, the OrderShippingAddressSet message contains the following fields:

  • type - String - "OrderShippingAddressSet"
  • address - Address - Optional
OrderBillingAddressSet Message

This message is created when the billing address of an existing order is modified. In addition to the common Message fields, the OrderBillingAddressSet message contains the following fields:

  • type - String - "OrderBillingAddressSet"
  • address - Address - Optional
OrderPaymentStateChanged Message

This message is the result of the changePaymentState update action. In addition to the common Message fields, the OrderPaymentStateChanged message contains the following fields:

  • type - String - "OrderPaymentStateChanged"
  • id - UUID - id to identify the order.
  • paymentState - PaymentState
    The payment state the order was changed to.
OrderShipmentStateChanged Message

This message is the result of the changeShipmentState update action. In addition to the common Message fields, OrderShipmentStateChanged message contains the following fields:

  • type - String - "OrderShipmentStateChanged"
  • shipmentState - ShipmentState The shipment state the order was changed to.
OrderReturnShipmentStateChanged Message

This message is the result of the setReturnShipmentState update action. In addition to the common Message fields, OrderReturnShipmentStateChanged message contains the following fields:

  • type - String - "OrderReturnShipmentStateChanged"
  • returnItemId - String - The ID of the return item that was changed.
  • returnShipmentState - ReturnShipmentState The state of the return shipment the return item was changed to.

Product Messages

These messages represent a change or an action performed on a Product.

ProductCreated Message

This message is the result of the create product request. In addition to the common Message fields, the ProductCreated message contains the following fields:

  • type - String - "ProductCreated"
  • productProjection - ProductProjection
    The staged projection of the product at the time of creation.
ProductPublished Message

This message is the result of the publish update action. In addition to the common Message fields, the ProductPublished message contains the following fields:

  • type - String - "ProductPublished"
  • scope - String - The publishing scope
  • productProjection - ProductProjection
    The current projection of the published product.
  • removedImageUrls - Array of String
    List of images which were removed with this action.
ProductUnpublished Message

This message is the result of the unpublish update action. In addition to the common Message fields, the ProductUnpublished message contains the following field:

  • type - String - "ProductUnpublished"
ProductStateTransition Message

This message is the result of the transitionState update action. In addition to the common Message fields, the ProductStateTransition message contains the following fields:

  • type - String - "ProductStateTransition"
  • state - Reference to a State
  • force - Boolean
ProductSlugChanged Message

This message is the result of the changeSlug update action. In addition to the common Message fields, the ProductSlugChanged message contains the following fields:

  • type - String - "ProductSlugChanged"
  • slug - LocalizedString
    The new slug.
ProductImageAdded Message

This message is the result of the addExternalImage update action and the upload of an image. In addition to the common Message fields, the ProductImageAdded message contains the following fields:

  • type - String - "ProductImageAdded"
  • variantId - Number
    The variantId to identify the variant to which the image was added.
  • image - Image
    The image that was added.
  • staged - Boolean
    true if it was applied only to staged.
ProductRevertedStagedChanges Message

This message is the result of the revertStagedChanges update action. In addition to the common Message fields, the ProductRevertedStagedChanges message contains the following fields:

  • type - String - "ProductRevertedStagedChanges"
  • removedImageUrls - Array of String
    List of images which were removed with this action.
ProductVariantDeleted Message

This message is the result of the removeProductvariant update action. In addition to the common Message fields, the ProductVariantDeleted message contains the following fields:

  • type - String - "ProductVariantDeleted"
  • removedImageUrls - Array of String
    List of images which were removed with this action.
  • variant - ProductVariant - Optional
    The variant which was deleted.
ProductDeleted Message

This message is the result of the delete Product command. In addition to the common Message fields, the ProductDeleted message contains the following fields:

  • type - String - "ProductDeleted"
  • removedImageUrls - Array of String
    List of images which were removed with this action.
  • currentProjection - ProductProjection - Optional
    The current projection of the deleted product.

Category Messages

These messages represent a change or an action performed on a Category.

CategoryCreated Message

This message is the result of the create category request. In addition to the common Message fields, the CategoryCreated message contains the following fields:

  • type - String - "CategoryCreated"
  • category - Category
    The category at the time of creation.
CategorySlugChanged Message

This message is the result of the changeSlug update action. In addition to the common Message fields, the CategorySlugChanged message contains the following fields:

  • type - String - "CategorySlugChanged"
  • slug - LocalizedString
    The new slug.

Payment Messages

These messages represent a change or an action performed on a Payment.

PaymentCreated Message

This message is the result of a create action. In addition to the common Message fields, the PaymentCreated message contains the following fields:

  • type - String - "PaymentCreated"
  • payment - Payment
    The payment created.
PaymentInteractionAdded Message

This message is the result of the addInterfaceInteraction update action. In addition to the common Message fields, the PaymentInteractionAdded message contains the following field:

  • type - String - "PaymentInteractionAdded"
  • interaction - CustomFields
    The payment interaction added.
PaymentTransactionAdded Message

This message is the result of the addTransaction update action. In addition to the common Message fields, the PaymentTransactionAdded message contains the following fields:

  • type - String - "PaymentTransactionAdded"
  • transaction - Transaction
    The payment transaction added.
PaymentTransactionStateChanged Message

This message is the result of the changeTransactionState update action. In addition to the common Message fields, the PaymentTransactionStateChanged message contains the following fields:

  • type - String - "PaymentTransactionStateChanged"
  • transactionId - String
    The id of the Transaction.
  • state - TransactionState
    The new state of the transaction.
PaymentStatusStateTransition Message

This message is the result of the transitionState update action. In addition to the common Message fields, the PaymentStatusStateTransition message contains the following fields:

  • type - String - "PaymentStatusStateTransition"
  • state - Reference to a State
  • force - Boolean
PaymentStatusInterfaceCodeSet Message

This message is the result of the setStatusInterfaceCode update action. In addition to the common Message fields, the PaymentStatusInterfaceCodeSet message contains the following fields:

  • type - String - "PaymentStatusInterfaceCodeSet"
  • interfaceCode - String - Optional
    The interface code which was set.

Customer Messages

These messages represent a change or an action performed on a Customer.

CustomerCreated Message

This message is the result of the create customer request. In addition to the common Message fields, the CustomerCreated message contains the following fields:

  • type - String - "CustomerCreated"
  • customer - Customer
    The customer at the time of creation.
CustomerAddressChanged Message

This message is the result of the changeAddress request. In addition to the common Message fields, CustomerAddressChanged message contains the following fields:

  • type - String - "CustomerAddressChanged"
  • address - Address - The updated address of the customer.
CustomerEmailChanged Message

This message is the result of the changeEmail request. In addition to the common Message fields, CustomerEmailChanged message contains the following fields:

  • type - String - "CustomerEmailChanged"
  • email - String - The updated email of the customer.
CustomerEmailVerified Message

This message is the result of the verify customers email request. In addition to the common Message fields, CustomerEmailChanged message contains the following fields:

  • type - String - "CustomerEmailVerified"
CustomerCompanyNameSet Message

This message is the result of the setCompanyName request. In addition to the common Message fields, CustomerCompanyNameSet message contains the following fields:

  • type - String - "CustomerCompanyNameSet"
  • companyName - String - The name of the company, which was added to the user.
CustomerDateOfBirthSet Message

This message is the result of the setDateOfBirth request. In addition to the common Message fields, CustomerDateOfBirthSet message contains the following fields:

  • type - String - "CustomerDateOfBirthSet"
  • dateOfBirth - Date - The date of birth of the customer.
CustomerGroupSet Message

This message is the result of the setCustomerGroup request. In addition to the common Message fields, CustomerGroupSet message contains the following fields:

CustomerAddressRemoved Message

This message is the result of the removeAddress request. In addition to the common Message fields, CustomerAddressRemoved message contains the following fields:

  • type - String - "CustomerAddressRemoved"
  • address - Address - The address, which was removed from the customer.
CustomerAddressAdded Message

This message is the result of the addAddress request. In addition to the common Message fields, CustomerAddressAdded message contains the following fields:

  • type - String - "CustomerAddressAdded"
  • address - Address - The address, which was added to the customer.

Review Messages

These messages represent a change or an action performed on a Review.

ReviewCreated Message

This message is the result of the create review request. In addition to the common Message fields, the ReviewCreated message contains the following fields:

  • type - String - "ReviewCreated"
  • review - Review The review at the time of creation.
ReviewStateTransition Message

This message is the result of the transitionState update action. In addition to the common Message fields, the ReviewStateTransition message contains the following fields:

  • type - String - "ReviewStateTransition"
  • oldState - Reference to a State - Optional
  • newState - Reference to a State
  • oldIncludedInStatistics - Boolean
    Indicates if this review was taken into account in the ratings statistics of the target before the state transition.
  • newIncludedInStatistics - Boolean
    Indicates if this review is taken into account in the ratings statistics of the target after the state transition.
  • target - Reference - Optional
  • force - Boolean
ReviewRatingSet Message

This message is the result of the setRating update action. In addition to the common Message fields, the ReviewRatingSet message contains the following fields:

  • type - String - "ReviewRatingSet"
  • oldRating - Number - Optional
  • newRating - Number - Optional
  • includedInStatistics - Boolean
  • target - Reference - Optional

InventoryEntry Messages

These messages represent a change or an action performed on an InventoryEntry.

InventoryEntryDeleted Message

This message is the result of the delete InventoryEntry request. In addition to the common Message fields, the InventoryEntryDeleted message contains the following fields:

  • sku - String
  • supplyChannel - Reference to a Channel
    Optional connection to particular supplier