Overview
In some cases, you may need to manually update loyalty point balances outside the context of automated rules or spend actions. For example:- Resetting all user balances to zero.
- Crediting or debiting points manually for a specific promotion or adjustment.
Approaches
Admin Dashboard (recommended)
We provide a no-code solution for this via the admin dashboard. Note: this approach supports up to 250,000 balance changes per CSV upload.Steps:
- Go to the admin dashboard: https://admin.snagsolutions.io.
- Navigate to the
Loyalty
page from the left-side menu. - Click
Update Balances
(this opens the modal for updating user balances and provides a CSV template for uploading balance changes). - Download and fill out the CSV template with the relevant balance changes.
- Upload the completed CSV file in the modal.
- Click
Add
to queue the balance changes. A rule will be created to represent the queued changes. If it does not appear immediately, refresh the page. - Verify execution:
- Click the eye icon on the created rule.
- Compare the
Rewards
count to the number of rows in your CSV file. If they match, execution is complete.
API
For programmatic updates, use the endpoint to create a loyalty transaction and update balances.Endpoint:
Request Body:description
: Explanation for the adjustment (e.g., “Reset balances to zero”).loyaltyCurrencyId
: The ID of the loyalty currency to update.entries
: A list of transactions specifying:walletAddress
: The wallet of the user whose balance is being adjusted.direction
: Either credit to add points or debit to remove points.amount
: The number of points to credit or debit.
Steps
- Prepare the JSON payload with your required adjustments.
- Send a POST request to the endpoint with your payload.
- Verify the response to ensure the transaction was processed successfully.
Summary
For flexibility and simplicity:- Use the Admin Dashboard for batch updates and non-technical workflows.
- Use the API for programmatic and highly customized updates.
Point Reset Options
Snag admins have access to a Reset Balances feature, which allows for resetting loyalty balances in different ways. This feature provides three reset options:- Reset all balances
- Reset all user balances to zero
- The currency itself, ledger data and existing rules remain unchanged
- Reset all balances and ledger data
- Resets all user balances to zero and resets the ledger data
- The ledger reset is done by cloning the exisitng currency and all associated rules
- Reset all balances, ledger data and rules
- Reset all user balances to zero
- Clones the currency and deletes all associated rules without recreating them
Important Notes
- This feature is only available to Snag admins. If other users require access to this functionality, they should contact Snag support.
- Resetting balances cannot be undone, so proceed with cauting when using these options.