After the Export Orders extension release, we got a lot of questions about its fitness for particular use. In this article, we’ll tell you about the most popular Q&As, as well as show the needed settings.
Without further ado, let’s start.
- Use case #1. Export specific orders
- Use case #2. Export custom fields
- Use case #3. Take action to orders after exporting
- Use case #4. Export by a trigger
- Use case #5. Send export reports by email
- Use case #6. Export orders for the ERP system
Use case #1. Export specific orders
I need to export all the orders that have a specific delivery city. Also, I need these columns in my exporting file: shipping city, order id, order creating date, order subtotal, customer name from the shipping info.
Our extension includes field configurations and filters. This is how it works.
Step 1. Go to System > Export Orders > Profiles and create a new profile by clicking Add New Profile.
Step 2. Then, open the Fields Configuration tab. Here you can add the needed columns and customize their names for the export file if needed. To show you the example, we will open the Order (root entity) and add subtotal,increment_id, and created_at fields:
Next, in the Sales Order Shipping Address, we enable fields: firstname, lastname, and city:
Step 3. When you have added all the needed columns, move to the Export Filters tab. There you can add filters to export the required orders only. In our case, we need to export orders with the specific delivery city. For this, we open the Sales Order Shipping Address section and choose the city from the Field For Filtering dropdown:
Also, make sure that you enabled the Exclude Parent Entity Row If No Results Found option.
Step 4. Then fill out this form and save the profile.
As a result, you will get the file that has all the necessary columns, and you will save time on filtering and exporting particular info about orders.
I want to export orders that were placed by guest users.
Here are 3 options you can use to filter these orders: by customer_id, customer_is_guest, customer_group_id.
After you have created a new profile, and chosen the needed fields, go to the Export Filters tab. Open the Order section and click Add Filter.
Customer_group_id filter allows you to export orders placed by a specific customer group, for example, not logged in or retailer:
Customer_is_guest filter exports all the orders made by not logged in users:
And if you want to use the filter by customer_id, you set the filter condition to the is null option:
Use case #2. Export custom fields
I want to export custom fields from a 3rd-party extension.
Our plugin allows you to export additional attributes from 3rd-party extensions. For this, you need to set up the 3d Party Connection.
Step 1. Navigate to System > Export Orders > 3rd Party Connections and click Add New Connection:
Step 2. Then, enter the name of the integration that your managers will understand, and choose the table that you want to join from the Table to Join dropdown.
Step 3. In the Parent Entity field, specify where you want to join this table.
Step 4. Next, choose the field from the joinable table that will connect these 2 tables.
Step 5. In the Base Table Key field, enter the corresponding field from the parent entity table.
Step 6. Save the changes.
After this, you will be able to export fields and values from this table.
Use case #3. Take action to orders after exporting
I need to export all the orders with the pending status every hour and then change their status to processing. Is it possible?
Our plugin includes a lot of features for automation. ‘Actions after exporting’ is one of them.
Step 1. Create a new profile and add filters as we described in the first example:
Step 2. Then, go to the General Configuration tab, and open the Actions With Orders After Exporting section.
Step 3. There you will see all the available actions that our extension can do after reporting is complete. For this case, you’ll need to set the Change Processed Orders Status To field to Processing and Add Comment to Status History if needed:
Step 4. Next, you need to open the Automatic Export tab, enable the Run Profile by Cron option and indicate how often you want to export this profile:
Use case #4. Export by a trigger
I want to export a profile whenever someone places a new order.
Our extension supports both options for automatic exporting: by event and by cron. For this case, you’ll need to use exporting by an event.
Step 1. Create a new profile and set Export Only New Entities to Yes, if you don’t want to export old orders:
Step 2. Then, go to the Automatic Export tab and set the Run Profile by Event field to Yes.
Step 3. In the Export Event filed, choose what events will trigger exporting. In our case, we use order creation:
Use case #5. Send export reports by email
I need to send a sales report to stakeholders every day. It should include the order number, date, total, and Qty. Can I send this export file to several emails?
After the export file is generated, you can send it by email. To do it automatically, specify email addresses in the Output Options tab.
In the Export File Storage section, you can choose the email sender, enter email address and subject, and select the email template:
If you need to send this report to multiple email addresses, just enter them separated with commas.
Use case #6. Export orders for the ERP system
I need to export an XML file via FTP every 5 minutes by cron.
Our extension supports 6 file formats: CSV, XML, ODS, XLSX ,JSON, and Template . To choose the XML, create a new profile, and open the File Settings tab. Here you can choose the file format and customize additional fields that will appear depending on the chosen format:
In the Output Options, you can set up where you want to store this export file. Our extension supports server, FTP, SFTP, email, Rest API Endpoint. To upload the file by FTP, you need to specify the host, file path, username, and password:
Also, as we mentioned above, you can set up automatic exporting by cron.
That’s it for today!
P.S. Special thanks to Yulia Tihomirova, Karina Luzan, and Alexander Seravin for the help with this post.