Below we explain what transactions are in Stock & Trace.
This article covers the following topics:
- What is a transaction?
- Types of transactions
- Unique identifier of a transaction
- Reference of a transaction
- Statuses of a transaction
- What is a transaction retry and when can it be done?
What is a transaction?
A transaction is a request sent between systems via an API or Webhook. In Stock & Trace, each transaction is assigned a unique identifier and placed in a processing queue, which means that the information is not processed immediately. The processing of each transaction may take a few seconds, as the system needs to validate the information to ensure its accuracy before completing the communication to the external system or registering the information in Stock & Trace.
Types of transactions
Transactions can be inbound or outbound, where for each type the following messages are supported:
-
Receive (API): These transactions are used to create or edit information in Stock & Trace. Inbound transactions can be for:
- Shipping order created: To create Shipping orders.
- Receive order created: To create Receive orders.
- Part number synchronization: To create or edit part numbers.
-
Shipping (Webhook): These transactions allow Stock & Trace to notify the external system about specific events. Outbound transactions can occur when:
- Receive order received: When a specific Receive order is received.
- Shipping order shipped: When a specific Shipping order is shipped.
- Location change: When inventory has been transferred between warehouses.
Unique identifier of a transaction
Each transaction, whether inbound or outbound, is assigned a unique identifier that allows for precise tracking of the communicated information. This identifier facilitates tracking and troubleshooting. Additionally, for each transaction, a detailed copy of the information transmitted via the API or Webhook is kept. This ensures that, in case of problems, technical teams can review and resolve any issues effectively.
Reference of a transaction
A reference is an identifier that helps the operational users of Stock & Trace to become familiar with the transaction. For example, it could be the purchase order number from which the creation of a Receive order in the warehouse is being requested. Another example is the sales order number from which a Shipping order is being generated in Stock & Trace.
References allow connecting the transaction with data or processes that users already know, thus facilitating its management and tracking in the system.
How are references assigned?
For inbound transactions, the external system can provide a reference that will be reflected in Stock & Trace, allowing a clear association with the received information.
For outbound transactions, Stock & Trace will display the corresponding reference, which may include the receipt number, the shipment number, or the internal ID of the part number being sent to the external system.
Statuses of a transaction
Each transaction goes through different statuses that are displayed in the administration panel, allowing users to easily track at which stage of the process each transaction is.
The statuses of a transaction are:
- Queued for processing: The transaction has been received and is waiting in the Stock & Trace processing queue. Processing has not yet begun, but it is in the list to be managed in the order it arrived.
- Queued for sending: Only applies to outbound transactions, indicating that the transaction is already being processed to be sent to the external system.
- Completed: The transaction has been processed successfully. All information has been validated, and the request has been completed satisfactorily, either communicated to the external system or registered in Stock & Trace as appropriate.
- Retryable error: The transaction encountered an error in the information during processing, but this error can be corrected. Stock & Trace will allow retrying the transaction once the necessary corrections are made.
- Fatal error (Non-retryable): The transaction has encountered a critical error that prevents its processing and cannot be corrected by a retry. This type of error requires a technical review to resolve the issue before the transaction can be attempted again.
- Not supported: The transaction contains a type of request or a format that Stock & Trace cannot handle. This status indicates that the transaction cannot be processed because it is not within the range of operations supported by the system.
What is a transaction retry and when can it be done?
Retrying a transaction is the process of reprocessing a request that initially failed due to correctable errors. When an error occurs in a transaction, the necessary adjustments can be made in Stock & Trace or in the external system before attempting to process it again.
Examples of retryable errors:
- When requesting to create a Receive order, a part number was communicated that is not configured in Stock & Trace.
- When requesting to create a Shipping order, a carrier was communicated that is not configured in Stock & Trace.
In these cases, a user must configure the missing information in Stock & Trace to resolve the error. Once corrected, the transaction can be retried.
When the transaction is retried, its status will change to "Queued for processing," thus restarting its lifecycle and allowing the system to process it again.
Comments
0 comments
Please sign in to leave a comment.