RainMaker has several ways to integrate your website lead forms into RainMaker.  A web form typically collects Names, Email, Addresses (and more) of interested prospects and automatically enters them into RainMaker for you, so you can contact them to get them started.

There are easier ways.  RainMaker has already created full graphical web forms, that you can paste one line of html code into your website and RainMaker will take care of validation, email the lead to the school owner, send a text message with the lead's info to the owner, enter it into RainMaker automatically, send an auto responder, start a RainMaker FLOW and redirect them to a "thank you" page.  If you would prefer that we handle all of it, then go to:  Web Forms Help

If you are a programmer wanting to integrate with RainMaker and you already process the web form (send the info to the owner, start auto-repsonders, etc.), this page is designed to help you.

RainMaker Webform API Instructions

You will need a Web API Key.  Every RainMaker school has a unique key. This key is secret, it should only be shared with your web developer.

To find your API Key, log into RainMaker and go to:

Top Menu > Settings > RainMaker Settings > Api Key

It will look similar to this...

pr-46e149eef5024d1a9e6db8e59a27d78a

But that is not your key!  That is just a sample. :)

The URL that you will use is:

https://addmembers.com/RainMaker/api/

Please notice this is a secure connection.  You must use: https:

You can either POST or GET to this URL.

The following are the expected Fields to pass:

Field Name Required? Description Sample Data
 SID YES RainMake School ID, found on Front Page of RainMaker next to your business name.  1457
 APIKEY YES  Found by going to Settings > RainMaker Settings > Api      Key pr-46e149eef5024d1a9e6db8e59a27d78a
 ACTION YES  Must use the action of "addWebLead". Example: "action=addWebLead" in your querystring. ?action=addWebLead
 FNAME YES  First Name from web form field  Maddox
 LNAME    Last Name from web form field  Smith
 EMAIL    Email Address from web form  MSmith@mailservice.com
 MOBILE    Mobile Phone Number from web form  8135551212
 PHONE    Home Phone Number from web form  8135558800
 TAGS    Comma separated list of tags to add.  Find the list of available tags by going to RainMaker Settings > Tags  Kickboxing,Kickboxing Landingpage,WebSite
 FULLNAME    If you only have one field for the name, use this.  It will auto detect first and lanst name, or just a first name.  "Maddox Sell" or "Maddox"
 AGEGROUP    Look in RainMaker Settings for the exact Age Groups.  The age group field must match exactly.  SEE BELOW FOR EASY ACCESS TO EXACT AGE GROUPS.  "Pre-Schoolers" or "Lil Dragons" or "Adults" etc.
 WEBSITE    The website URL the form is located on.  8135558800
 ADDRESS    The street address  100 S. Main Street
 CITY    The prospect's city  Tampa
 STATE    You guessed it... the State  FL
 ZIP    The Zip or Postal Code  33647
 BENEFITS    Comma separated list of the benefits the prospect is interested in.  Focus,Respect,Fitness,etc.
 INTERESTS    Comma separated list of interests.  Karate,Kickboxing,Self-Defense,etc.
 COMMENTS    Comments associated to this prospect.  Either the prospect commented on this, or you can pass in comments you want to refer to later.  "I'd like more info on your kickboxing program for teens."

Please note: field names were displayed in all caps for clarity.  Field names are NOT case sensitive.

Here is an example way to add a web lead using GET (URL query string parameters):

https://addmembers.com/RainMaker/api/?SID=1457&apikey=pr-46e149eef5024d1a9e6db8e59a27d78a&action=addWebLead&FName=Maddox&LName=Smith&email=msmith@mailservice.com&agegroup=Teens&mobile=8885551212

You can choose to POST the values, or you can add the values as a GET in the query string.

 

Using PHP to Process?

PHP Example for you:

 

<?php
/* RainMaker Software Process Web Lead PHP Sample Script Created By Ron Sell Version 1.1 3/19/2014 */ /* Assign the variables below with the fields from web form */ $RM_SID = "1437"; $RM_APIKEY = "pr-46e149eef5024d1a9e6db8e59a27d78a";
$RM_ACTION = "addWebLead"; $RM_FNAME = "Maddox"; $RM_LNAME = "Smith"; $RM_EMAIL = "MSmith@mailservice.com"; $RM_PHONE = "8135551212"; $RM_MOBILE = "8135551212"; /* THE VARIABLES ARE ABOVE THIS LINE ONLY */ function get_data($url) { $ch = curl_init(); $timeout = 5; curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout); $data = curl_exec($ch); curl_close($ch); return $data; } $RM_URL = "https://addmembers.com/RainMaker/api/?"; $postURL = $RM_URL . "action=" . $RM_ACTION . "&SID=" . $RM_SID . "&apikey=" . $RM_APIKEY . "&fname=" . $RM_FNAME; $postURL .= "&lname=" . $RM_LNAME . "&email=" . $RM_EMAIL . "&phone=" . $RM_PHONE . "&mobile=" . $RM_MOBILE; $returned_content = get_data($postURL); /* echo $returned_content; */ $jsonIterator = new RecursiveIteratorIterator( new RecursiveArrayIterator(json_decode($returned_content, TRUE)), RecursiveIteratorIterator::SELF_FIRST); foreach ($jsonIterator as $key => $val) { $result; $error = "none"; $contactId = "not found"; if($key=="result") { $result = $val; } if($key=="error") { $error = $val; } if($key=="contactId") { $contactId = $val; } } /* The three variables contain the JSON response. You can comment out the echo statements below, or you can use the variables to determine what to do nextSibling */ echo "Result: " . $result . "<br>"; /* will be either "success" or "error" */ echo "Error: " . $error . "<br>"; /* will be either blank or a description of the error */ echo "contact ID: " . $contactId . "<br>"; /* will be either blank if error or contain the RM Contact ID */

?>

Using ASP.NET?

VB.NET

Imports System.IO
Imports System.Net

Dim postData As String = "apikey=pr-46e149eef5024d1a9e6db8e59a27d78a&action=addWebLead&FName=Maddox"
postData += "&LName=Smith&email=msmith@mailservice.com&agegroup=Teens&mobile=8885551212"
Dim myURL As String = "https://addmembers.com/RainMaker/api/?" Dim myWebClient As New WebClient() Dim stream = myWebClient.OpenRead(myURL) Dim response As String = myWebClient.ReadToEnd() 'The variable "response" will have the JSON results if you want to parse it.


C#
using System.IO;
using System.Net;

String postData = "apikey=pr-46e149eef5024d1a9e6db8e59a27d78a&action=addWebLead&FName=Maddox"
postData += "&LName=Smith&email=msmith@mailservice.com&agegroup=Teens&mobile=8885551212";

String URI = "https://addmembers.com/RainMaker/api/?" + postData;

WebClient webClient = new WebClient(); Stream stream = webClient.OpenRead(URI); String request = reader.ReadToEnd();

//The variable "request" will have the JSON results if you want to parse it.

Get Age Groups through the API

You can go to the following link to get the exact age groups for your school.  Substitute your SID (RainMaker School ID), api key is not required.

https://addmembers.com/RainMaker/api/?SID=1457&action=GetAgeGroups

You will get a JSON response similar to this:

{"AgeGroups": "Little Tigers,Kids,Teens,Adults"}

When you post to the API the AgeGroup field, we are expecting one of the Age groups. Example: agegroup=Little Tigers

 

 

 

Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.