..:: Todd N. Thompson Custom Programming ::..
Home
Contact
Blog
My Top 10 Web Development Projects
Blog Home
October 27, 2009
Authenticate Users and perform actions with InfusionSoft via a link
PHP code:
<?php /* Example URL to this script: http://www.YOURDOMAIN.com/authenticate_user.php?id=12345&e=username@domain.com id= infusionsoft contactId e= email in infusionsoft for the same contact as the id value above FYI - You can re-name this script (authenticate_user.php) to whatever you want. */ // pull string values if(isset($_REQUEST)) {foreach($_REQUEST as $keyg => $valueg) {global ${$keyg};if(!is_array($_REQUEST[$keyg])) {if(get_magic_quotes_gpc()) ${$keyg} = stripslashes($valueg);else ${$keyg} = $valueg; } } } if($id && $e) { // API to pull customer data if available global $app; include_once 'isdk.php'; $app = new iSDK; $app->cfgCon("ifsconnection"); $qry = array('Id'=>$id); //specify return fields - add fields as needed! $ret = array("Id","Email","FirstName","LastName","Phone1","StreetAddress1","StreetAddress2","City","State","Country","PostalCode"); $dups = $app->dsQuery("Contact",1,0,$qry,$ret); if($dups!="" || $dups!=null){foreach ($dups as $item) {}} // Now for the security if($e==$item[Email]){$good=1;} else{ $dups=""; $item=""; $id=""; } // basically clear the data if emails do not match /* build values as follows $item[FirstName]; $item[LastName]; $item[PostalCode]; etc ... for all fields as needed - note auto-filling of input fields below */ } ?>
<? if($good=="1"){ /* Here is where you can execute additional API calls to perform actions: -- add tags, API call to use-> $result = $app->grpAssign((int)$id, (int)$tag); -- remove tags, API call to use-> $result = $app->grpRemove((int)$id, (int)$tag); -- run action sets, API call to use-> $result = $app->runAS((int)$id, (int)$actionSet); -- start follow up sequences API call to use-> $result = $app->campAssign((int)$id, (int)$fups); -- etc In each example API call above, the tag, actionset or follow up sequence ID can be passed to this script as a string value or hard coded. In the examples above the string values are named: tag actionSet fups So, you could link to this page like this: http://www.YOURDOMAIN.com/authenticate_user.php?id=12345&e=username@domain.com&tag=###&actionSet=###&fups=### */ // So .. to add a tag to this contact, do this: $result = $app->grpAssign((int)$id, (int)$tag); // Or to start a message sequence do this $result = $app->campAssign((int)$id, (int)$fups); // etc } ?>
Contact Information
First Name *
Last Name *
Email *
Phone 1 *
Street Address 1 *
Street Address 2
City *
State *
Postal Code *
Tags:
automation
,
infusionsoft
,
tracking
Filed under
Software
by admin
Tell The World!
Permalink
Print
Email
Comment
Edit
Recent Posts
Authenticate Users and perform actions with InfusionSoft via a link
Infusionsoft API Issues
Faber vs Brown 2
What Makes A Site Successful?
Keywords
automation
faber
infusionsoft
mma
perl
php
programming
tracking
wec
Archives
October 2009
June 2009
Syndicate
RSS Feed
Categories
Martial Arts
Software
websites
Earn ad
DOLLARS
, not adCents!
Are You Tired of Earning a Measly few Cents for Vistor Clicks? Let Me Show You How You Can Earn
Insane Profits
on Sales of Products You Offer on Your Sites!
Widget Ads
New Post
New Page
Manage
Comments
Widgets
Settings
Plugins
Dashboard
Logout
Copyright © 2009 Todd N. Thompson All Rights Reserved