Refresh

This website matrixify.app/tutorials/export-and-import-file-with-dynamic-placeholders/ is currently offline. Cloudflare's Always Online™ shows a snapshot of this web page from the Internet Archive's Wayback Machine. To check for the live version, click Refresh.

Start Free Trial
Start Free Trial

Export and import file with dynamic placeholders

Shopify export custom file name with placeholders

When exporting, under Options you can specify the “Custom file name” for the export.

This is especially useful for scheduled exports so that you can specify what the file name should be for your exports.

You can also use the dynamic placeholders when importing file from URL. You can use them in any part of the URL including directories and file name.

For shop and job details

Placeholder Meaning Example
%{shop_subdomain} First part of your stores myshopify.com domain.  Example from cool-store.myshopify.com cool-store
%{shop_name} Store name as set in Shopify Cool Store
%{entities} Comma separated list of entities included in the import/export job. Customers,Orders
%{job_id} Matrixify job ID 174960521
%{uploaded_file} For Import – inserts the uploaded filename without the file extension. If set for the Export – it will be empty. This will help you identify the right Import Results file for each uploaded file. Update-Tags

For date and time

You can include the dynamic fields of the Export starting date and time in the file name, using the placeholders like this:

Placeholder Meaning Example
%Y Year with 4 digits 2018
%y Year with 2 digits 18
%m Month with padded zero (01 – 12) 04
%-m Month, not padded (1 – 12) 4
%B Month full name April
%^B Month full name uppercase APRIL
%b Month abbreviated Apr
%^b Month abbreviated uppercase APR
%d Day of the month with padded zero (01 – 31) 05
%-d Day of the month, not padded 5
%j Day of the year (001 – 365) 124
%H Hour in 24-hour format, with padded zero 01
%I Hour in 12-hour format, with padded zero 01
%P Meridian indicator, lower case am
%p Meridian indicator, upper case AM
%M Minute 45
%S Second 23
%z Time zone as hour and minute offset from UTC +0900
%Z Time zone abbreviation name UTC
%A Full weekday name Thursday
%^A Full weekday name, uppercase THURSDAY
%a Weekday abbreviation Thu
%^a Weekday abbreviation, uppercase THU
%u Day number of the week where Monday is 1 (1 – 7) 4
%w Day number of the week where Sunday is 0 (0 – 6) 4
%U Week number of the year where the week starts with Sunday (00 – 53) 14
%W Week number of the year where the week starts with Monday (00 – 53) 13

You can use those placeholders in any combination inside your filename.

Examples

Example Resulting file name
%Y-%m-%d at %H-%M-%S from %{shop_name} 2018-04-05 at 01-45-23 from Cool Store
%{shop_subdomain}_%m%d_%H%M cool-store_0405_0145
%{entities}_%Y-%^b-%-d_%{shop_subdomain} Products,Orders_2018-APR-5_cool-store
%Y-%m-%d_%{entities}_%{job_id} 2023-03-22_Orders_17496221
%Y-%m-%d_%{uploaded_file}_%{job_id} 2023-03-22_Update-Tags_17496221