Custom Sales Reports with WP All Export and Zapier

  • February 10, 2016
  • Blog

With WP All Export and Zapier you can send data from WordPress to apps like Gmail, Google Drive, Dropbox, Slack, and over 500 others. Our Zapier app has been in beta for three months and we’re happy to announce that it is now available to everyone.

We’ve been using WP All Export and Zapier together for quite a while. In that time they’ve become indispensable tools to track WP All Export’s sales and we’d love to walk you through how we do it.

Getting sales numbers using WP All Export.

In WordPress we use Easy Digital Downloads to sell our plugins (it’s even easier to export WooCommerce orders if you use that instead). To get the sales data out we’ll export EDD’s Payments post type and set up filters to export published payments created in the last 7 days. EDD uses the _edd_payment_meta custom field to store sales data, so we’ll add another filter to only include purchases containing WP All Export.

filtering options

For this export, we don’t really care so much about the actual data that we’re exporting – we just want to see the total number of records that are exported which will tell us how many copies we’ve sold.

We use a cron job to run this export automatically every week.

Sending sales numbers to Zapier and beyond.

trigger

Once our export is set up, we need to make a new Zap. A Zap is a blueprint for a task that you want to do whenever something happens. In this example, our Zap looks like this: “When I export sales data using WP All Export, send the export file to Dropbox, record the number of sales in Google Sheets, and then send an email.”

The first part (WP All Export) is the Trigger, and the other parts (Dropbox, Google Sheets, email) are the Actions. You have one trigger and as many actions as you like, all linked together in one Zap.

So, let’s make a new Zap and set WP All Export as our trigger.

We only want this Zap to execute when the export we just set up has completed. To do that we’ll add a filter in Zapier so that the Zap will only run if the export’s Friendly Name equals whatever we chose when setting up the export back in WordPress.

zapier filters

Now for the fun part.

We need to set up the actions – where the data will be sent and how it will be processed.

First let’s take care of Dropbox. It’s pretty straightforward, we just pick a folder and give the export file URL to Dropbox so it can download the file from WordPress.

Dropbox

Next up is Google Sheets.

We want to add a row to a spreadsheet with our sales numbers every time the export is completed. Just like with Dropbox, this is pretty straightforward. Since we set up our filters in WP All Export, we can use the ‘Records Exported’ trigger field in Zapier – that’ll tell us how many copies of WP All Export were sold in the last 7 days.

google sheets

With Google Sheets it’s really easy to set up charts to visualize your data – automatically updated pretty charts based on your WordPress data.

Finally, we want to email our team. To do that we’ll use the Email with Zapier action. Our team will get a share link to the file on Dropbox, a link to view the updated Google spreadsheet, and we’ll include the sales data in the subject of the email so they don’t even really need to open it.

email

And that’s it! This sort of thing is really only possible with WP All Export and Zapier and we’re very excited to hear about all the great Zaps you come up with!