Purpose: learn how to import a CSV file with shipping rules.
The Sendcloud subscription plans have been updated. If the subscriptions shown in the banner above don’t match your current subscription plan and you’d like to know more, please click here
When you're planning on adding a large amount of shipping rules, it might be faster to add them all to a CSV file and upload them all at once. This way you don't have to add each shipping rule individually.
Step 1: Download/create a CSV template
Download the cheat list and CSV template
Shipping rules can only be added by a specific format. Therefore, the CSV template has been created. Next to that, the template needs user specific IDs. You can get these from your own cheat list.
You can download the cheat list and CSV template at:
- In your Sendcloud panel, go to Shipping > Shipping rules
- Click
Upload file
- Click
Download template
- Click
Download cheat list
Create a CSV template
If you want, you could also create your own CSV file. Make sure to open a sheet in Excel, Google Sheets, or Numbers. The column names you want to add are:
Columns
- Rule name
- Condition and or
- Condition
- Operator
- Condition Value
- Action
- Action Value
Rows
With the guidance of the columns, you can now fill out a shipping rule per row. Continue reading at Step 2 to learn more. The options you'd otherwise select in the panel at Settings > Shipping rules > Create new rule/Edit, are the same options you fill out in the CSV file. If you need help setting up a shipping rule, please refer to this article.
Step 2: Fill in the CSV file
After you've created or downloaded the CSV file template, it's time to start filling it on.
- Rule name - pick a name that describes your shipping rule best
- Condition and or - only fill this in when you use more than one condition; use one of the following options: 'And' 'Or'
-
Condition - (see table):
Condition table
In the table below you can see the condition at 'Name' and the code of that condition at 'Code'. Fill in the code of the condition that applies to your shipping rule. When the condition is a country, please use the ISO code.
Name Code Integration integration Item name item_name Item SKU item_sku Company name name_2 Order number order_number Item Quantity order_quantity Order Status order_status Total parcel item value order_value Payment status payment_status Postal code postal_code Sender address sender_address To Country shipping_country Checkout delivery method shipping_method_name Weight (kg) weight -
Operators per condition - (see table):
Operators per condition table:
In the table below you can see what operators are supported for what conditions:
Conditions: Operator name Operator code Integration Is/Is not eq/ne Dynamic Checkout Method eq/ne dynamic_checkout_delivery_method Payment status Is/Is not eq/ne Postal code Contains/Does not contain/Ends with/Is/Is not/Starts with/in/Not in in/not_in/ends_with/eq/ne/
starts_with/in_list/not_in_list
Company name Contains/Does not contain/Ends with/Is/Is not/Starts with* in/not_in/ends_with/eq/ne/
starts_with
Item name Contains/Does not contain/Ends with/Is/Is not/Starts with in/not_in/ends_with/eq/ne/
starts_with
Item SKU Contains/Does not contain/Ends with/Is/Is not/Starts with/in/Not in in/not_in/ends_with/eq/ne/
starts_with/in_list/not_in_list
Order number Contains/Does not contain/Ends with/Is/Is not/Starts with in/not_in/ends_with/eq/ne/
starts_with
Order Status Is/Is not eq/ne Item Quantity Greater or equal than/Greater/Is/Is not/Less or equal than/Less than ge/gt/eq/ne/Ie/It Total parcel item value Greater or equal than/Greater/Is/Is not/Less or equal than/Less than ge/gt/eq/ne/Ie/It Sender address Is/Is not eq/ne To Country Is/Is not eq/ne Checkout delivery method Contains/Does not contain/Ends with/Is/Is not/Starts with in/not_in/ends_with/eq/ne/
starts_with/
Weight (kg) Greater or equal than/Greater/Is/Is not/Less or equal than/Less than ge/gt/eq/ne/Ie/It Carrier Carrier is (eq)/is not (ne) Customer email email contains (in) / does not contain (not_in) / is empty (empty) / pattern match (fnmatch) Phone number phone does not start with (doesnt_start_with) / is empty (empty) / pattern match (fnmatch) / starts with (starts_with) - Condition Value - this is an open answer containing numbers/letters
-
Action (see table):
Action table
In the table below you can see what actions are supported and how they need to be formatted in the CSV file. Fill in the code of the Action you want to use. When the action is a shipping method, use the shipping method ID.
Name Code Use box box Insure shipment by insurance_pc Set Item HS Code set_item_hc Set Item Origin Country set_item_origin_country Set number of parcels set_parcel_number Ship with address set_sender_address Ship with set_shipping_method Set weight set_weight Set customer email set_email Set item value set_item_value Set item weight set_item_weight Phone number set_phone Use shipping contract use_shipping_contract - Action Value - this is an open answer containing numbers/letters
Step 3: Upload CSV file
- Go to Shipping > Shipping rules
- Click on
Upload file
- Drag your file into the screen:
- If the file was successfully uploaded, a green pop-up should appear:
If the file can't be uploaded, an error screen and a red pop-up will appear:
The red pop-up shows a list of issues in the file. Make sure to solve these issues before you try to upload the file again.
Step 4: Edit or delete
Once your file is successfully uploaded, your shipping rules will be visible.
Activate or deactivate shipping rules:
Change the order of the shipping rules: ^
⌄
Edit or delete shipping rules: ⋮
Examples
Scroll down for the downloadable CSV files.
Shipping rules: Insurance on order value
Rule name |
Condition and or |
Condition |
Operator |
Condition Value |
Action |
Action Value |
Insurance 400 |
|
order_value |
ge |
400 |
insurance |
500 |
Insurance 650 |
|
order_value |
ge |
650 |
insurance |
750 |
Insurance 900 |
|
order_value |
ge |
900 |
insurance |
1000 |
Insurance 1150 |
|
order_value |
ge |
1150 |
insurance |
1250 |
Insurance 1400 |
|
order_value |
ge |
1400 |
insurance |
1500 |
You can download this CSV template and upload it to your Sendcloud account. If the value of the order is between 100EUR and 200EUR > the insurance is set to 200EUR.
Shipping rules: UK Evri (GB)
Rule Name | Condition and or | Condition | Operator | Condition Value | Action | Action Value |
Evri Standard Day Delivery 2-15 | AND | shipping_country | eq | GB | set_shipping_method | 4975 |
Evri Standard Day Delivery 2-15
|
weight | le | 15 | |||
Evri Standard Delivery 1-2 | AND | shipping_country | eq | GB | set_shipping_method | 4971 |
Evri Standard Delivery 1-2
|
weight | le | 2 | |||
Evri Standard Delivery 0-1 | AND | shipping_country | eq | GB | set_shipping_method | 4969 |
Evri Standard Delivery 0-1
|
weight | le | 1 |
Related articles
→ Automate your workflow using Sendcloud Shipping Rules
→ How can I import CSV/bulk order?