Argos Dispatch Update 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 |
27.05.2024 | 1.1 | Hristiyan Georgiev | mapping changes |
The Purpose of this document is to specify the details around Dispatch update of orders on Argos Marketplace
We want to follow our standard procedure of Shipments as described here: https://www.notion.so/threecolts/Order-management-general-requirements-c345c9248c074bb1a06bbad16203f588
To sum it up we are looking for Shipments with the right status (pending) and aiming to update as much as possible of the added order items. As a difference to already seen setups for Argos we want to always add all items and all qty. Meaning if we have Shipped 2 out of 3 items and now we want to Ship the last one we still have to add in the feed all 3 SKUs with all available qty. We can either track other successful Shipments or look for items (and lines) with Shipped status on them to make sure we don't miss anything. Because of this difference though we are not expecting to ever hit the “Warning” status situation even if we are allowed to ship line by line simply because we will always pass all shipped items.
The addition of all items EXCLUDES Components! We should not be adding the components as part of the “all items” from the order as Components are something internally added and not actually a part of the order as it came from the Marketplace
A success for the Shipment will be when we generate both the actual file and the “.DONE” one on the FTP
Below the standard image of example order update file setup

Note: sadly there is no example file at this point but based on the above picture and below mapping explanations I believe we can create the needed file easily
Ftp Path Label for the setting: OrderShipment
Filename format: dispatch-yyyymmddhhmmssnnnnnn.txt
Sample file:
OrderShipment_old_20230515.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.1> Product In Order > EAN</v1.1> | |
quantity | Integers only | Numeric | None | Order Shipment Row > Quantity* | And add all other already shipped qty on all items from the order |
dispatch_date | yyyy-mm-dd | Date | 10 | Order Shipment > Shipment Time |
OR NOW() | If such date is not supplied we are to default to the time of processing the shipment | | supplier_delivery_date | yyyy-mm-dd | Date | N/A | Calculate | We need to calculate a value for a “delivery date” expectations. As opposed to what we did for the acknowledgement we want to pick only the actual delivery time as there is no handling no more for what we are shipping (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 dispatch level will be - calculating from the Shipment > Shipment Time OR NOW() (whichever is picked) the 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) This field is Mandatory so in case we can’t calculate it we should error the Shipment | | carrier | | Text | 100 | Order Shipment > Courier | Using that value we need to map against a list of available couriers in The Edge. To do that we need to set a middle ground value. What I mean by this is the ability to set on a courier in Hemi (in the section Couriers) a value to be used for such mapping. We already do this for a few other Marketplaces so it might be a good idea to take this into a whole separate section of its own. By doing this we can potentially expect to receive from our client “RoyalMail” as the courier and set it as such to map to a “Royal Mail” which is a valid value for Argos MP. Once we have the correct Argos value we want to map against their list and if we have a match then we want the tracking number below to be mandatory. If we don’t have a match tracking_number will be provided only if present.
If there is no specific value set within couriers or such specific courier at all we are to use the value as is from the Shipment for the Argos available couriers check | | service | | Text | 100 | N/A | | | tracking_number | Required for The Edge™ to obtain post-dispatch tracking statuses | Text | 255 | Order Shipment > Tracking Number | This field is optional, please see explanation for “carrier” | | tracking_url | | Text | 2000 | Order Shipment > Tracking URL | |
List all available couriers can be found here -
OrderTrackingCarrier-data-2024-03-12.xlsx
Please note we want to display the name and push the slug to Argos
- We need to always spit out all items within the order. This means that if we are triggering a shipment 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. The next shipment we do for that second SKU we still have to send all products but send the already shipped qty for the previous product
- 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 Shipment |
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 that we’ve generated fails to be read / uploaded by them they will rename the original file (in our case let’s say “dispatch-yyyymmddhhmmssnnnnnn.txt”) to have a “.failed” extension - “dispatch-yyyymmddhhmmssnnnnnn.txt.failed“.
Additionally Argos will create in their /outgoing folder a “.err” file (“dispatch-yyyymmddhhmmssnnnnnn.txt.err“) that will contain the correct error. We need to incorporate this in our model so we can achieve the following flow:
- Identify shipments to be sent
- Send dispatch update to Argos. Update relevant shipment to a “sent” status
- 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 Shipment in Hemi and update all relevant statuses on the order and items / lines of the order based on the abstraction we have
- 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 Shipment file hasn’t been processed for more than 24 hours”
- 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 Shipment |
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 |