Adding New Contacts Using the API
One of the first things you will want to do with your Bronto account is add contacts. Using the API, you can add new contacts that you have in a system outside of Bronto. The Bronto API allows you to create up to 5000 contacts in a single request. However, if you are also adding a large amount of contact field information, you may want to limit your add request to 1000 contacts to avoid experiencing any timeout issues. After the request has been successfully processed, these contacts will be available in the Bronto application and the API.
Adding New Contacts
You create these new contacts using the addContacts function. This function allows you to give as much or as little information about the new contacts as you have. The only information required to create new contacts using addContacts is their email address, and their status (onboarding, unconfirmed or transactional). Naturally, you can also include other information such as source, any lists the new contacts should be on, and any member field data you have about the new contacts. Since the email address is a unique identifier in the Bronto system, you will not create a duplicate contact should you try to create an email address that already exists. You can, however, update current contacts based on the email address if you choose.
Advanced Features
What if you don't know if the contacts you are trying to add are all new? What if you just want to make sure your contact information is in Bronto and up-to-date? In this case, you can use the addOrUpdate function. This function will add any new contacts and update any existing contacts. You should be aware that this function will not update the status of a current contact.
Some Example Code (SOAP)
Below is some example code you can use to get an idea of how the addContacts function can be used.
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:v4="http://api.bronto.com/v4">
<soapenv:Header>
<v4:sessionHeader>
<sessionId>?</sessionId>
</v4:sessionHeader>
</soapenv:Header>
<soapenv:Body>
<v4:addContacts>
<contacts>
<email>example_email@bronto.com</email>
<status>onboarding</status>
<msgPref>html</msgPref>
<customSource>Testing API</customSource>
<listIds>07d003ec00000000000000000000000003a9</listIds>
<fields>
<fieldId>07d003ec00000000000000000000000003ab</fieldId>
<content>Test Field</content>
</fields>
</contacts>
</v4:addContacts>
</soapenv:Body>
</soapenv:Envelope>Add Away
Now that you have read about the power of addContacts, we hope you will continue to leverage the power of the Bronto API and discover new ways to use it. If you have any questions or comments, feel free to leave them in the comments section below.
Andrew Kanes
Support Engineer at Bronto


Comments
Post new comment