The affiliate program automation runs extra steps when someone signs up or pays through an affiliate's link: for example, it sends the new customer a welcome email or rewards the affiliate. Commissions and sign-up bonuses set in the program itself are credited automatically; the automation is for everything else. To set up the program, see "Affiliate Program".
Create an Affiliate Program Automation
Open the automation
Go to Sales → Affiliate Program and open the Automation tab.

Choose the trigger
Drag one of four triggers onto the canvas. Each pair fires on the same event; the difference is for whom the next steps run:
| Trigger | Fires when | Next steps run for |
|---|---|---|
| Sign-Up via Affiliate Link (Referral) | A new contact signs up through an affiliate's link | The new contact (the referral) |
| Sign-Up via Affiliate Link (Affiliate) | The same sign-up | The affiliate whose link was used |
| Purchase via Affiliate Link (Referral) | An order of a referred contact is paid | The buyer |
| Purchase via Affiliate Link (Affiliate) | The same paid order | The affiliate the buyer is attached to |
The sign-up triggers need no settings. The purchase triggers have one: First purchase. Choose Yes to react only to the buyer's first paid order, No for repeat orders only, or leave Doesn't matter.
Important:
- The triggers fire only while the affiliate program is active and the contact is still attached to the affiliate. How long the attachment lasts is set by Partner assigning duration in the program settings.
- The sign-up triggers fire only when a new contact is created. An existing contact who opens an affiliate link does not start them.

Add the actions
Drag actions from the Actions tab and connect them to the trigger. Configure each one through its gear icon → Configure Step, then click Save in its settings. Actions that are specific to the affiliate program:
- Bonus Balance: Add Transaction credits or debits the bonus balance of the contact the steps run for. Bonus credits can be spent on your products and cannot be withdrawn.
- Affiliate Program: Add Transaction credits or debits the commission balance of the contact's affiliate. If the contact has no affiliate, the step does nothing and the automation continues.
- Affiliate Program: Change Affiliate attaches the contact to another affiliate, or detaches them if you leave Affiliate empty. It affects future commissions only; commissions already credited stay.
Important: the program settings can already credit sign-up bonuses: Deposit to the partner's bonus account and Deposit to the referral's bonus account. If they are on, do not add the same bonus with Bonus Balance: Add Transaction in a sign-up automation, or the contact receives it twice.


Variables for affiliate messages
In a message or email step, click Add Variables next to the text field to insert:
#Contact.PartnerLink("link")#: the contact's personal affiliate link. Replacelinkwith the address of the page to promote, for example#Contact.PartnerLink("https://northstar.onaxl.com/leadership")#: AXL adds the affiliate's code to that address. Without the address,#Contact.PartnerLink#inserts only the code. For a contact who is not an affiliate, the variable stays empty, so use it in messages to affiliates.#Contact.BonusAmount#: the contact's current bonus balance.
For the other variables, see "Variables in Automations". To connect, copy or delete steps, see "Automation Events and Actions" and "Deleting and Copying Steps".

Activate the automation
Turn on the switch in the upper-left corner of the canvas so it reads Active. While it is inactive, sign-ups and purchases still count for the program, but the automation steps do not run.
