A colleague was having trouble getting Infusionsoft Contact Notes using the NovakSolutions PHP SDK. He’s one hell of a good developer so I thought if he’s having trouble understanding the SDK and getting the contact notes, there’s also a lot of developers out there who would be having the same issues! Hence, this post. 🙂
Of course, like what any good Geekysaur would do, we experiment! This assumes that you already know, have been using, or at least installed NovakSolutions’ IFS PHP SDK. After a bit of experimentation, we found out that you need to do the following:
1 2 3 4 5 6 7 |
// We know how to get the contact record so let's do that. $contacts = $IFS->query( new \Infusionsoft_Contact(), array( 'Email' => 'foo@bar.com' ) ); // Remember, the result set for contacts is an array! Now, let's search for the notes! // All we have to do is use the same query format as above, but search on the // ContactAction object. $notes = $IFS->query( new \Infusionsoft_ContactAction(), array( 'ContactId' => $contacts[0]->Id ) ); |
That’s it! Confusing at first but easy enough right!
How did you go? Did this help you? Do you have a better or cleaner way of doing this? Hit us up in the comments section!
Works! Thanks!
Glad to know it worked for you!