1
0
Fork 0
mirror of https://git.sr.ht/~ashkeel/strimertul-website synced 2024-11-21 21:22:21 +00:00
strimertul-website/content/guide/features/loyalty-system.md

150 lines
7.4 KiB
Markdown
Raw Permalink Normal View History

2023-03-01 10:18:16 +00:00
---
title: Loyalty system
menu:
guides:
parent: features
weight: 100
---
2023-04-05 16:04:48 +00:00
The loyalty system in strimertül allows your viewer to accrue points by just sticking around and chatting to then spend them on rewards and community goal. It's pretty much a third party implementation to Twitch Channel point system, but does not require you to sign into affiliate.
Compared to Twitch channel points:
- ⭕ Does not require Twitch Affiliate or Partner
- ⭕ You can check and edit the balance of every viewer at any time
- ❌ There is no UI for viewers to easily check all rewards and claim them outside of chat
- ❌ Points are accrued not based on watch time but chat activity (for technical reasons)
Some other current limitations that might be fixed in the future include:
- Points are linked to usernames and not user IDs, which means viewers will lose their points when changing their name
- There is only a per-prize cooldown option, eg. no way to limit number of redemptions per stream
- There is no daily cap on contributing to goals
- Points contributed to goals cannot be refunded
If these limits feel acceptable to you, here's how to set the loyalty system up and running in your streams.
To access the loyalty system configuration, locate its section in the side menu.
2023-11-12 11:05:04 +00:00
![The loyalty system configuration pages in the side bar](../media/loyalty/menu.png)
2023-04-05 16:04:48 +00:00
## Configuration
The configuration page lets you turn on or off the entire loyalty system, along some settings on how points are awarded to users.
The most important settings are "How often to give wishes" and "Bonus points". The first sets how often and how many points to give to any user currently logged into chat, while the latter is an extra amount of points added to the former (using the same interval) that is awarded specifically to users who have written at least one chat message during said interval.
It is heavily recommended to keep the interval in the minutes range. This alleviates load on strimertül (since every interval there's some awarding logic and Twitch API calls to execute) and makes sure the bonus points are awarded properly. A good setting would be "10 points every 10 minutes, with 10 bonus points".
Viewers are never notified of gaining points, or if they received extra points. It is up to you to make this logic public or not.
## Rewards and goals
### Rewards tab
The rewards page lets you set up rewards that viewers can redeem and goals for them to contribute towards.
These rewards are currently only visible to you, so you have to take care to inform your viewers that they exist and what they are.
2023-11-12 11:05:04 +00:00
![The loyalty system rewards page](../media/loyalty/reward-overview.png)
2023-04-05 16:04:48 +00:00
You can create rewards by clicking the "Create reward" button, or toggle/edit/delete them with the buttons in the top right of each reward entry.
2023-11-12 11:05:04 +00:00
![The dialog to create and edit rewards](../media/loyalty/redeem-create.png)
2023-04-05 16:04:48 +00:00
Rewards have a multitude of properties but for most people only the ID (used by viewers to redeem them) and name (used by the bot to describe it) are really important, everything else (description/icon) are not exposed to users.
The cooldown property is a per-reward cooldown and not per-user, so claiming a reward will lock it out for that amount of time from anyone.
Rewards can be refunded (see the following section in Points and redeems).
### Goals tab
The goals page works almost exactly to the rewards one, with a few exceptions since goals work a bit differently.
2023-11-12 11:05:04 +00:00
![The loyalty system goals page](../media/loyalty/goal-overview.png)
2023-04-05 16:04:48 +00:00
Goals work by setting a target amount of points to reach. Any viewer can contribute any amount of points to goals at any time (provided they have enough).
2023-11-12 11:05:04 +00:00
![The dialog to create and edit goals](../media/loyalty/goal-dialog.png)
2023-04-05 16:04:48 +00:00
Like in rewards, only the goal ID and name are user facing by default, so fields like icon and description can be omitted.
The target point goal can be modified while a goal is active (even after it's been reached) but this should only be done very carefully.
Unlike rewards, there is no way to refund contributed points to a goal.;
## Points and redeems
### Redeem queue
In the redeem queue page you can check out all pending redeems from viewers.
2023-11-12 11:05:04 +00:00
![The redeem queue page](../media/loyalty/redeem-queue.png)
2023-04-05 16:04:48 +00:00
Redeems can be accepted or refunded. If accepted the redeem simply disappears from the list while a refund will remove the redeem while also giving back the points to the viewer that claimed the reward.
### Manage points
The point management page gives you a full list of everyone who has been assigned loyalty points at any point. You can sort it by name or balance and have full control over anyone's balance!
2023-11-12 11:05:04 +00:00
![The point management page](../media/loyalty/point-list.png)
2023-04-05 16:04:48 +00:00
To edit someone's balance, find the entry in the table (you can use the search field to narrow down results) then click the "Edit" in the far right to open up the dialog to modify their balance, set the new balance then click "Save".
2023-11-12 11:05:04 +00:00
![Dialog to modify someone's point balance](../media/loyalty/edit-balance.png)
2023-04-05 16:04:48 +00:00
If the viewer you're looking for is not in the list, click the "Give points" button instead, then put in their username and wanted balance. If you use this method on a viewer with an existing balance, those points will be added to their existing balance.
2023-11-12 11:05:04 +00:00
![Dialog to give someone points](../media/loyalty/give-points.png)
2023-04-05 16:04:48 +00:00
## Chat commands
When activated, the loyalty system adds a few commands to the chatbot:
#### !redeem
The `!redeem` command lets viewers redeem a reward. The syntax is `!redeem REWARD-ID`.
2023-11-12 11:05:04 +00:00
![Using the !redeem command](../media/loyalty/chat-redeem.png)
2023-04-05 16:04:48 +00:00
If the reward requires viewer info, it becomes `!redeem REWARD-ID extra info here`.
#### !balance
The `!balance` command lets viewers check their current balance.
2023-11-12 11:05:04 +00:00
![Using the !balance command](../media/loyalty/balance.png)
2023-04-05 16:04:48 +00:00
#### !goals
The `!goals` command lets viewers check what goals are currently active.
2023-11-12 11:05:04 +00:00
![Using the !goals command](../media/loyalty/goals-list.png)
2023-04-05 16:04:48 +00:00
#### !contribute
The `!contribute` command lets viewers contribute points to a community goal. This command has one main syntax and several shortcuts.
The main syntax is `!contribute POINTS GOAL-ID`.
2023-11-12 11:05:04 +00:00
![Using the !contribute command with the full syntax](../media/loyalty/contribute-chat.png)
2023-04-05 16:04:48 +00:00
There are several shortcuts for this. You can use `!contribute POINTS` to contribute to the first available goal (since most of the time you're going to have only one goal anyway) or `!contribute GOALID` to contribute 100 points to the specified goal id.
You can combine both by just using `!contribute` to contribute 100 points to the first available goal.
2023-11-12 11:05:04 +00:00
![Using the !contribute shortcuts](../media/loyalty/contribute-shortcut.png)
2023-04-05 16:12:55 +00:00
## External scripts and extensions
Like the rest of strimertül, the loyalty system uses Kilovolt keys for everything:
- Every viewer with points has a balance accessible at [`loyalty/points/<username>`](/api/v31/#loyaltypointsuser)
- All pending redeems are stored as an array at [`loyalty/redeem-queue`](/api/v31/#loyaltyredeem-queue)
- The list of all rewards to redeem can be found at [`loyalty/rewards`](/api/v31/#loyaltyrewards)
- The list of all goals is at [`loyalty/goals`](/api/v31/#loyaltygoals)
- To listen for new redeems, subscribe to [`loyalty/ev/new-redeem`](/api/v31/#loyaltyevnew-redeem)
- To create a new redeem, write to [`loyalty/@create-redeem`](/api/v31/#loyaltycreate-redeem)
- To remove a redeem from the queue, write to [`loyalty/@remove-redeem`](/api/v31/#loyaltyremove-redeem)