Retention Rocket

Form Campaign API And Custom Integration

Form Builder Campaign

This document describes how to integrate customer details with Retention Rocket. A Form Builder campaign is used to collect customer information. It can be in the form of a Retention Rocket hosted landing page, a custom form you build, or submitted as a HTTP POST request using a HTTP REST client or AJAX .

To enable this integration, you'll first need to create a Form Builder campaign in your Retention Rocket admin, then note the resulting shop_id and campaign_id from the bottom of the form campaign page after saving.

Example Form Builder Admin

URL for REST, AJAX or Form submit:

POST https://api-prod.retentionrock.com/rocketsdk/form_submit.json
Form BODY parameters
Name Required Example
shop_id required 14
campaign_id required 51
phone_number required 8585551234
sms_optin optional true
email optional dexter@homey.org
first_name optional Dexter
last_name optional Rocketman
tags[] optional tag1
tags[] optional tag2
metadata[][account_id] optional XXX-KeyToYourSystem-YYY
metadata[][account_balance] optional 3014.14
Note: you may assign as many tags and metadata key/values are needed, althogh none are required
Example x-www-form-urlencoded REST Request
curl -X "POST" "https://api-prod.retentionrock.com/rocketsdk/form_submit.json" \
     -H 'Content-Type: application/x-www-form-urlencoded; charset=utf-8' \
     --data-urlencode "shop_id=2" \
     --data-urlencode "campaign_id=8" \
     --data-urlencode "phone_number=8583829141" \
     --data-urlencode "tags[]=VIP,Male" \
     --data-urlencode "metadata[][account_id]=XXX_YOUR_SYSTEM_ID_YYY" \
     --data-urlencode "metadata[][account_balance]=1314114" \
     --data-urlencode "metadata[][profile_url]=https://yoursite.com/uniquelink"
Example JSON REST Request
curl -X "POST" "https://api-prod.retentionrock.com/rocketsdk/form_submit.json" \
     -H 'Content-Type: application/json; charset=utf-8' \
     -d $'{
  "metadata": [
    {
      "account_id": "XXX_YOUR_SYSTEM_ID_YYY",
	  "account_balance" : "1314114"
    }
  ],
  "campaign_id": "8",
  "phone_number": "8583829141",
  "tags[]": "Female",
  "shop_id": "2"
}'
							
Example Response
{ status: 'success' }
Example Form