Skip to main content
Using custom earn rules
G
Written by Glenn Lee
Updated over 4 months ago

Custom earn rules provide another way to engage and incentivize members, by awarding points for almost any action (for example visiting a website).

In this article, you’ll learn about:

  • How do custom earn rules work?

  • The types of use cases facilitated by custom earn rules

  • The types of custom earn rules available

  • How to set up a custom earn rule

How custom earn rules work?

At a fundamental level, custom earn rules are triggered by an external action. The external action is captured by 3rd party software, which then engages Okendo Loyalty to award points to the member, per the custom earn rule setup.

Potential use cases facilitated by custom earn rules

Merchants can create a highly-engaging loyalty program experience, by offering points for actions tracked outside of Okendo Loyalty. These include:

  • Subscribing to their newsletter

  • Signing up to SMS notifications

  • Visiting a website or specific URL (e.g. blog post or other)

  • Voting on product ideas

  • Awarding points for in-store purchases, captured in POS systems

  • Completing a set number of purchases

  • Rewarding members for entering and/or winning competitions

  • Introduce gamification elements like awarding points for completing tasks or quests

The possibilities are endless!

⚠️ NOTE

We suggest merchants engage their internal development teams or an integration partner to investigate the feasibility of any potential custom earn rule.

Types of custom earn rules

Okendo Loyalty supports two types of custom earn rules:

  • Custom Event (Fixed Points): Awards a fixed amount of points, for each completed action (e.g. visiting a URL = 100 points)

  • Custom Event (Points Per): Awards a variable amount of points, based on a value sent to Okendo Loyalty. In short, Okendo Loyalty calculates the points value and then allocates to members. This type can be used to support use cases such as in-store purchases or customer activation events (e.g. steps completed in a step challenge)

Types of integration to support custom earn rules

In addition to choosing a custom earn rule type, merchants can also choose how third-party software integrates with Okendo Loyalty:

  • Directly with Okendo's Merchant REST API: A custom earn rule is initiated by third-party software, via Okendo's Merchant REST API. A new endpoint has been created to facilitate the integration. This is the most flexible option as it offers merchants more control over what actions trigger a custom earn rule and when to trigger. Merchants will need to be on an Advanced plan or above or have purchased Merchant REST API access (for plans below Advanced) to integrate this in this manner.

  • Via Shopify Flows: Custom earn rules are used as actions, within a Shopify Flow. In this scenarios, actions captured in Shopify act as the trigger for custom earn rules. Merchants on all Okendo plans can use this method of integration (provided they have access to Shopify Flows).

⚠️ NOTE

There are a number of factors that should be considered when deciding on the type of integration required. Where customer actions are captured, the conditions that need to be fulfilled before triggering a custom earn rule and the cost to develop and maintain the integration, are all key considerations. We suggest merchants engage their internal development teams or an integration partner to discuss the type of integration best suited for their use case.

Integrating directly with Okendo's Merchant API

Follow these steps to integrate directly with Okendo's Merchant API.

Retrieve your User ID and Merchant REST API Key

  1. Open the Integrations page in Okendo, by going to Settings > Integrations.

  2. Select against the Okendo section.

  3. Copy your User ID. If you have not previously generated your Merchant REST API Key, select Generate and copy this value as well. You will need to include these in requests to the relevant endpoint.

Create the custom earn rule in Okendo Loyalty

  1. Create a custom earn rule by going to Okendo Admin > Loyalty > Points Rules > Earn Points. Select + to add a new custom earn rule.

  2. Select Custom Event (Fixed Points) to reward a fixed amount of points per customer action or Custom Event (Points Per) if you want to award points based on a value sent to Okendo Loyalty. You can set up multiple custom earn rules, at a time.

3. Complete all relevant fields in the rule and select Add, and then Save.

4. Reopen the custom earn rule and go to the How To Trigger section. Copy the Action ID.

Integrate with the Okendo Merchant API

Review our Technical Reference documents on how to send requests to our Merchant REST API, including information about our new earning_transactions endpoint, for triggering custom earn rules.

Using Custom Earn Rules in Shopify Flows

Merchants can use custom earn rules, as actions, in Shopify Flows

Create the custom earn rule in Okendo Loyalty

Follow the same steps to create the custom earn rule, as above.

Create a Shopify Flow

  1. Create a new workflow, but following these instructions.

  2. When defining an action, select Trigger custom earning rule, from Okendo actions

3. Add the Action ID for the custom earn rule as well as an Email Address variable ({{customer.email}} or {{order.customer.email}} depending on the trigger selected). The Action ID tells Okendo which earn rule to utilize, while the Email Address variable let's Okendo Loyalty know which member to award points to.

If you are trying to trigger a Custom Event (Points Per) custom earn rule, you will also need to add a Value variable as well. This will tell Okendo Loyalty what value it needs to multiply points by, to derive the total points to award to a member.

If you have any specific questions or need further assistance, feel free to reach out to our support team.

Did this answer your question?