Activity: custom
Mags Maras avatar
Written by Mags Maras
Updated over a week ago

This activity enables you to create a rule to give points for any activity on your site.

Custom rules might require integration with LoyaltyLion's API, and it is your responsibility to track relevant activities to LoyaltyLion when they happen.

Read the relevant document which will help your development team to set this custom rule up.

Don’t have a developer? Hire one here!

How to create a custom rule?

  1. Go to Manage and on the left side click on Create new rule

  2. From the options choose Custom reward.

  3. Fill the required information:

  • Identifier - internal name for the rule. Especially important if you're using API to trigger the rule. Note - only letters and '_' underscores can be used here, no numbers please!

  • Points - number of points to award

  • Approval method:
    - Immediate - it rewards points immediately to the customer
    - Trigger - points are rewarded in pending state. Manual approval from the merchant is required

  • Limit - how often the customer can receive points for the same rule (e.g. once a day, twice a month, etc)

    Display - this is how the rule will appear to customers on site

  • Title - the title of the rule

  • Notification text - this will be visible to the customer as an on-site notification

  • Description - additional description of how customers will get points. If the description is present, customer will see it after clicking on 'Learn More' button in their customer UI.

4. Click Create the rule.

5. If you've decided to use the API route, instead of manually triggering the rule in the customer profile, please go to LoyaltyLion Activities API.

How are custom rules triggered?

In contrast to the in-house LoyaltyLion rules, the custom rule can't be triggered by a customer clicking on the tile in their UI. In order to reward points, they need to be manually rewarded by the merchant or by using our API.


This is ideal for smaller stores who don't have the capability to use API.

When viewing a customer's page from the admin, you can manually trigger any custom rule for using the interface.

  1. Once you know that a customer fulfilled the steps you outlined in the rule, go to Customers tab, and search for the customer.

  2. Click on Actions, and select Complete activity:

  3. From the list, select the rule that the customer should receive points for and click Submit

  4. The points will appear in customer's history.

Please note, that if you selected Approval method: Trigger ​during rule creation, you'll need to additionally accept the points in order for the customer to use it:

LoyaltyLion Activities API

Custom rules can be triggered using our API, which is the preferred method if your store has in-house developers.

Developer documentation for using the API for this can be found here:

When using API, customers receive points once we receive an API request from you, letting us know that a customer has completed an activity. ​Make sure that the rule identifier in LoyaltyLion and name field in your requests is the same.

To authenticate your requests, go to Manage -> Configuration -> Settings -> Token and Secret

Merchants need to make API calls not from the customer site, but from a secure server environment or build an intermediate server environment that could proxy the requests to LoyaltyLion. Doing otherwise, might expose your token and secret to the public, and seriously impact your loyalty program.

Once your POST request has been received by LoyaltyLion, the points will be visible in the customer's profile.

Please note, that if you selected Approval method: Trigger ​during rule creation, you'll need to additionally accept the points in order for the customer to use it:


Q. How are rule limits decreased?

The rule limits are calculated as a calendar interval. That means that if you set the rule limit to only give points once per month if a customer completes the rule on June 30th they can re-trigger the rule again on July 1st. They will get the points both times, but they would then need to wait until August 1st to be able to complete the activity again.

Q. Can I give points to my customers for social media engagement, for example, posting about my company on Instagram or following my company on TikTok?​

You can use the Activity: Visit rule to set up this up!

Did this answer your question?