Add Points/Offer for a Custom Event

In this article, you will learn how to automate giving points or an offer to members based on custom events in your application. Custom events such as a button click, form submissions, items added, carts abandoned, and more, provide a flexible way to track and incentivize user actions.

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

  • You will require a Mobile app integration with Spendgo and Infobip. Please contact your Customer Success Team for details.

  • Your app must be configured to send the custom events that are mapped to a defined custom even in your Infobip portal.

  • A unique Add Points/Offers URL will be securely provided to you by a Spendgo Integrations Specialist. This URL is used in combination with your parameters on what offer or how many points is to be added to the member’s account based on the use case. The URL is account specific, it can be used in multiple Communication Flows. If you manage mutliple brands, it cannot be used cross-brands.

  • To add points or offers, the user must already have a Spendgo account or create one. Once the member successfully logs in, this associates the member with the specific mobile app install (and Push Id) and then can be given points/offers.

Create an Infobip Flow to Add Points on App Installs by Members

Before You Start

  • When adding an offer, you must have the Campaign Id for the offer you will be giving out. You can find the Campaign Id in the Campaigns / Manage section of the Spendgo Dashboard. You don’t need this if you are just adding points.

    image-20230815-080425.png
  • You must also have your Add Points/Offers URL. If you do not have this or have misplaced it, please send an approved request to your Customer Success Team for a new one.

  • Before events are sent, define your custom event in your Infobip portal. Your mobile app developer will use the naming details defined in your event to map the data.


  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 your Trigger to be a People Real-Time Event.

  6. Define your People Real-Time Event Condition 1 to filter for when YOUR CUSTOM EVENT NAME | happened.
    This looks for each time the specific custom event you created is sent from your app.

  7. Click Close to close the trigger settings.

  8. Click the → right arrow to add an element.

    Screenshot 2023-08-17 at 10.24.27 AM.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:
      IMPORTANT: please 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": "Infobip Flow",
                  "details": "Infobip Flow",
                  "balance_quantity": 50
              }
          ]
      }
      
    2. To add offers, copy paste the following code:
      IMPORTANT: please replace the 16774 value in the below sample, "campaign_id" : "16774" with the Campaign Id you retrieved from the Spendgo Dashboard.

      {
          "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. Name your Flow at the bottom of your 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. Add Condition to the Entry Limitations.

    Screenshot 2023-08-17 at 11.33.05 AM.png
  21. Enter your Entry Limitation Condition.

    Screenshot 2023-08-17 at 11.36.22 AM.png
    Example: A person can enter this Flow 1 times in a lifetime.


  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-11-27 at 11.34.04 AM.png