Variable Syntax For File Paths

When working with the scheduler, we allow you to use variables when setting up the File Path in your Source Data or when performing a move/rename after the file has been processed. In order to use variables in your file names, you need to enclose them with two curly brackets like so:

{{ }}

For example, If you want to process a file based on the day the schedule is running you would do something like below. Assuming your filename starts with todays_fulfillment.

todays_fulfillment_{{ YYYY }}{{ MM }}{{ DD }}.cs

For more details on how scheduling works click here. We also have detailed documentation on how to format your files to work with dates here.

Source Data Variables

Below is a list of variables that are valid to use with your source data file path. These variables are the ONLY ones we support when reading files from your FTP/SFTP, Dropbox or Amazon S3 service. The Minute, Second and Timestamp variables are not supported when reading files as there is a chance the scheduler may not run at the exact minute or second the file is named, which would cause the file to be missed during processing.

There is some overlap between valid variables when using source data file paths and post processing file paths. However, you will notice that each support their own set of variables as well.

  • {{ YYYY }} - the current year (e.g. 2018)
  • {{ MM }} - the current month (e.g. 09)
  • {{ DD }} - the current day (e.g. 21)
  • {{ HH }} - the current hour (e.g. 10)
  • {{ * }} - Wild card syntax. Read more here

The date variables are based off of your Shopify stores timezone and are built based on the date and time of your store when the Data Feed is run.  For example, if your store's timezone is Eastern Standard Time, then the date that is generated using the date variables will be based on Easter Standard Time when the feed is run.

Post Processing Variables

Below is a list of variables that are valid to use when post processing your file. There is some overlap between valid variables when using source data file paths and post processing file paths. However, you will notice that each support their own set of variables as well.

  • {{ YYYY }} - the current year (e.g. 2018)
  • {{ MM }} - the current month (e.g. 09)
  • {{ DD }} - the current day (e.g. 21)
  • {{ HH }} - the current hour (e.g. 10)
  • {{ M }} - the current minute (e.g. 05)
  • {{ SS }} - the current second (e.g. 10)
  • {{ TIMESTAMP }} - the current timestamp formatted as yearminutehourseconds (e.g. 20200106113025)
  • {{ FILENAME }} - the filename that was pulled from your server/service (e.g. todays_fulfillments_20200106)

The Wildcard Variable

You can use the wildcard syntax when setting up your source data file path. This will allow you to create a pattern that can be matched when pulling down a file.

For example, you may want to process any files that have a prefix of todays_fulfillment_. To do this you would do the following:

/your_directory/todays_fulfillment_{{ * }}.csv

EZ Fulfill will look for any files in the directory specified that start with todays_fulfillment_ and end with a .csv extension.

There are a few things to note when using the wildcard syntax:

  1. You can not use the wildcard by itself. If you end your source file path with {{ * }} in your Data Feed, you will get an error.
  2. You can not use only a wild card in the file name. The wildcard syntax must be used in conjunction with a filename. If you do {{ * }}.csv in your source file path on your Data Feed, you will get an error.
  3. When using the wild card syntax you must move the file out of the directory. If you try to rename the file in the same directory the Data Feed will return an error. You can still use the Do Nothing To File post processing option if you choose.

If you want EZ fulfill to read files from a directory, the best thing to do is use the wild card syntax.  We do not allow you to read every file in a directory as a precaution.  Instead, we've built a wildcard syntax that allows you to read groups of files or build more complex pattern matching on your file names.  This way you can specifically a generic file name or maybe you want to read any file name that has a date appended to it.  This allows you the flexibility to fulfill orders using any convention your fulfillment center provides.

If you have any questions about our variable syntax or wild cards please feel free to reach out and let us know.


App: EZ Fulfill

Tags: ftp, sftp, dropbox, wildcard