Before beginning the integration to Ordeful, there are some decisions to make and some core concepts to understand.
Decisions
Integration Method
An important early architecture decision is deciding which method to use in order to receive messages.
Event-driven (push) - In this mode the integrator defines an endpoint which the Orderful platform can make requests with new transaction data. A benefit to this method is minimal latency as transactions are pushed as soon as they're processed.
Polling (pull) - In this mode the integration will call to an Orderful endpoint in order to receive a list of transactions to consume.
Orderful recommends the event-driven approach as it offers minimal latency. Documentation for both methods can be found in the upcoming sections.
Core Concepts
Transaction Lifecycle
State | Description |
Pending | A transaction has been receiver from a communication channel, created but has yet to be processed. |
Sent | The transaction has had all sender side processing completed and is sent to the receiver side for processing |
Dispatched | The transaction has had all receiver side processing completed and is being sent via the outgoing communication channel |
Accepted | The transaction has been accepted by the receiver. |
Failed | The transaction has failed at any of the above states. |
Data Structures
In the Orderful platform, the transaction is the core data structure. It can be used for trading many types of business data, such as Orders, Invoices, Shipments, etc. This document outlines and and gives examples to build familiarity with the data structure.
Example
{
"id": "326",
"sender": {
"isaId": "SENDERINC",
"organizationId": 305,
"organizationName": "Sender Inc"
"ediAccountId": 4242,
"ediAccountName": "Primary"
},
"receiver": {
"isaId": "RECEIVERCORP",
"organizationId": 385,
"organizationName": "Receiver Corp"
"ediAccountId": 3392
"ediAccountName": "North America Division"
},
"type": {
"name": "810_INVOICE"
},
"workflow": {
"relatedTransactions": [{
"type": "850_PURCHASE_ORDER",
"url": "https://api.orderful.com/v3/transactions/3333"
}]
},
"stream": "LIVE",
"state": {
delivery: "PENDING",
deliveryStatusReason: "n/a",
acknowledgement: "UNACKNOWLEDGED"
}
"metadata": {
"businessNumber": "ABC231333",
}
"message": {
"content": {...},
"validationStatus: "VALID",
"sizeInBytes": 3251,
},
"createdAt": "2020-08-24T18:29:45.457Z",
"lastUpdatedAt": "2020-08-24T18:29:45.457Z",
}
Properties
Property | Description |
id | This unique identifier for a transaction |
sender | Identity data pertaining to the sender of the transaction |
receiver | Identity data pertaining to the receiver of the transaction. |
type | Information about the type of the transaction. This data usually pertains to the X12 Transaction Type. |
workflow | Shows details about the workflow of the transaction including related transactions. |
stream | Indicates what stream the transaction was created on. (Live \ Test) |
state | Displays current status values of the transaction. |
metadata | Key-value pairs of transaction metadata extracted from the message content. |
message | The content and related data for the EDI message of the transaction. |
createdAt | Timestamp from when the transaction was created. |
lastUpdatedAt | Timestamp from when the transaction was last modified. |