| title | Point Reward |
|---|---|
| highlights | Follow this guide to setup a "Give 50, Get 50 Points Referral Program" using the SaaSquatch REST API and Squatch.js |
| slug | guides/point-reward |
| sectionType | guide |
| template | article.html |
| date | 2019-11-18 |
squatch.js will show a gorgeously rendered popup in your app so your customers can seamlessly refer their friends.
- Install squatch.js on your page
- Replace the init variables with real user data
- Add a button to your page with
class="squatchpop" - Testing Click the button. Make sure the popup shows. (Make sure you are using the right
account_idanduser_id)
When a referred user converts, typically to paid, notify Referral SaaSquatch so their rewards can be distributed.
- Update the account status for new paid accounts
- Testing Click a referral link and make your first purchase.Login to your SaaSquatch account to check if reward points are being distributed.
When someone wants to redeem their points, adjust their point balance and give them their reward.
- Make sure a user has been identified to Squatch.js before they redeem points
- Lookup remaining points balance on the points redemption page
- Mark points as redeemed by debiting the account's point balance
- TestingRefer a new user who converts, then redeem points on the points redemption page. Your should have been adjusted properly. Login to your SaaSquatch account to see the new referral in the news feed.
If this is the first purchase that a customer has made, use this API call to notify SaaSquatch about the new account status. In particular, make sure to set status: PAID. You should update this status for all accounts. If a valid referral has been made, and someone has paid their first bill, then SaaSquatch will automatically add points to the account of the friend that referred them.
| Example Request | Example Response |
|---|---|
|
|
Lookup a users' points balance by checking the balance of an account. This will include both points from being referred and points from referring friends. It is possible to explore the individual points that has been earned by an account (see List Rewards), but for most cases it is simpler to just lookup the full reward balance.
Looking up the points balance does not change the state of an account, so you can also use this call to display a users' point balance on any page. For example, using the example response below, you could include a message in your app head "You've earned 50 points. Make more referrals to earn more."
| Example Request | Example Response |
|---|---|
|
|
You are responsible for fulfilling the reward you offer through your referral program.
Update the accounts' balance in SaaSquatch once points have been used. This lets SaaSquatch display a users' up-to-date point balance and lets us track points usage.
Use the Debit Account Balance endpoint to mark the points as used.
| Example Request | Example Response |
|---|---|
|
|