Webhooks

Target audience

  • Supplier organizations;
  • Supplier warehouse organizations.

Purpose

Webhooks intend to provide an efficient way of data synchronization between Floriday and linked systems. They are intended to supplement the polling of the public API, not as a replacement.


Brief

  • A broadcasted event relates to 1 new or modified resource (hereinafter referred to as 'Aggregate' );
  • An event does not contain any content information from the aggregate, but only the ID. The recipient of the event must retrieve the data from Floriday itself via a call on the API;
  • For every adjustment of the aggregate - ie when Floriday increases its sequence - an event is sent out. It is conceivable that more events will be output - but with a minimum of one for each sequence increment;
  • The customers themselves remain responsible for keeping the data synchronized; webhooks are only an extra tool.

Guidance

  • A subscription to webhooks can be registered per Organization(ID), including the URL to which the events should be sent;
  • The event model is always the same. A distinction is made between AggregateTypes and EventTypes (see below);
  • The customer must filter events himself (if desired). It is not possible to subscribe to specific events;
  • The implementation is not versioned. AggregateTypes and EventTypes can be extended. Existing types will not be changed;
  • The responsibility of synchronization of data remains at the Supplier ERP and the supplier ERP needs to synchronize the resources accordingly;
  • As an additional service events will be posted at the Supplier ERP callbackURL;
    • Floriday does not guarantee delivery of events;

Summary

An overview of the different webhook types can be found below. The relationship between the state of the aggregate and the events are explained in the state diagrams in the next section.

Webhook Aggregate Type

Webhook Event Type

Description

BATCH

CREATED

A new batch has been created.

BATCH

QUANTITY_CHANGED

The quantity of which the batch consist has been adjusted

BATCH

CANCELLED

A batch is removed (the quantity has been set to 0)

SALESORDER

ACCEPTED

A SalesOrder has been approved

SALESORDER

REJECTED

A SalesOrder is rejected due to a financial validation

SALESORDER

CANCELLED

An ACCEPTED order can be canceled by a user (within the cancellation period).
A COMMITTED order can only be cancelled at clock presale if the batch is not auctioned, or from a correction.

SALESORDER

COMMITTED

An order is fully approved and may be continued for logistical processing.

SALESORDER

PRICE_UPDATED

As soon as a price (due to dynamic delivery costs) has been adjusted

SALESORDER

CORRECTED

Once a correction has been made in the SalesOrder

DELIVERYORDER

CREATED

There is a new delivery order

DELIVERYORDER

REQUEST_CHANGED

Fulfillment request added, deleted or changed to the delivery order

DELIVERYORDER

FULFILLMENT_CHANGED

The fulfillment of (part of) a fulfillment request has been changed.

DELIVERYORDER

CANCELLED

A delivery order has been deleted

FULFILLMENTORDER

SUBMITTED

There is a new (unprocessed) fulfillment order

FULFILLMENTORDER

ACCEPTED

The processing of the FFO was successful

FULFILLMENTORDER

REJECTED

The processing of the FFO was not successful. The FFO can be updated in the front end.

FULFILLMENTORDER

CORRECTED

If there has been a correction to, for example, the logistics resources.

FULFILLMENTORDER

CANCELLED

The processing of the FFO was not successful. The FFO can be updated in the front end.



State Diagrams

Below is an overview of the flow and the associated events for each aggregate. The events sent by Floriday are shown here in blue in bold. A description of these events can be found in the overview above.



BATCH:



SALES ORDER:



DELIVERY ORDER:



FULFILLMENT ORDER:



Implementation model



Interaction model