Python - Add Contact

Hi I’m trying to add a contact by python SDK,

This is my code:
contact = {‘Company’ :“TESTcOMPANY”,‘FirstName’: ‘FirstName’, ‘LastName’ : ‘LastName’, ‘Email’ : ‘Email@gmail.com’,‘Phone1’ :‘Phone1’}
infusionsoft.ContactService(‘add’, contact)

All the data is added but the company name no? I don’t understand why

And I will be happy to know if I can tag this contact.

Many thanks!

Is it the Company Name field on a Contact, or the Company object relationship that isn’t getting added? That should be populating the former.

company name field on a Contact

That’s the correct reference for that field in the XML-RPC API ContactService, so I’m somewhat at a loss as to how it would not be populated, but also would not have resulted in an error. I would capture the request, and verify that the Company name is indeed on the outgoing object, then verify the record and make sure that it isn’t set on the Contact that was created.

Hi Drew, I am not a Python expert, but just out of curiosity, your code has the Company Name enclosed in double quotes, whereas the rest are in single quotes. Would Python be somehow interpreting it differently? Generally it would not be an issue.

Running a test via PHP using your example did not have any issues. I would double check your code, or try some other test data.