Sync consignment data from SFTP to backend via JSON
File TransferData ParserMarketingRecipe Tools
What it does
When a new file arrives on the SFTP server, this automation downloads and parses the XML into JSON. It maps each consignment to a standard format and sends it to the backend system, or alerts someone if parsing or mapping fails.
Who it's for
Operations teams who need to process consignment files from SFTP without manual data entry or format conversion.
How teams use this
Process daily consignment batches automatically
Files drop into SFTP every morning, parse to JSON, map to the standard schema, and sync to the backend without manual steps. The team reviews results in the backend system.
Route consignments by region to different backends
Add a condition after mapping to check the consignment region and route each one to the correct backend system. The parsing and JSON conversion stay the same.
Notify warehouse teams of incoming shipments
Include a Slack notification after each consignment syncs so the warehouse team knows a shipment is on the way. The backend sync happens first, then the alert goes out.
Log all consignments to a data warehouse
Set up a data warehouse connection to receive each mapped consignment for reporting and audit trails. The backend sync continues, and the log happens in parallel.
How it works
- Monitor SFTP for new consignment files. Every 5 minutes, check the SFTP server directory for files that start with TFG_Demo_XML2_. When one arrives, the automation begins.
- Download and parse the XML file. Retrieve the XML file from SFTP and convert it to JSON so the consignment data can be extracted and mapped to the backend system.
- Map consignments to standard format. Transform each consignment from the JSON into the TFG Consignment common data model with all required fields for the backend.
- Send each consignment to the backend. For every consignment in the file, call the TFG Backend System with the mapped data. Archive the file when complete.
- Alert on parse or map errors. If parsing or mapping fails, send an email so someone can investigate and reprocess the file.