Search Documentation

Plan actions


Actions are the codes that are triggered when user subscription was activated and when user subscription expires.

It is important to understand that in fact actions are triggered not at the moment on user subscription activation but at the moment of user first time use it.

For example let’s say you created user subscription for user Joe. None of the actions will be triggered at that moment. But when Joe login Emerald will check if there are active subscriptions that did not trigger their actions, then Emerald runs those actions.

Why? Because we want user to be logged in at the moment we run actions. For example it is affiliate integration action which sends query to affiliate application. In most cases affiliate apps relay on cookies. Thus to subtract commission we have to pass cookies along the way and this is possible only if action will be triggered on Joe’s browser.

Add actions

To add action to plan.

  1. Edit subscription plan and open Actions tab
  2. Select action you need.
  3. Fill the form.
  4. Save.

Actions list

This is a list of all available actions and what they can do.

Action Description
User Group Move user to Joomla desired group. Note that subscription plans are already considered as user groups. You need this action only if you use Joomla core ACL to add additional restrictions.
SQL Query Runs custom SQL queries on subscription activated and disactivated events.
AMIGOS Integrates with AMIGOS Affiliate Tracking
iDevAffiliate Integrates with iDevAffiliate
Google Analytics Add tracking code and let Google Analytics to register goal and amount paid. Then you will see your sale reports in Google Analytics
Hook URL Send POST request to given URL with purchase details.
Custom JavaScript Any piece of javascript code. There are a lot of applications that integrates with simple placing JS code on the page.
MailChimp Automatically subscribe user to newsletter on MailChimp service.
GetResponse Automatically subscribe user to newsletter on Getresponse service.
Benchmark mail Automatically subscribe user to newsletter on Benchmarkmail service.
Smartresponder Automatically subscribe user to newsletter on Smartresponder service.
Hikashop Allow to sell subscription through HikaShop products.

Custom Action

You might want to create your own action. Then read this article.