0

I'm using Infusionsoft's PHP API to add contacts - https://developer.infusionsoft.com/

In addition I'm using this framework for Infusionsoft by Novak: https://github.com/novaksolutions/infusionsoft-php-sdk

$contact = new Infusionsoft_Contact();

$contact->FirstName = $first_name;
$contact->LastName = $last_name;
$contact_name = $first_name . " " . $last_name;
$contact->Email = $email;

$contact->save();

After the contact is added, I'd like to create a task and assign it to the newly created contact and an employee also.

$task_description = "Call this person asap";
$contact_id = $contact->id;
$employee_id = 2496;

I can't find the method in the documentation for doing this. What do I need to do?

cpcdev
  • 1,130
  • 3
  • 18
  • 45

1 Answers1

0

After reading the Infusionsoft Dev Forum, it seems you need to create a ContactAction: see thread here

joeynovak mentions that the field names for the ContactAction table do not necessarily match what you think they will, so see this thread for a good example of the field names here in the first response by MichaelFairchild.

Just for reference, in this thread on the Dev forum you'll find a link to a Table References Diagram where you will see the ContactAction table.

Also, if you run into trouble where you get a note when you are trying to create a task, I found this thread that has a code example from someone using the iSDK.

Lucha Laura Hardie
  • 429
  • 1
  • 3
  • 10