How to set up trigger webhooks

Triggers let you perform actions when certain events happen in the platform. You could use triggers to automate the approval of affiliates, commissions, or generation of payouts, for example.

Please note that webhooks are an advanced feature - we highly advise that you fetch a developer to help implement this.

Events

We have several events implemented which you can set triggers to, some of them are:

  • Affiliate created: This can be the result of an individual (who was previously not an affiliate) signing up as an affiliate, or being manually added as an affiliate. You can distinguish who initiated this event by using the ‘initiator’ filter.

  • Affiliate added to program: Each time an affiliate applies, or is manually added to a program. You can distinguish who initiated this event by using the ‘initiator’ filter.

  • Affiliate approved for program: This event is triggered when an affiliate is automatically approved, or manually added to a program.

  • Affiliate disapproved for program: This event is triggered when an affiliate is disapproved for a program.

  • Affiliate prospect created: This event is triggered when an affiliate prospect is created by an affiliate recruitment source.

  • Affiliate prospect promoted: This event is triggered when an affiliate prospect becomes an affiliate. There are several ways for a prospect to be promoted.

  • Affiliate approved for program: This event is triggered when an affiliate is automatically approved, or manually added to a program.

  • Conversion created: This event is triggered whenever a conversion is created.

  • Commission created: This event is triggered whenever a commission is created. This can be the result of a conversion, an automatic recurring commission, an MLM commission, or a commission added through the API.

  • Commission updated: This event is triggered whenever a commission is (dis)approved or edited.

  • Payment created: This event is triggered when an affiliate’s balance is settled in Tapfiliate.

  • Customer created: This event is triggered when a customer is created.

  • Customer updated: This event is triggered when a customer is created.

Note: If you are using the deprecated Payouts page, instead of Payment created, you’ll find the following two triggers:

  • Payout created: This event is triggered each time a payout is created.

  • Payout updated: This event is triggered each time a payout is updated (e.g. marked as ‘paid’)

Filters

You can assign filters to triggered events, too. The filters are different for each specific event. For example, the event ‘affiliate created’ has the filters options shown in the image below:

TriggerFiltersOptions

Setting up a new trigger webhook

  1. Go to the Triggers tab on the left-hand side of your Dashboard. Push the “New trigger” button to begin.

  2. Select the ‘event’ that will trigger the email.

  3. Add filters (optional).

  4. From the right-hand column, click on the ‘Webhook’ action.

  5. Open the Webhook settings within the trigger.

  6. Depending on the type of action you want to trigger, use the correspondent endpoint from our REST API and place it in the URL field.

  7. Use merge tags as indicated in the API documentation for the endpoint.

  8. Write ‘Api-Key’ in the ‘header’ field.

  9. Copy the API key from your Profile Settings.

  10. Paste the key in the header ‘value’ field.

  11. Compose the body of your request.

  12. Hit ‘Save’.