Argos Orders Acknowledgement FTP
Summary of Changes: (The purpose of this table is to keep traceability and Product team to highlight the things that were changed into the scope, based on comments or discussions)
Date | Version | Author | Comment |
---|---|---|---|
27.02.2024 | 1.0 | Bogomil Pavlov | First Publish |
21.05.2024 | 1.1 | Milen Markov | Remove hardcoding for fulfillment_route |
27.05.2024 | 1.2 | Hristiyan Georgiev | Mapping changes |
The Purpose of this document is to specify the details around Acknowledgement of orders on Argos Marketplace
Every order that comes in Hemi needs to be acknowledged. As every update we need to send general order information and then every item we have on the order. In this case we want to do it with all of its quantity as we need to acknowledge everything. If there is anything to be updated as Cancelled for example this will always be done after acknowledgement (this also means if something is not acknowledged successfully we should not send subsequent updates for it). As this is a flat file communication that doesn’t have response files we are to treat a successful acknowledgement whenever we successfully create the files on the FTP (reminder - every file we create needs to have a second one with “.DONE” at the end - the “.DONE” generated file can be empty but it needs to be created only once we are happy with the original file being uploaded successfully so we can trigger the processing of the file)

Ftp Path Label for the setting: OrderAcknowledge
Filename format: order-yyyymmddhhmmssnnnnnn.ack
Sample file:
OrderAcknowledge_old_20230526.txt
Example Mapping: Please note there are two mapping sections below for better differentiation between the main order section and the ordered items section
Order:
Integration Field | Integration Notes | Integration Format | Integration Limit | Hemi Mapping | Hemi Notes | |
---|---|---|---|---|---|---|
order_number | Unique identifier for the order on The Edge™ | Text | 100 | Order > Marketplace Order ID | ||
supplier_ref | Your system’s unique reference for the order | Text | 100 | Order > ID | ||
test_flag | Y | N | Boolean | N/A | N/A |
Ordered Items:
Integration Field | Integration Notes | Integration Format | Integration Limit | Hemi Mapping | Hemi Notes |
---|---|---|---|---|---|
line_ref | Unique identifier for the line within an order | Text | 100 | Product in Order > Item Order Line ID | |
part_number | Unique identifier for the SKU | Text | 255 | <v1.2>Product in Order > EAN</v1.2> | |
quantity | Integers only | Numeric | None | Product in Order > Quantity | |
comments | Text | 255 | N/A | ||
sub_status | Custom item status | Text | 255 | “Pending” | Hardcoded value |
supplier_dispatch_date | yyyy-mm-dd | Date | N/A | N/A | |
supplier_delivery_date | yyyy-mm-dd | Date | N/A | *Calculate | We need to calculate a value for a “delivery date” expectations. We need to incorporate 2 things in this - handling time (already have this as Dispatch Time both on Product Account and in Shipping Template) and delivery time (we don’t have this - we need to create a new field on Shipping Method level to capture this value) |
The way to calculate the Delivery date on acknowledgement level still will be - handling time (going through Product Account >Dispatch Time Max > If there is a Shipping template assigned to this item - > Default Shipping template: basically the same method we are using to determine handing time when we are listing a product) + delivery time (from the assigned Shipping template OR the default one we take the method and take the delivery time. Expectation is for this MP Shipping templates will have only one method in case there are multiple the biggest delivery time should be used) = days for delivery. Then we calculate now() + days for delivery and we get to the required delivery date. This field is Mandatory so in case we can’t calculate it we should store an error on the order. We should also think on if we want to add a blocker that will prevent us from constantly running through this order and creating error after error for the same thing | | fulfillment_route | e.g Is the order being sent direct to customer or to a specific location | Text | 255 | N/A | <v1.1>empty field</v1.1> |
- We need to acknowledge every RFS order we receive and store in Hemi. As the orders are already on RFS I believe we should assume they’ve been checked and are fine, meaning based on status of incoming order we can simply see not “Acknowledged” orders and trigger the process of acknowledgement directly
- We need to always spit out all items within the order. This means that if for some reason we are triggering an acknowledgement for 1 SKU in an order when there are 2 SKUs we need to send both SKUs again but have 0 for one of the products in the Quantity field. For acknowledgement we should always send the full qty amount for all products
- Once the file is successfully uploaded we always need to upload a file with the same name with a “.DONE” extension. This file can be empty but this is the trigger for The Edge to pick the actual file and process it
- Once the file is generated we need to create a new feed in Marketplace Feed table with the following mapping:
Marketplace Feeds
Field Name | Value |
---|---|
Account | The account id from the order |
External Id | the file name |
Type | Order Acknowledge |
External Type | N/A |
Status | Pending |
Zip Path | N/A |
External Status | N/A |
Submitted Date | The actual date of submitting |
Completed Date | N/A |
Sent Objects Count | Always 1 order |
Response Reader
- The way Argos treat their file connection system is slightly odd. If a file fails to be read / uploaded by them they will rename the original file (in our case let’s say “order-yyyymmddhhmmssnnnnnn.ack”) to have a “.failed” extension - “order-yyyymmddhhmmssnnnnnn.ack.failed“. Additionally Argos will create in their /outgoing folder a “.err” file (“order-yyyymmddhhmmssnnnnnn.ack.err“) that will contain the correct error. We need to incorporate this in our model so we can achieve the following flow:
- Identify order for acknowledgement
- Send order for acknowledgement. Update said order in a way where following acknowledge operations will not pick it up and send duplicated values
- Wait for file to be processed
- If Success (which is indicated by our files completely disappearing from the FTP folder they were created in) update order in Hemi with already mentioned statuses which should also be an indicator for the acknowledgement job not to pick this order anymore
- If error (which is indicated either by our files being renamed to “.failed” OR staying on the FTP without being picked for more than 24 hours since their creation) - store the correct error in Hemi and block further updates until changed. The correct error is:
- If “.failed” - pick the error as seen in the corresponding “.err” file
- If time validation - “The generated acknowledgement file hasn’t been processed for more than 24 hours” The way I propose handling this is via updating the “Is Acknowledged” field on the order level to not be just a boolean value but include more values so we can mark as “no”, “yes”, “sent” or “failed” (values 2 and 3 so we don’t break any other integration) The “.err” file itself as received from Argos is directly the error they’ve faced and we can store it 121 in the Order Error section
- Once the response file is processed we want to update the Marketplace Feeds as follows:
Marketplace Feeds
Field Name | Value |
---|---|
Account | The account id from the order |
External Id | the file name |
Type | Order Acknowledge |
External Type | N/A |
Status | Completed |
Zip Path | N/A |
External Status | N/A |
Submitted Date | The actual date of submitting |
Completed Date | The date of completed when the response read the file |
Sent Objects Count | Always 1 order |