Skip to main content
Skip table of contents

Add Points/Offers to a Facebook Form

Facebook Forms are a great way to acquire and build your audience. Now, you can In this article you will learn how to connect your Facebook Account to Infobip, Create a Form, and give an offer to members who complete a Facebook Form.

Example implementations

  • Give an offer for joining text offers.

  • Give a free online offer for joining

Before You Start

Define Your Strategy

Whether you’re trying to increase sign ups, build your test

Create Your Facebook Form

When creating your Facebook Form, take into consideration the following Spendgo member requirements when defining your fields to be collected

  • A mobile phone number is the mininum requirement to create a Starter member.

Connect your Facebook Account

Connect your Facebook business account and define your processing rules in your Infobip environment.

  • A successful connection will…

    • show Lead Ads Facebook forms listed in the Infobip Form template builder.

    • allow you to define your processing rules and field mappings so new Leads will be created in Infobip as soon as the Facebook form is submitted. You must establish a successful connection before setting your processing rules and field mappings.

Things to Know

  • Both active or archived forms may be visible depending on the forms you have configured in Facebook. Archived forms cannot be selected for edits in Infobip. Ensure your forms are active before setting up integrations and mappings.

  • Regularly check for any updates in both Infobip and Facebook integration settings to maintain a seamless connection.

  • Continuously monitor the new leads created in Infobip to ensure that the data mapping and processing rules are functioning as expected.


Step 1: Connect Your Facebook Account

To integrate your Facebook business account with your Infobip environment and define your processing rules, follow these steps:

  1. Log in your Infobip account and navigate to Exchange / All Apps.

  2. Search for Facebook Leads for People and click on the module.

    When you have not connected your app, the bottom status reads, “FREE”.

  3. Click Add.

  4. Confirm you want to add the app by clicking Add App.

  5. Click Connect Account.

  6. Click Connect With Facebook.

  7. A Facebook window will open. Follow the onscreen instruction to login and configure the account connection.

  8. Once the connnection is established you will see a success message that your Facebook account has been connected to Infobip Forms.

    If you go to Exchange / My Apps you will also see the Facebook Leads for People module status is now Added.


Step 2: Create New Facebook Form

  1. In Infobip, go to Content / Forms.

  2. Click Create New / Facebook form

  3. Select the three dot menu on the existing form template and click Use Form.

  4. Map the fields from the Facebook form to the corresponding fields in Infobip. This ensures that the data from the form submissions are correctly transferred. If your field does not exist in Infobip, create the Custom Person Attribute and then return to form for mapping.

  5. Enable Data Processing rule to Create or Update Persons.

  6. Set the Lead and Customer Update to be one of the following options:

    1. Add only new information

    2. Override existing information

    3. Do not update existing persons

  7. Click Activate to launch your new form.

  8. Conduct a test submission to ensure that the data flows correctly from Facebook to Infobip.


Step 3: Create a Flow to Add Points/Offer on Form Submit

Use the following flow as an example on how to add points/offer to a member’s account on their Facebook Form submission. You may want to add additional steps based on your Form objectives.

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

  2. Click Create Flow button

  3. Choose + Start from Scratch.

  4. Choose Trigger as the way your audience will enter your flow.

  5. Choose your Trigger to be a People Real-Time Event.

  6. Define your People Real-Time Event Condition 1 to filter for when Form Submitted | happened | more or equal to | 1 times | any time
    This looks for each time a member a form at any time.

  7. Add a + Property

  8. Select your specific Facebook Form. Form | is | Select your Form Name.

  9. Click Close to close the trigger settings.

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

  11. Select the Call API element.

  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>

  13. Enable escaping of URL parameters (by default this is checked).

  14. Choose the Method as Post.

  15. Choose the Body / Data Format as JSON.

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

      CODE
      {
          "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.

      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
                      }
                  ]
              }
          ]
      }
  17. 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.

  18. Search msisdn and select the attribute.

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

  20. Name your Flow at the bottom of your screen.

  21. Click Flow Settings at bottom right of screen.

  22. Add Condition to the Entry Limitations.

  23. Enter your Entry Limitation Condition.
    This limits how many times a person can submit a form and earn the offer/points.

  24. Click the Validate button.

  25. Click the Launch Now button.


JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.