> For the complete documentation index, see [llms.txt](https://docs.perkville.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.perkville.com/features/earning-rules/custom.md).

# Custom

{% hint style="warning" %}
To automate a custom earning rule you need to either connect it via a [native Perkville integration](/overview/integrations.md) or with an external integration via [Perkville's API](https://www.perkville.com/developers/docs/v2/#v2_resource_24_anchor). Reach out to Perkville Support if you have any questions.
{% endhint %}

To create a Custom Earning Rule in Perkville:

1. Navigate to "Loyalty Program" located in the left navigation menu or in the "My Business" menu
2. Scroll down to "Earning Activities"
3. Click on the "+" icon to add a "Custom" rule

<figure><img src="/files/THfd2Xzmac1L5KI9LULY" alt=""><figcaption><p>Select custom from the pop-up menu to create a custom earning activity</p></figcaption></figure>

You are then able to define the following parameters:

**Define the activity unit**: In the field marked "Each," specify the single unit of the activity for which points will be awarded. This could be each "Dollar Spent," each "Class Attended," or each "Personal Training Appointment" as examples. This description will be visible to customers in the list of earning rules for your loyalty program.

**Set earning type**: Choose between awarding points, [instant rewards](/features/redeeming-rules/instant-rewards.md) or both.

* **Set points per unit**: Determine the number of points customers will earn for each unit of the activity. This amount will also be displayed in the customer-facing list of earning rules.
* **Set instant reward**: Choose the instant reward(s) that will be immediately distributed when customers earn the activity. These rewards will be emailed to the customer upon earning the activity and will be accessible on the customer's [vouchers](/features/vouchers.md) page.

**Referral completion setting**: Decide whether completing this activity should complete a referral. For example, if a referred friend completes the specified activity, you can choose whether the original referrer should receive referral points. This is controlled via a toggle that either enables or disables referral completion for the earning activity.

**Email prevention setting:** Decide whether this activity should trigger an email notification. For example, you can choose whether or not to send an email when customers earn points on their birthday.

**Select locations**: Specify which locations offer this perk. This selection influences where the earning rule appears, allowing customers to see how they can earn points at each location.

**Set earning limit**: Specify the maximum number of times the perk can be earned for the lifetime of their account. For instance, if you only want the customer to earn this perk once ever, you could input 1.

<figure><img src="/files/6EUr1r88h0cVKBIkx4SH" alt=""><figcaption><p>Custom earning activity setup</p></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.perkville.com/features/earning-rules/custom.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
