Ads by Google

Infusionsoft SDK Additional Functions and Services

In the Additional Functions and Services section of this SDK you will find functions that are not a direct port to an API Method but will make life easier when coding for Infusionsofts API. You will also find methods for the Email Service, Affiliate Service and Service Call Service. This is the main part of the SDK that will grow when updates are released.

Function Description Return Value Arguments
cfgCon Connects you to an infusionsoft application. Boolean 1
infuDate Formats a date string to meet Infusionsofts requirements. Date 1
attachEmail Takes in an email stores and attaches it to a contact. Boolean 13
createEmailTemplate Creates an email template for sending out emails. Integer 10
optIn Opts in an email address marked as non-marketable. Boolean 1/2
optOut Opts out an emails address. Boolean 1/2
sendEmail Sends an email through the application and links the sent email to the given contact. Boolean 9
affClawbacks Return all claw backs in the date range for the specified affiliate. Array 3
affCommissions Return all sale commissions in the date range for the specified affiliate. Array 3
affPayouts Return all payouts in the date range for the specified affiliate. Array 3
affRunningTotals Pulls the running totals for a list of affiliates. Array 1
affSummary Get the summary for a list of affiliates for the specified date range. Array 3
addMoveNotes Adds move notes to existing tickets. Boolean 4
moveTicketStage Moves the stage of a ticket. Boolean 4

cfgCon( [string] Application Handle);
The cfgCon function is mandatory to make a connection between the script and your applications API server. You need to have set up your conn.cfg file first. In conn.cfg you will enter connection details for applications that are delimited with colons(:). The order in which you enter your data is: Application Handle, Application Name, Application type(i/m), API key, Notes

The cfgCon function is boolean so it will return true or false allowing you to determine if you have successfully connected.

infuDate( [string] Date in String Format );
A big question commonly asked prior to this SDK was how to format dates to work with Infusionsoft. To eliminate this question from ever being asked again, infuDate was born. it takes one argument, a string that must be a date in one of these formats

Below is a sample of using infuDate

If infuDate does not accept the date format you need to use or have a need to format the dat yourself, Infusion requires the date to be in YYYYMMDDTHH:MM:SS format. This format can be achieved with date(‘Ymd\TH:i:s’)

attachEmail( [int] contactId, [String] fromName, [String] fromAddress, [String] toAddress, [String] ccAddresses, [String] bccAddresses, [String] contentType, [String] subject, [String] htmlBody, [String] textBody, [String] header, [String] receivedDate, [String] sentDate );
This function takes all the parts of an email and stores them inside Infusionsoft and attaches it to a contacts recent email history.

The function returns a boolean value so if it completes successfully it will return “TRUE”.

createEmailTemplate( [String] templateTitle, [int] userId, [String] fromAddress, [String] toAddress, [String] ccAddresses, [String] bccAddresses, [String] contentType, [String] subject, [String] htmlBody, [String] textBody );
Creates an email template for sending out emails and stores it in Infusionsoft for later use.

Creates an email template for sending out emails and stores it in Infusionsoft for later use.

optIn( [String] Email, [optional String] Reason );
This function takes 1 or 2 arguments. 1- The email you want to opt in. 2- The reason you opted it in. If you exclude argument 2 the reason will default to “API Opt In”. Note that addCon will now automatically run optIn and also has the optional second argument.

optOut( [String] Email, [optional String] Reason );
This function takes 1 or 2 arguments. 1- The email you want to opt out. 2- The reason you opted it out. If you exclude argument 2 the reason will default to “API Opt Out”.

sendEmail( [Int Array] contactList, [String] fromAddress, [String] toAddress, [String] ccAddresses, [String] bccAddresses, [String] contentType, [String] subject, [String] htmlBody, [String] textBody );
This function will send an email out to a list of Infusionsoft contacts. You pass the function an array of contact IDs(integers) and the properties of the email and it will be scheduled to send out inside of Infusionsoft

This function will send an email out to a list of Infusionsoft contacts. You pass the function an array of contact IDs(integers) and the properties of the email and it will be scheduled to send out inside of Infusionsoft

affClawbacks( [int] affiliateId, [Date] filterStartDate, [Date] filterEndDate );
The affClawbacks method is used for obtaining all of an affiliates claw backs within a specified date range.

The above code will return a list of payouts with information about each payout within the month of September 2008.

affCommissions( [int] affiliateId, [Date] filterStartDate, [Date] filterEndDate );
The affCommissions function is used to return all commisions for a specified affiliate within a date range.

The above code will return a list of all sale commissions within the month of September 2008.

affPayouts( [int] affiliateId, [Date] filterStartDate, [Date] filterEndDate );
The affPayouts function is used to return all payouts for a specified affiliate within a date range.

The above code will return a list of all payouts for the specified affiliate in September 2008.

affRunningTotals( [int array] affiliateIds );
The affRunningTotals function is used to return the totals for a list of affiliates. The returned value includes the AffiliateId, AmountEarned, Clawbacks, Payments, and RunningBalance.

affSummary( [int array] affiliateIds, [Date] filterStartDate, [Date] filterEndDate );
The affSummary function is used to return the summary for the list of affiliates in the given date range.

addMoveNotes( [String Array] ticketIds, [String] moveNotes, [int] moveToStageId, [String Array] notifyIds );
The addMoveNotes function will add move notes to the specified tickets.

The function returns a Boolean value to report the status of operation.

moveTicketStage( [int] ticketId, [int] targetStage, [String] moveNotes, [String Array] notifyIds );
The moveTicketStage function will move the stage of a ticket add move notes and notify the listed users.

 

Summary
Infusionsoft SDK Additional Functions and Services
Article Name
Infusionsoft SDK Additional Functions and Services
Description
In the Additional Functions and Services section of this SDK you will find functions that are not a direct port to an API Method but will make life easier when coding for Infusionsofts API.
Author
www.CreativForm.com