Webhook request payload
With every webhook request sent by ReflexBlue, a payload is included. This payload contains information that enables the external system to determine which data has changed. The payload is always structured in JavaScript Object Notation (JSON) format. The content of the payload differs per webhook event type.
This section provides an overview of the different types of payloads that ReflexBlue can send, including the specifications of their properties and data types.
Webhook payload types
DefaultWebhookPayload
For most webhook event types, ReflexBlue sends a payload of the type DefaultWebhookPayload. The table below shows the properties of this payload.
| Property | Type | Description |
|---|---|---|
| EventTypeName | text | The name of the webhook event type. |
| EntityCode | numeric | The code of the entity. |
| EntityId | guid | The unique ID of the entity. |
| Sequence | numeric | The row version number of the entity. |
Note: In ReflexBlue, the EntityCode of an entity can be changed (such as the item code for an article or relation code for a relation). Therefore, always use the EntityId for linking with your own data, as it is unique and does not change.
Example
Below is an example of a JSON payload for a Relation updated (webhook://relations.relationupdated) webhook event.
{
"eventTypeName": "webhook://relations.relationupdated",
"entityCode": 27099,
"entityId": "fe986a6e-c10e-473e-b914-6af858ea129e",
"sequence": 963742
} OrderWebhookPayload
For webhook event types Order added, Order updated, and Order deleted, a payload of the type OrderWebhookPayload is included with each webhook request from ReflexBlue. The table below provides an overview of the properties in this payload.
| Property | Type | Description |
|---|---|---|
| EventTypeName | text | The name of the webhook event type. |
| EntityCode | numeric | The code of the order. |
| EntityId | guid | The ID of the order. |
| Sequence | numeric | The row version number of the order. |
| OrderDeleted | boolean | Indicates if the order has been deleted. |
| OrderStatus | OrderStatus | The order status. |
| OrderType | OrderType | The order type. |
| OrderSubType | OrderSubType | The order subtype. |
| IsConceptOrder | boolean | Indicates if it is a concept order. |
| DynamicFieldValues | DynamicFieldValue | A list of dynamic field values for the order. |
| RelationId | guid | The ID of the relation for whom the order is intended. |
| RelationCode | numeric | The code of the relation. |
| RelationName | text | The name of the relation. |
| RelationDynamicFieldValues | DynamicFieldValue | A list of dynamic field values for the relation. |
Example
Below is an example of a JSON payload for an Order updated (webhook://order.orderupdated) webhook event.
{
"eventTypeName": "webhook://order.orderupdated",
"entityCode": 279,
"entityId": "d81b3e96-2a93-4f65-beea-5013169664b9",
"sequence": 963718,
"orderStatus": "Open",
"orderType": "Sales",
"orderSubType": "Default",
"dynamicFieldValues": [{
"dynamicField": {
"type": "Text",
"name": "External ID",
"identifier": "EXTERNE_ID",
"id": "1804a9ed-cd6e-4224-99b4-47d60246a676",
},
"textValue": "A23456"
}],
"relationId": "fe986a6e-c10e-473e-b914-6af858ea129e",
"relationCode": 27099,
"relationName": "John Smith",
"relationDynamicFieldValues": []
} Data types
OrderStatus
Properties of the type OrderStatus can have the following values.
| Values | Description |
|---|---|
| Open | Indicates that the order is open. |
| Closed | Indicates that the order is closed. |
OrderType
Properties of the type OrderType can have the following values.
| Values | Description |
|---|---|
| Sales | Indicates that it is a sales order. |
| Purchase | Indicates that it is a purchase order. |
OrderSubType
Properties of the type OrderSubType can have the following values.
| Values | Description |
|---|---|
| Default | Indicates that it is a default type. |
| Approve | Indicates that it is an approval order. |
| Return | Indicates that it is a return order. |
| Backorder | Indicates that it is a backorder. |
| Edi | Indicates that it is an EDI order (EDI stands for Electronic Data Interchange). |
| EdiReturn | Indicates that it is an EDI return order. |
DynamicField
Properties of the type DynamicField can have the following properties.
| Property | Type | Description |
|---|---|---|
| Id | guid | The ID of the dynamic field. |
| Type | DynamicFieldType | The type of the dynamic field. |
| Name | text | The name of the dynamic field. |
| Identifier | text | The identifier of the dynamic field. |
| Description | text | The description of the dynamic field. |
DynamicFieldValue
Properties of the type DynamicFieldValue can have the following properties.
| Property | Type | Description |
|---|---|---|
| DynamicField | DynamicField | The dynamic field this value belongs to. |
| NumberValue | numeric | The numeric value. |
| DecimalValue | decimal | The decimal value. |
| TextValue | text | The text value. |
| DateTimeValue | datetime | The date and time value. |
| TimeValue | time | The time value. |
| DateValue | date | The date value. |
| BooleanValue | boolean | The boolean value. |
| ChoiceValue | DynamicFieldChoice | The choice value. |
| EntityValue | guid | The ID of the entity specified as the value. |
DynamicFieldChoice
Properties of the type DynamicFieldChoice can have the following properties.
| Property | Type | Description |
|---|---|---|
| Value | text | The value of the choice. |
DynamicFieldType
Properties of the type DynamicFieldType can have the following values.
| Values | Description |
|---|---|
| Choice | Indicates that it is a choice dynamic field. |
| Text | Indicates that it is a text dynamic field. |
| MultiLine | Indicates that it is a multi-line text dynamic field. |
| Hyperlink | Indicates that it is a hyperlink dynamic field. |
| Boolean | Indicates that it is a boolean dynamic field. |
| Date | Indicates that it is a date dynamic field. |
| Time | Indicates that it is a time dynamic field. |
| DateTime | Indicates that it is a date and time dynamic field. |
| Decimal | Indicates that it is a decimal dynamic field. |
| Number | Indicates that it is a numeric dynamic field. |
| RTF | Indicates that it is a Rich Text Format (RTF) dynamic field. |
| WarningMessage | Indicates that it is a warning message dynamic field. |
| Article | Indicates that it is an article dynamic field. |
| Relation | Indicates that it is a relation dynamic field. |
| RelationGroup | Indicates that it is a relation group dynamic field. |
| ArticleGroup | Indicates that it is an article group dynamic field. |
| RelationDocument | Indicates that it is a relation document dynamic field. |
| User | Indicates that it is a user dynamic field. |
| Country | Indicates that it is a country dynamic field. |