Skip to main content

Adding a Webhook to a Feature Rule

Zuora

Adding a Webhook to a Feature Rule

Webhooks allow Zephr to integrate with 3rd party software. Any updates within Zephr will notify the software e.g. Adding a user to a Mailing List software. This tutorial will guide you through the steps to trigger a Webhook within a Feature Rule, utilising the Zephr Feature Builder.

Navigate to Settings > Webhooks within the Zephr Admin Console, then click Add Webhook.

You will need to complete a series of fields including:

  • Label: A special name for your Webhook.
  • Triggers: This drop down reveals a list of system triggers available.
    • To trigger a Webhook within a Feature Rule, choose Custom > Feature. This enables you to add the Webhook to the flowchart within the Feature Builder.
  • Method: Select POST
  • Target: Enter the endpoint Target URL

When finished, click Add Webhook then return to Feature Rule you wish to trigger the Webhook from.

You will now see a new option in your Rules Builder Palette for Webhook. This can be found under Integrations > Webhook. Drag this onto your Zephr Rules Canvas and use the dropdown box to select the Webhook you have just created, then connect this to the rest of your rule.

Once in place, saved, and published, this Webhook will trigger when Users flow through this branch of your Rule.

In the example below, all user routes for entitled Users end on No Transform, which enables seamless content access. You will notice though, that via the newly created Custom Webhook, the User will receive an email when their Article Trial Meter reaches 1.

The flow above demonstrates:

  • A check to see if a user is logged in:
    • If No, then they will be directed to a registration form
    • If Yes, then a check will be done to see if they have the Article Entitlement
  • The check for the Article Entitlement will also result in a Yes or No:
    • If No, the user will be directed to a payment page
    • If yes, they will be directed to the desired content, with no changes to their experience

It is at the final point above where a Meter Count check will occur, whereby a user with a Meter Count of 1 will trigger the Webhook.