Author: pbrocks

  • How To Create Automated, Signed, Infusionsoft Contracts

    Send out a contract for e-signature automatically that includes merged information from an Infusionsoft contact record and get the signed PDF back into Infusionsoft without lifting a finger. This was originally presented in an API Guys Mastermind webinar with Lisa Macqueen, of Cleancorp, on May 13, 2014. Lisa and Hamish Macqueen commissioned this project and are gifting the code and instructions with the Infusionsoftcommunity.

  • Getting Started With The Infusionsoft API: The Missing Setup Guide

    There is a reason the app of every single Infusionsoft Ultimate Marketer winner is filled with API scripts. With the API … if you can dream it, you can do it.

    But let’s be honest. It can also be a little intimidating if you are not a programmer.

    But, if you aren’t looking for a short cut and really do want instructions on how to find and install the Infusionsoft SDK, here you go … let us know if we can help.

    [wc_box color=”go” text_align=”left”]
    We can save you timeUPDATE: Since this guide was originally published, Infusionsoft has deprecated the version of the API covered in this tutorial. Because the old version is so much easier to set up, for a beginner, I have linked to https://github.com/ksnider/iSDK, in my Github account, so you can still use it. That said, if you are doing serious Infusionsoft development, and you want to future proof the application you are building, you should really use the new SDK, which can be found at http://developer.infusionsoft.com Disreagard mentions of Infusionsoft’s Github account and use my archived copy instead. -KIM (May 26, 2015).

    [/wc_box]

    VIDEO SUMMARY

    How to set-up your system in order to use the InfusionSoft API.

    Here are the steps:

    Step 1 – Download the iSDK

    • Get the Infusionsoft API PHP SDK from Github
    • Hit the Download ZIP button in the right sidebar
    • Download the SDK from Github

    Step 2 – Get Your API Key

    • In the main menu of your InfusionSoft application, choose Admin -> Settings
    • Click Application on the left menu and scroll down near the bottom of the page. There you will see the encrypted key
    • Consult the Infusionsoft User Guide for more information on setting up your Infusionsoft API Key

    How To Find Your Infusionsoft API Key

    [wc_box color=”go” text_align=”left”]
    Tip for newcomersTIP FOR NEWCOMERS: If you don’t have a key yet, you have to type in a phrase to act as the seed for the key and the key will automatically be generated. It doesn’t matter what phrase you use and you don’t need to remember it for future
    [/wc_box]

    Step 3 – Edit the conn.cnfg.php file

    • Unzip the downloaded file from Step 1
    • Open the src folder
    • Delete the phpinfo.php file
    • Open the conn.cfg.php file using any text editor. It will look like this:
    • [php]
      <?php
      $connInfo = array(‘connectionName:applicationName:i:APIKEYGOESHERE:This is
      the connection for applicationName.infusionsoft.com’);
      ?>
      [/php]

    • Change “connectionName” to your Infusionsoft application name
    • Also change both instances of “applicationName” to the Infusionsoft application name
    • Change “APIKEYGOESHERE” to your Infusionsoft API Key from Step 2
    • See tips below for help finding these values
    • Make sure you don’t inadvertently add any spaces or it won’t work

    [wc_box color=”go” text_align=”left”]
    Tip for newcomersTIP FOR NEWCOMERS: If you look at the URL when you are in your application, the app name is the portion of the URL that comes before “.infusionsoft.com”. So, for example, if my URL says hgy222.infusionsoft.com, hgy222 is the application name.
    [/wc_box]

    How To Find Your Infusionsoft Application Name

    [wc_box color=”go” text_align=”left”]
    Tip for Infusionsoft API code newcomersTOOLS: To get started, you can use either Notepad on Windows or TextEdit on Mac to edit your scripts. Turns out there is a trick to saving as a php file in TextEdit … you have to go to Format in the drop-down menu and choose “Change To Plain Text”. Then it will let you save with .php extension. Similarly, in Notepad, you have to set the “Save As Type” to All Files. If you do a lot of script-writing, you may decide to download a free code editor that is specifically suited for that purpose.
    [/wc_box]

    When complete, your conn.cnfg.php should look something like this:

    Infusionsoft API configuration to get started

    Step 4 – Set-up FTP

    • For the host field we use the name of your FTP server
    • Username is the FTP username
    • Password is your FTP account password
    • You can leave port blank or use the port given in your server documentation
    • Hit Connect

    [wc_box color=”go” text_align=”left”]
    Tip for Infusionsoft API code newcomersTOOLS: If you don’t already have a favorite FTP client, I recommend Filezilla because it’s free and available for both Mac and Windows. I do not recommend using File Manager in cPanel. Too clunky and not enough information about the progress of your uploads, etc.
    [/wc_box]

    Configure FTP to upload Infusionsoft API scripts to your server

    [wc_box color=”go” text_align=”left”]
    Tip for newcomersTIP FOR NEWCOMERS: If you are unsure of any of these values, they should have been sent to you when you created your website hosting account.
    [/wc_box]

    Step 5 – Copy files to the server

    • Create a folder, in the root directory of your website, called “scripts”
    • Copy the xmlprc folder, isdk.php, infusionsoft.pem and conn.cfg.php to the scripts folder
    • Put the Infusionsoft SDK in your scripts folder

      Whoo hoo! Your server should now be set up for using the Infusionsoft API.

      Step 6 – Test it, to make sure everything works properly

    • In your text editor, create a new file and copy the following:
    • [php]
      <?php
      echo "Hello World! <br/>";
      require_once("isdk.php");
      $app = new iSDK;
      // Test Connnection
      if ($app->cfgCon("yourConnectionName"))
      {
      echo "Yabba Dabba Doo! You Are Connected To Infusionsoft …";
      }
      else
      {
      echo "Not Connected…";
      }
      ?>
      [/php]

    • Change “yourConnectionName”, on line 6, to your App Name (e.g. hff89622)
    • Save the file, in your scripts folder, as test.php
    • Go to your browser and enter the url of the file, for example http://yourwebsite.com/scripts/test.php and hit enter
    • If everything is working correctly, you should see the words “Hello World!” followed by “Yabba Dabba Doo! You Are Connected To Infusionsoft …”.

    Step 7 – That’s it!

    You are set up and ready to start rockin’ the Infusionsoft API.

    If you have any problems or questions, please go to our API Learners Facebook Group. Or, if it worked perfectly, let us know that too so we can give you a high five!

    Ready to take it a step further?

    Check out our free 80/20 PHP class and all of the free Infusionsoft code samples in the Learning Center.

  • Infusionsoft API Mastermind – Appointment Bliss

    Infusionsoft API Mastermind – Appointment Bliss

    This Week’s Mastermind Project: Appointment Bliss
    This week, we will show you how we integrated My Day (Infusionsoft Calendar), Campaign Builder, Google Calendar, Time Trade, Time Fusion and TelAPI to:

    1. Enter an appointment once in Infusionsoft and never touch it again
    2. Do a two-way sync between Time Trade and My Day (Infusionsoft Calendar)
    3. Send reminder emails from campaign builder using exposed appointment info
    4. Send automated text reminders for $1 a month and a penny per text
    5. Have your clients schedule, reschedule and cancel online

     

  • Infusionsoft API Mastermind – Integration of Google, Teamwork PM, Harvest Quickbooks and Infusionsoft

    Attend the Infusionsoft Mastermind at noon on Thursdays. Then attend our Infusionsoft API Mastermind at 4:30 EDT to see what Infusionsoft-on-steroids looks like!Each week, I present one showcase project that will:

    • spark your imagination,
    • let you see how to overcome Infusionsoft limitations,
    • automate in ways you never thought possible, and
    • leave your competition wondering what the heck just happened!

    ** Make your projects glide effortlessly, from start to finish, without lifting a finger **

    This week, you will see how we integrated Google Mail, Google Contacts, Infusionsoft Opportunities, Teamwork Project Management and Harvest Time Tracking.

    No code! Just the big picture concept.

    Even if you don’t manage projects, I promise I will open your eyes to more possibilities than you ever dreamed Infusionsoft had.

    Download the handout

  • Webinar Archive: Redirecting and Customizing Based on Actions of Contact

    Redirecting and Customizing Based on Actions of Contact

    This webinar shows three different ways we can customize the Infusionsoftcontact’s experience, using some simple code and the Infusionsoft API, by redirecting and or customizing based on their actions.

    Actions which you might use to base customizations on:

    • Which product did they purchase?
    • How many times have they purchased previously?
    • Do they want subscription or one-time purchase?
    • How did they answer a survey or question on a web form?
    • Where did they come from?
    • What is the lead source?
    • Were they a referral?

    Pages or forms you might want to customize:

    • Landing pages
    • Pre-order forms
    • Pre-populated shopping cart items
    • Order forms
    • Thank you pages

    Two ways from most basic to most sophisticated

    • Create different pages/web forms/order forms, with different content for each scenario, and use php redirect to send them to the correct one using either IF statements or SWITCH
    • Create  a single destination page and change up the content based on the scenario – you can get much more creative with this one

    Download the handout | Take the survey 

  • Webinar Archive: The Power of Loops

    How To Loop-De-Loop Through Your Contacts, Or Orders, Or Opportunities, Or ….

    This webinar covers:

    • What are the different types of loops in PHP
    • When do you use one over the other
    • What types of things do loops make possible with the API?
    • Explanation of 80/20 Programming
    • Free Introduction to 80/20 Programming With PHP Course

    Download the handout | Take the survey

  • What Can The API Do – Give a new member access to an iPhone app

    Who Knew? 97 Ways To Extend Infusionsoft With The API

    REAL-LIFE PROJECT: Give a new member access to an iPhone app

    This project demonstrates:

    • Calling a script from an http post snippet in Campaign Builder
    • Pulling contact info from Infusionsoft for use elsewhere in your script
    • Writing data to an external mySQL database
    • The “dangit method” of writing code

    Download the handout | Take the survey – Setup Guide is on the Thank You page

  • What Can The API Do – Dates, Counters and Running Totals to Time Touches

    Who Knew? 97 Ways To Extend Infusionsoft With The API

    REAL-LIFE PROJECT: RFM Analysis – Using Dates, Counters and Running Totals to Time Touches

    This project demonstrates:

    • Writing a date or time to a custom field (Recency)
    • Determining time elapsed between two dates/times (Recency)
    • Incrementing a counter in a custom field (Frequency)
    • Adding most recent purchase amount to the previous total in a custom field (Monetary)/li>
    • That if I can do it … you can do it!

    Download the handout | Take the survey 

  • What Can You Do With the API – Run an Ongoing Webinar Series

    Fun With Dates – How To Run an Ongoing Webinar Series

    This project demonstrates:

    • How to loop through an Event Sequence multiple times
    • Working with dates in PHP (something we do A LOT!)
    • Using the API Goal in Campaign Builder
    • Writing to a mySQL database
    • Using cron to send an email when the field timer can’t/won’t
    • Security issues when using a third party app to do this for you

    Download the handout | Take the survey

  • Introduction to PHP

    Introduction To PHP and the Infusionsoft API


    This session covered:

    • An overview of the 80/20 Programming Concept
    • The most relevant characteristics of PHP, for our purposes
    • The structure of a PHP script
    • The closing PHP tag – why is it sometimes omitted
    • Variables
    • How to output results using print, echo, print_r and fwrite

    Download the handout | Give me feedback