Add Points/Offer for Texting a Keyword

In this article, you will learn how to automate giving points or offers for texting in a Keyword. You will use Spendgo’s Add Rewards API combined with Infobip Moments and Flows.

Campaign Examples

  • Text CUPCAKE to get a Free Cupcake

    • Promote new menu items for a limited time.

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.

  • Members who first join by texting a keyword – as in, texting the keyword to your number is their first interaction with your program – are also added to the Spendgo system as a Starter member. The member does not have to double opt-in to become a Starter member.

  • You do not have to wait until the member has double opted-in to SMS to add points or offers to their account. However, if you want to target members who are also subscribed to SMS with the points of offer, include the optional step #10 in your flow set up.

  • When adding an offer, first create a Date & Time offer campaign that is targeted to an audience with zero members. This offer will only be issued via the Spendgo Add Rewards API when triggered within the Flow.


Create a Text Keyword to Add Points/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 your 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 Inbound Message trigger.

    Screenshot 2023-10-17 at 3.15.47 PM.png
  6. Open the SMS card to define conditions.

    Screenshot 2023-10-17 at 3.18.02 PM.png
  7. Select your number as the To Recipient.

    Screenshot 2023-10-17 at 3.24.25 PM.png
  8. Define the Condition 1 to be Message body | Matches text | and then enter the exact inbound Keyword to add points when received and click Close.

    Screenshot 2023-10-17 at 3.25.00 PM.png
  9. Click the right arrow to add an element.

    Screenshot 2023-10-17 at 3.59.08 PM.png
  10. optional Step To target text subscribers with the points/offer.

    1. Select the Segment Audience.

      Screenshot 2023-10-17 at 4.09.41 PM.png
    2. Click + Attribute.

      Screenshot 2023-10-17 at 4.13.49 PM.png
    3. Enter the attribute condition text_optin | is | OptedIn and click Close.

      Screenshot 2023-10-17 at 4.14.25 PM.png
    4. Click the right arrow next to your segment condition to add an element.

      Screenshot 2023-10-17 at 4.12.40 PM.png
  11. Select the Call API element.

    Screenshot 2023-08-17 at 10.57.31 AM.png
  12. 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.
  13. Enable escaping of URL parameters (by default this is checked).

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

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

    Screenshot 2023-08-17 at 11.10.06 AM.png
  16. 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}",
                    "reason": "one-time",
                    "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
                        }
                    ]
                }
            ]
        }
        
    3. 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
    4. Search msisdn and select the attribute.

      Screenshot 2024-05-16 at 10.25.34 AM.png


    5. The {msisdn} will change from a regular to bold font style. Click Close.

  17. OPTIONAL Step Send an SMS notifying your member 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
  18. Name your Flow at the bottom of the flow builder screen.

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

    Screenshot 2023-08-17 at 11.35.38 AM.png
  20. 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
  21. Within Flow Settings, click on Scheduling.

    Screenshot 2023-08-17 at 11.42.53 AM.png
  22. (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 end 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
  23. Click the Validate button.

    Screenshot 2023-08-17 at 11.37.05 AM.png
  24. 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. You can hover on any of the metrics to get detailed metrics on how many Members enter and exit each part of the journey. Blow are some common metrics and how to get to them from the above flow: