What is the purpose of the GroupAssign table?

Hi,

I’m looking for a way to retrieve a list of tags through the api, that I can use in a dropdown to ultimately create a subset of contacts to send a message to.

I understand that tags are stored in the ContactGroup table, but can anyone tell me what the GroupAssign table is used for and whether I would use the GroupAssign or the ContactGroupAssign table to build the subset list of contacts I need?

Debbie

@Deborah_Figg, the GroupAssign is specific to groups that are used to categorize teams of Users (not related to contacts). The ContactGroupAssign would be the table you are looking to read. It will contain one contact record PER tag assigned to that contact. If you want to find all contacts with a given tag then query for the tag id. If you want to find all tags on a given contact then query for the contact id.

@Chad_DeLaura

That’s what I needed. Thanks.

Just to clarify, by users, do you mean members who have access to administer an Infusionsoft account?

One more question: If I wanted to add a field to store a new piece of data against a contact, which is associated with a certain tag, which table/row would I add that to?

Debbie

@Deborah_Figg, by users we are referring to infusionsoft users that can (but don’t necessarily) have admin privileges. Chad and I are users on our Infusionsoft app but our clients/customers are contacts.

You can edit custom fields using the DataFormField table but to create a new custom field you will have to use the addCustomField method in the Data service of the API.

@John_Borelli

OK, that’s clear. Thanks.

Re. the new field, if I create a field called new_field associated with a contact, am I right that I use the addCustomField method in PHP and Contact as the customFieldType?

Once I’ve added the field, can I just pass the new data whenever I create/update a contact and is it automatically returned whenever I retrieve a contact record or do I have to do something special to create, update or retrieve it?

Debbie

@Deborah_Figg,

You have the custom field type part right but custom fields are not “created on a contact” they are just created and then every contact has it weather or not it has information in it. You can update that field using the DataFormField table or by adding that as a contact update but you must add an underscore before it to identify it as a custom field. Also, the field name will be specific to what the database name is and there is a link in the custom fields list in IS that will tell you this. It can end in a zero or one and so on depending on how many times it has been deleted and created.

@John_Borelli

Ah, I understand. Thanks.

Debbie

@Deborah_Figg, if you need further help with the API tables, take a look at this API Table References diagram. Hopefully it will make things a bit more clearer.

If you need more information about creating a custom field this goes over how to do it and how to get each parameter: Creating Custom Fields Via the API