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.

  1. In you Infobip portal, navigate to Moments / Communications.

    Screenshot 2023-08-17 at 9.55.06 AM.png
  2. Click Create Flow button

    Screenshot 2023-08-17 at 9.58.54 AM.png
  3. Choose + Start from Scratch.

    Screenshot 2023-08-17 at 9.58.39 AM.png
  4. Choose Trigger as the way your audience will enter your flow.

    Screenshot 2023-08-17 at 10.07.51 AM.png
  5. Choose the Change in People Profile trigger.

    Screenshot 2023-09-08 at 10.54.27 AM.png
  6. Define your conditions for the entry point trigger:

    1. Enter in Profile Attribute 1 exactly as text_optin | is | OptedIn.

      Screenshot 2023-09-12 at 12.30.40 PM.png
  7. Click Close at the bottom of the Change in people profile panel.

    Screenshot 2023-09-12 at 12.31.54 PM.png
  8. Click the right arrow to add an element.

    Screenshot 2023-09-12 at 12.28.17 PM.png
  9. Select the Call API element.

    Screenshot 2023-08-17 at 10.57.31 AM.png
  10. 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>

    Screenshot 2023-08-17 at 11.06.40 AM.png
    This image is only a sample of the Request URL, it does not work.
  11. Enable escaping of URL parameters (by default this is checked).

    Screenshot 2023-08-17 at 11.08.52 AM.png
  12. Choose the Method as Post.

    Screenshot 2023-08-17 at 11.09.51 AM.png
  13. Choose the Body / Data Format as JSON.

    Screenshot 2023-08-17 at 11.10.06 AM.png
  14. Enter the JSON code in the input field…

    1. To add points, copy paste the following code:

      1. 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.

        {
            "event_type": "add",
            "customers": [
                {
                    "phone": "+{msisdn}",
                    "category": "Campaign",
                    "source": "Infobp Flow",
                    "details": "Infobip flow",
                    "balance_quantity": 50
                }
            ]
        }
        
    2. To add an offer, copy paste the following code:

      1. First, locate your Campaign Id in the Campaigns / Manage section of the Spendgo Dashboard.

        image-20230815-080425.png
      2. 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.

        {
            "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
                        }
                    ]
                }
            ]
        }
        
  15. 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.

    Screenshot 2024-05-16 at 5.14.58 PM.png
  16. Search msisdn and select the attribute.

    Screenshot 2024-05-16 at 10.25.34 AM.png
  17. The {msisdn} will change from a regular to bold font style. Click Close.

  18. 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.

    1. Click the right arrow of the Call API element to add another element.

      Screenshot 2023-09-12 at 1.12.03 PM.png
    2. Select the Send SMS element.

      Screenshot 2023-09-12 at 1.11.31 PM.png


    3. Select your From number you will be sending the message from.

      Screenshot 2023-09-12 at 1.13.34 PM.png
    4. Enter your message Content.

      Screenshot 2023-09-12 at 1.14.02 PM.png
    5. Click Close at the bottom of the SMS panel.

      Screenshot 2023-09-12 at 12.31.54 PM.png
  19. Name your Flow at the bottom of the flow builder screen.

    Screenshot 2023-08-17 at 11.30.19 AM.png
  20. Click Flow Settings at bottom right of screen.

    Screenshot 2023-08-17 at 11.35.38 AM.png
  21. In the Frequency section, make the Flow reenter disabled so members can only enter the flow once and earn the offer once.

    Screenshot 2023-09-12 at 12.25.52 PM.png
  22. Within Flow Settings, click on Scheduling.

    Screenshot 2023-08-17 at 11.42.53 AM.png
  23. (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.

    Screenshot 2023-08-17 at 11.39.11 AM.png
  24. Click the Validate button.

    Screenshot 2023-08-17 at 11.37.05 AM.png
  25. Click the Launch Now button.

    Screenshot 2023-09-12 at 12.49.30 PM.png

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.

Screenshot 2023-09-12 at 1.16.52 PM.png