4

I've inherited some code involving InfusionSoft API. I cannot find anywhere in the documentation where they got the name for the field inf_field_Email, or any other field names.

Tried: I've looked through the source code of their API with XML RPC, tried to signup on their forums but I cannot post, and I cant find in the documentation where these field names might be. Is there a list for these field names? Does anyone know where these field names might be?

I can: create a Contact with an email fine, but I can't figure out how to add the LeadSource. Can I use a URL parameter or POST value?

This is doing a cURL call:

    <?php

    // ...

    $postData = array(
        'inf_form_xid' => $this->formId,
        'infusionsoft_version' => $this->version,
        'referrer' => 'https://'. $this->appName . '.infusionsoft.com/app/form/iframe/' . $this->formId,
        'inf_field_Email' => $email, 
        'inf_field_LeadSource' => 'TEST: "LeadSource"',
        'inf_field_Lead_Source' => 'TEST: "Lead_Source"'
    );

In fact, as I look at type this, it almost appears as if the previous person loaded an iframe with a pre-built form and used that to post data. Hmmm.

JREAM
  • 5,741
  • 11
  • 46
  • 84
  • One confusing thing I found is InfusionSoft has two API's. There is an API within the CRM that has an "Encrypted Key" buried hidden in the settings. There is another API which uses Mashery and a different set of API keys. It was not clear to me that this is the situation. I ended up using their PHP API (The XML One). You have to do some custom Queries on tables to get what you want, Ill provide an example in the next comment. – JREAM Dec 02 '14 at 04:45
  • 1
    Getting LeadSource ID's: `$returnFields = array('Id','Name'); $leadSources = $app->dsQuery("LeadSource", 25, 0, array('Id' => '%'), $returnFields);` Saving a new LeadSource and having the new ID: `$conDat = array('Name' => $test); $leadSourceId = $app->dsAdd("LeadSource", $conDat);` – JREAM Dec 02 '14 at 04:46
  • 1
    good you have made that comment, it help me – Ulterior Nov 08 '16 at 19:35
  • @Ulterior Glad to have helped, this drove me nuts a long time ago it was very unclear! – JREAM Nov 09 '16 at 16:04

1 Answers1

4

This code is submitting an Infusionsoft web form. This is not considered Infusionsoft API development and you will not find any documentation on the Infusionsoft API site.

When adding the Lead Source to a web form, Infusionsoft will show a select control with the id/name of "inf_field_LeadSourceId".

In order to add the Lead Source data to Infusionsoft, you will need to update the web form to include the Lead Source field. The web form is most likely in a Campaign Builder Campaign or a legacy web form (if it is really old).

Bradley Ullery
  • 449
  • 3
  • 7
  • Thanks, I ended up using the XML RPC Api. This was too much shinnanigans, and that inf_field_Anything is from the campaign builder you are right TY – JREAM Dec 02 '14 at 04:43