Add Points/Offers for Subscribing to SMS
In this article, you will learn how to automate giving points or offers for subscribing to your text marketing. You will use Spendgo’s Add Rewards API combined with Infobip Moments and Flows.
Things to Know
To add points or offers via Infobip, we require you to enable the Spendgo API and Infobip Flows in your account with your Customer Success Manager.
Create an Infobip Flow with Add Points or Offers
The following steps include sample urls and code snippets. These are not functioning requests, please replace any placeholders with your specific environment and campaign goals.
In you Infobip portal, navigate to Moments / Communications.
Click Create Flow button
Choose + Start from Scratch.
Choose Trigger as the way your audience will enter your flow.
Choose the Change in People Profile trigger.
Define your conditions for the entry point trigger:
Enter in Profile Attribute 1 exactly as text_optin | is | OptedIn.
Click Close at the bottom of the Change in people profile panel.
Click the → right arrow to add an element.
Select the Call API element.
Enter in the Request URL input your url provided by Spendgo.
The URL will be formatted like (your exact URL is provided by Spendgo and must be kept secure and not be shared).
https://webservice.<env_name>.com/v2/loyalty/accounts/rewards?auth=<API_auth_key>Enable escaping of URL parameters (by default this is checked).
Choose the Method as Post.
Choose the Body / Data Format as JSON.
Enter the JSON code in the input field…
To add points, copy paste the following code:
Replace the 50 value in the below sample,
"balance_quantity" : 50
with the point value you want to add to member’s accounts for entering the Flow.CODE{ "event_type": "add", "customers": [ { "phone": "+{msisdn}", "category": "Campaign", "source": "Infobp Flow", "details": "Infobip flow", "balance_quantity": 50 } ] }
To add an offer, copy paste the following code:
First, locate your Campaign Id in the Campaigns / Manage section of the Spendgo Dashboard.
Second, replace the 16774 value in the below sample,
"campaign_id" : "16774"
with the Campaign Id of the offer you are adding to your member’s accounts.CODE{ "event_type": "add", "customers": [ { "phone": "+{msisdn}", "reason": "one-time", "category": "Campaign", "source": "Infobp Flow", "details": "Infobip Flow", "rewards": [ { "campaign_id": "16774", "type": "Offer", "quantity": 1 } ] } ] }
In the JSON code, highlight {msisdn} and click {} in the right corner to personalize with placeholders. Please note, the “+” prefix is required, do not remove.
Search msisdn and select the attribute.
The {msisdn} will change from a regular to bold font style. Click Close.
OPTIONAL STEP Send an SMS notifying your memebr of their added points. If you don’t want to send a message, skip ahead to step #20.
Click the → right arrow of the Call API element to add another element.
Select the Send SMS element.
Select your From number you will be sending the message from.
Enter your message Content.
Click Close at the bottom of the SMS panel.
Name your Flow at the bottom of the flow builder screen.
Click Flow Settings at bottom right of screen.
In the Frequency section, make the Flow reenter disabled so members can only enter the flow once and earn the offer once.
Within Flow Settings, click on Scheduling.
(Optional) Check the option to Run this Flow indefinitely.
If you do not set your flow to run indefinitely, you can also set a start or date time. If no schedule is set, it will default end 90 days after its been launched.Click the Validate button.
Click the Launch Now button.
View Performance
Once launched, when you click to view your Flow, you will not be able to edit its configuration without creating a new version. It will look like the following with the percetages of People who have interacted with the different elements of the Flow.