Adding Tags to Contacts
-
Hey man,
I’m working my way through your entire plugin it seems.
I’m trying to add tags to users (or assignGroups if you will..)
I noticed in the Contact object (https://github.com/novaksolutions/infusionsoft-php-sdk/blob/master/Infusionsoft/Generated/Contact.php) you have a Groups field.. are we meant to use that to add groups when creating a contact? I tried adding a comma-seperated list of tag ID’s ( ex: ‘1,2,3’ ) but that did not work.
I then found the ContactGroupAssign object (https://github.com/novaksolutions/infusionsoft-php-sdk/blob/master/Infusionsoft/Generated/ContactGroupAssign.php) but when I use this code:
$assign = new Infusionsoft_ContactGroupAssign(); $assign->ContactId = $newContactID; $assign->GroupId = $tagID; $assign->save();
I get this mysterious error:
Fatal error: Uncaught Invalid Field Name: Id thrown in /home/content/r/e/m/remaxbarrie/html/sub-host/zahnd/wp-content/plugins/infusionsoft-sdk/Infusionsoft/Generated/Base.php on line 100
So it looks like there is a mis-match in the allowed field names and the required field names? Or am I doing something wrong here? I can’t seem to find a working example of how to add tag(s) to a contact.
Thanks,
Matt
- The topic ‘Adding Tags to Contacts’ is closed to new replies.