Affilate Marketing Automation -
How to build WordPress referal machine

This story took place in late 2021. We were approached by an entrepreneur from France. He came up with the following idea. There are several large online stores for household appliances and electronics. Sometimes, they arrange big discounts. Our client wanted to automatically scrape & upload such discounts on their site. A special link was attached to each product. And if someone bought the product through this link, our client would get a portion of the profit.  In other words, we are talking about affiliate marketing automation.

Affilate marketing automation

In the context of the task, the client used the AWIN affilate system. It’s a World-Wide platform that allows people to earn money from product recommendations. That is – AWIN partner receives a unique link to the discounted product (for example, a laptop). If someone buys a product from this link – the partner makes a profit. 

AWIN is a fairly large affilate platform with a large turnover. In 2020, more than 180 million goods were sold through them. Imagine how much money we are talking about. Even if $1 profit was made from each sale.

So, our client wanted to automate this process. When there are thousands of products, it is no longer possible to copy them one-by-one manually. The challenge was to get his site to automatically collect data from AWIN and publish them. In addition, the customer told us that the products with the best prices should be sent to his customers by E-mail.

AWIN affilate marketing automation

Well. We decided to help the customer, and with great enthusiasm we got to work. Our team likes to make complex projects in data processing, and this time was no exception.

The AWIN platform provides information about their prices in the form of xml-feeds. Inside the feed you can find the product description, pictures, references and most importantly – the amount of discount. So we needed to create a mechanism that downloads the price lists from AWIN XML every day, finds products with the best discounts and uploads them to the client’s website. It sounds simple, but becomes complicated when we are talking about 150 different feeds.

Affilate machine - How to solve the problem

We chose a bunch of WordPress + WP All Import + CPT UI + additional modules. Why did we decide to do it that way? Because WordPress is easy to administer. After the initial setup and integration, the maintenance task can be handled by almost any professional. As for the WP All Import module, it is very flexible in configuration. It allows you to import data from almost any format. 

In our opinion, this kit (WordPress + WP All Import) is very well suited for affiliate marketing automation. It can be done quickly, it’s inexpensive, and it’s easy to scale.

Automated affilate marketing using WordPress

And this is what we got from the results of the setup. Every night, WPAllImport downloads the XML data from different sources sequentially. All products that have a discount of more than 30% are uploaded to the site. Past products, for each of the data sources, are removed from the site (since they are probably already sold out). Accordingly, at any given time, the site shows actual products with the biggest discount.

Thats all! When a visitor clicks on the “Buy” button on any product page, he is redirected to the original site of the online store. On the fact of each purchase, our client receives a % of sales.

When we made this feature, we joked about it. “Oh yeah, that’s the magic red button to make money“. Just imagine – a customer clicks the button, and for an entire month the store will pay you a % of that visitor’s purchases.

AWIN marketing automation - how to create referral machine

Do you think we stopped there? No way! We add custom RSS-feeding module and connected it to the Mailerlite platform. And now, every day after the appearance of new products with discounts, Mailerlite does E-mail mailing to a database of subscribers of our client. Thus, they receive fresh offers with the best prices, every day.

Affilate Marketing Automation with AWIN - principial scheme

Here we can give a simplified scheme of the final product. So. We’ve got a site up on classic WordPress. It uses the CPT UI plugin to host a separate category of products – it’s called “Affilate Products”. This is the same as the posts, but only adapted to display products. This technique allowed us to create a special HTML markup for Affilate products. That is, we have a separate layout for such products, adapted to the maximum probability of purchase on the affiliate site. That is, literally – a beautiful product page with a huge “Buy” button. You just can not get past this button 🙂

Module WP All Import accesses the software gateway AWIN, and downloads goods from there in CSV / XML format. With the help of the CRON scheduler, this process happens every night. Inside WP All Import made settings that retrieve data on goods with a maximum discount. The extracted data is written inside the template pages of the CPT UI. Thus, every night our online store completely updates its assortment, and every morning customers see fresh prices. Oh yes, such a special discount supermarket.

How to create referral program using WordPress and WPAllImport

Next, we use MailerLite for automatic mailing. Every morning, it automatically goes to the site, pulls all the products from there as an RSS feed, and sends them to customers. As a result, customers get emails about maximum discounts at local supermarkets. By clicking on the email, the customer sees the original price, and the discounted price. Clicking on “Read More” first takes him to the customer’s website. At the customer site, he clicks on the “Buy” button, and gets to the advertiser’s site. And there he already makes the purchase. AWIN attaches a special referral link to each product, especially for our client. From each sale made using this link our client gets 3-5% of the cost. So that’s the scheme for making money with automated affilate marketing.

Why WP All Import?

We think, that WP All Import is probably the best module for data import. First of all, it is very easy to configure for both the programmer and the average user. Secondly, it allows for very flexible configuration of import rules. Third, it has excellent technical support. Of course, these guys are far from the only ones on the market. Nevertheless, in our experience, it is the most convenient option to work with referral programs and automated marketing.

WPAllImort - affilate marketing automation

Many referral programs have different data formats. Some provide items in CSV format, some in XML, and some use something self-written. However, they all have something in common. And that common thing is the complexity of the formats.

WP All Import provides a convenient visual editor. It allows you to drag the necessary data from the XML markup directly to the HTML page. Also, they have a rich functionality for working with images. And, of course, automatic imports are worth mentioning. They are implemented through CRON, and it’s very convenient to

What's the bottom line? How much does it cost?

We successfully accomplished the task and made sure that the system worked stably. The client is satisfied, and is already making money from the product we created. Now our experience in scraping has been added with another case. We will be glad if you find this case useful. 

A moment of humor - when you invested in Affilate marketing, and suddenly it worked!

The cost of creating the Affilate marketing automation machine was $400. This is the price at which we can do similar work. If you are interested in such a system – contact us, we will be able to apply our expertise!