The isdnAPI class is designed to mimic, as closely as possible, the API calls exposed by InfusionSoft. If you are making a direct comparison between the API methods and isdnAPI, you'll find that the string value Key is dropped from the first parameter on each method. 

Contact Service

ContactService is used to manage contacts. You can add, update and find contacts in addition to managing follow up sequences, tags and action sets.

Core methods

  • add() - Creates a new contact using an associative array with all data to be added to the record. Duplicates are allowed, so make sure to check if a contact exists and use update() if you don’t want duplicate records. findByEmail() is a good way to check if a contact exists. After you add a contact make sure to opt them in using APIEmailService.optIn() so you’ll be able to send them email.
    Int32 add(XmlRpcStruct cMap)
  • update() - Coming soon. Use dsUpdate() instead for now.
  • findByEmail() - Finds all contacts with the supplied email address in any of the three contact record email addresses. It’s a good practice to use findByEmail() before add() so that you don’t get duplicate records.
    XmlRpcStruct[] findByEmail(string email, string[] returnFields)
  • load() - Loads up an XmlRpcStructure with the selected fields from a given contact record
    XmlRpcStruct load(int Id, string[] selectedFields)

Follow up sequence methods

  • addToCampaign() - Adds a contact to a follow-up sequence (campaigns were the original name of follow up sequences). The Id is available in Infusionsoft, it’s the first column when you’re browsing follow-up sequences. Follow up sequences (and their Ids) are also available through the DataService class.
    bool addToCampaign(int contactId, int campaignId)
  • getnextCampaignStep() - Gets the next campaign (Follow up sequence) step ID for a given contact and campaign.
    int getNextCampaignStep(int contactId, int campaignId)
  • pauseCampaign() - Pauses a given follow-up sequence for a given contact
    bool pauseCampaign(int contactId, int campaignId)
  • removeFromCampaign() - Removes a given follow-up sequence from a given contact
    bool removeFromCampaign(int contactId, int campaignId)
  • resumeCampaign() - (resumeCampaignForContact() in API, will fix in next release) Resumes a follow-up sequence that has been stopped/paused for a given contact
    bool resumeFromCampaign(int contactId, int campaignId)
  • rescheduleCampaignStep() - Immediately performs the given follow-up sequence stepId for the given contacts. Finding the follow-up sequence stepId is tricky currently, it’s only available by looking at the status bar when you mouse over follow up sequence steps in the CRM. You should see something like editStep(int) where int is an integer–that integer is your campaignStepId. Follow-up sequence steps are also available through the DataService class.
    int rescheduleCampaignStep(Array contactIds, int campaignStepId)

Tag methods

  • addToGroup() - Adds a tag to a contact (groups were the original name of tags). The groupId is available in the CRM, it’s the first column when you’re browsing tags. Tags (and their Ids) are also accessable through the DataService class.
    bool addToGroup(int contactId, int groupId)
  • removeFromGroup() - Removes a tag from a contact (groups were the original name of tags). The groupId is available in the CRM, it’s the first column when you’re browsing tags. Tags (and their Ids) are also accessable through the DataService class.
    bool removeFromGroup(int contactId, int groupId)

Action set methods

  • runActionSequence() - Coming Soon!

Data Service

Core Methods

  • dsAdd() - Adds a record to the specified table in Infusionsoft.
    Int32 dsAdd(string table, XmlRpcStruct values)
  • dsLoad() - Loads a struct with data from the given contact record
    XmlRpcStruct dsLoad(string table, int Id, string[] fields)
  • dsUpdate() - Updates the specified record (indicated by ID) with the data provided.
    Int32 dsUpdate(string table, Int32 Id, XmlRpcStruct fields)
  • dsDelete() - Deletes the specified record from the database
    Boolean dsDelete(string table, Int32 Id)

Query Methods

  • dsFindByField() - This will locate all records in a given table that match the criteria for a given field.
    XmlRpcStruct[] dsFindByField(string table, Int32 limit, Int32 page, string fieldName, string fieldValue, string[] selectedFields)
  • dsQuery() - Queries records in a given table to find matches on certain fields
    XmlRpcStruct[] dsQuery(string table, Int32 limit, Int32 page, XmlRpcStruct queryData, string[] selectedFields)

Miscellaneous Methods

  • dsAddCustomField() - Allows for the creation of new custom fields. context choices:Person, Company, Affiliate, Task/Appt/Note, Order, Subscription, or Opportunity.  dataType choices: What type of field this will be. Text, Dropdown, TextArea, etc.
    Int32 dsAddCustomField(string context, string displayName, string dataType, Int32 groupId)
  • dsAuthenticateUser() - This method allows you to pass a username and an md5 hash of a password to Infusionsoft. If the credentials match it will return back a User ID, if the credentials do not match it will send back an error message.
    Int32 dsAuthenticateUser(string username, string passwordHash)
  • dsGetAppSetting() - This method will return back data from an application setting, for instance, person types.
    string dsGetAppSetting(string module, string setting)
  • dsGetTemporaryKey() - Returns a temporary API key if given a valid Vendor key and user credentials. The temporary key is generally only good for one hour, but it may vary depending on which vendorkey was provided.
    string dsGetTemporaryKey(string username, string passwordHash)
  • dsUpdateCustomField() - Updates a custom field. Every field can have it’s display name and group id changed, but only certain data types will allow you to change values
    Boolean dsUpdateCustomField(Int32 customFieldId, XmlRpcStruct values)

API Email Service

API Affiliate Service

Invoice Service

Last edited Dec 16, 2010 at 7:42 AM by mjg, version 3


No comments yet.