Skip to content

Instantly share code, notes, and snippets.

@etherealite
Forked from reggi/readme.md
Created January 17, 2016 22:48
Show Gist options
  • Save etherealite/1d1574149c19abb9232c to your computer and use it in GitHub Desktop.
Save etherealite/1d1574149c19abb9232c to your computer and use it in GitHub Desktop.

Node MSS-FTP Shopify Bridge

Marketing Support Solutions (MSS) / SPExpress (SPE) / Stitch Labs / Shopify Bridge

General Needs / Questions

  • Gain access to the FTP Server
  • Parse dates out of files
  • Have awareness of processed documents (Mongo?)
  • Output dates into file names
  • What is the timezone for the FTP server?

Creating Orders from Shopify to FTP (Process 1)

Process 1 Summary:

  • Read all open orders from Shopify
  • Check if line-items fulfillment-service is set to MSS
  • Assemble a CSV document of all applicable orders
  • Name the file appropriately
  • Access FTP and place document within file-system

Process 1 Questions:

  • Will I be given write access to the server?
  • What is the directory structure of the FTP server?
  • Are there directories for each import (to fulfill) and corresponding export (fulfilled)?
  • Is there just on directory with multiple files?
  • How will I find the relevant latest file? Store processed document names?

Read FTP File of Fulfilled Orders and Fulfill in Shopify (Process 2)

Process 2 Summary:

  • Read fulfilled orders from FTP
  • Parse CSV
  • Fulfill in Shopify

Update Inventory Numbers in Stitch Labs (Process 3)

Process 3 Summary:

  • Read Inventory file
  • Update inventory in Stitch Labs (which updates Shopify)

Process 3 Questions:

  • Is this the process?
    • Aquire Stitch Labs Product variant ID
    • Map that ID corresponding ID in CSV row
    • Find the difference in inventory
    • Then add or minus based on the difference
    • Send Variant Stock change

Example File names:

order_HOLSTEE_SPExpress_20150402T031503.txt

SCF-V5-HOL-20150519-150009485.txt

INVENTORY_RPT_V2-20150518-211504088.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment