In this article:
Overview
A custom rule awards points for anything that happens on your site that LoyaltyLion does not already have a rule for, such as attending an event, completing a quiz, or joining a waitlist.
Unlike our other rules, nothing triggers a custom rule on its own. Your customers cannot complete it by clicking a tile on their loyalty page. You award the points either by completing the activity yourself on the customer's profile, or by telling us through our API when the customer has done the thing.
Don't have a developer? You can hire one through our partner directory.
How to create a custom rule
Go to Program, then Rules, then Create rule.
Choose Custom action.
Under Customer gets, set the number of Points to award.
Under Customer limit, choose how often a customer can earn from this rule. Tick the box, set a number of completions, then pick the period: per day, week, month, year, or lifetime. Leave the box unticked and there is no limit.
Fill in the Display section, which is what your customers see:
Title is the name of the rule on your loyalty page.
Notification is the message a customer sees when they earn the points. The {{points}} text is replaced with the number awarded.
Description is an optional longer explanation, shown to a customer when they open the rule on your loyalty page.
Fill in the Configuration section:
Identifier is the internal name we use to trigger the rule, and it is the value your developers send to our API. It can only contain lowercase letters and underscores, so no capitals, numbers, spaces or hyphens.
Approval method is either Immediate or Trigger. See what the approval methods do.
Click Create in the top right. The rule now appears in your rules list.
How custom rules are triggered
A custom rule is completed in one of two ways: by hand on the customer's profile, or through our API. Pick whichever fits the volume you expect.
Completing a rule manually
Completing the rule by hand suits low volumes, and stores without a developer to hand.
Go to the Customers tab and search for the customer.
Click Actions, then Complete activity.
Choose the rule from the Activity dropdown and click Complete.
The activity appears in the customer's history with the points against it.
Using the Activities API
The API is the better route if you have developers, because it completes the rule the moment the customer does the thing, with no one in the admin.
Send us an activity and we award the points to that customer. The Activities API documentation has the request format. The name field in your request has to match the rule's Identifier exactly, or we will not know which rule to complete.
To authenticate, create an API key with the read_customers and write_customers scopes.
Approving points from a Trigger rule
If you set the approval method to Trigger, the points arrive pending and your customer cannot spend them until you approve. This applies however the activity was completed, by hand or through the API.
Approve them from the customer's profile, on the History tab, using the Approve button next to the activity.
To work through a backlog instead, open the rule's action menu on the rules list and click View fulfilments. That lists every pending activity for the rule, and you can approve up to 50 at a time.
Your selection on the fulfilments list resets if you move to another page, so approve the page you are on before paging forward.
FAQ
Can I limit the rule to once ever?
Yes. Set the customer limit to 1 and choose per lifetime.
When does a rule limit reset?
On the calendar interval, not on a rolling clock from the last completion. If the limit is once per month and a customer completes the rule on June 30th, they can complete it again on July 1st. They earn the points both times, then wait until August 1st for the next one.
What are the approval methods, and how do they work?
The approval method decides whether the points are usable straight away.
Immediate awards the points as approved, so your customer can spend them at once.
Trigger awards them pending, and they only become spendable once you approve the activity.
Can I give points for social media engagement, such as posting about my brand or following me on TikTok?
For following you, use the social following rules. For anything that sends a customer to a page, such as a post or a campaign, the Visit a URL rule is simpler than a custom rule, because your customer can complete it themselves.




