Overview
Keep members engaged by rewarding the actions that matter to your brand, even ones that happen outside your store, like signing up for SMS or buying in store. Custom earn rules award points for almost any action, triggered through Okendo's Merchant REST API or Shopify Flow.
Before you begin
đ Triggering custom earn rules with Okendo's Merchant REST API requires the Merchant REST API Key, available on the Growth plan and above. View pricing.
How custom earn rules work
Custom earn rules can be triggered by an action that Okendo Loyalty doesn't track natively. The action is captured by third-party software or triggered in Okendo Loyalty. Okendo Loyalty then awards points to the member according to the custom earn rule you set up.
Use cases for custom earn rules
You can create a highly engaging loyalty program experience by offering points for actions tracked outside of Okendo Loyalty. These include:
Subscribing to your newsletter
Signing up to SMS notifications
Visiting a website or specific URL (for example, a blog post)
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
Introducing gamification elements like awarding points for completing tasks or quests
The possibilities are endless!
â ď¸ We suggest you engage your development team 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 (for example, visiting a URL = 100 points)
Custom Event (Points Per): Awards a variable amount of points based on a value sent to Okendo Loyalty. Okendo Loyalty calculates the points value and then awards it to members. Use this type for cases such as in-store purchases or customer activation events (for example, steps completed in a step challenge)
Triggering custom earn rules
In addition to choosing a custom earn rule type, you can also choose how the custom earn rule is triggered in 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 dedicated endpoint supports this integration. This is the most flexible option as it offers you more control over what actions trigger a custom earn rule and when to trigger.
Via Shopify Flow: Custom earn rules are used as actions within a Shopify Flow. In this scenario, actions captured in Shopify act as the trigger for custom earn rules. You can use this method on any Okendo plan, provided you have access to Shopify Flow.
â ď¸ When deciding on the type of integration you need, consider where customer actions are captured, the conditions that must be met before a custom earn rule triggers, and the cost to develop and maintain the integration. We suggest you engage your internal development teams or an integration partner to discuss the type of integration best suited for your use case.
Integrate 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
Open the Integrations page in Okendo by going to Okendo Admin > Settings > Integrations > Credentials.
Select the icon shown below next to the Okendo section.
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
Create a custom earn rule by going to Okendo Admin > Loyalty > Loyalty Rules > Earn Rewards. Select + to add a new custom earn rule.
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 values sent to Okendo Loyalty. You can set up multiple custom earn rules at a time.
Complete all relevant fields in the rule and select Add, and then Save.
đĄ The Action Link is an optional field that enables you to link out to a webpage, survey, video or any other resource from custom earn rules on on-site displays. Members can then interact with custom earn rules from your storefront. Members may still need to complete the intended action to earn points from the custom earn rule.
To trigger your custom earn rule from a third-party application (for example, Shopify Flow), reopen the custom earn rule and go to the How To Trigger section. Copy the Action ID.
Integrate with the Okendo Merchant API
Review the Merchant API quick start guide on how to send requests to our Merchant REST API, including information about our earning_transactions endpoint, for triggering custom earn rules.
Use custom earn rules in Shopify Flow
You can use custom earn rules as actions in Shopify Flow.
Create the custom earn rule in Okendo Loyalty
Follow the same steps to create the custom earn rule, as above.
Create a Shopify Flow
Create a new workflow by following these instructions.
When defining an action, select Trigger custom earning rule from the Okendo actions.
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 use, while the Email Address variable lets Okendo Loyalty know which member to award points to.If you are trigger a Custom Event (Points Per) custom earn rule, you will also need to add a Value variable. 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 questions or need further assistance, contact our support team.







