Yuki web service - UpdateContacts

With the UpdateContact method it is possible to update an existing contact or create a new contact. 


When does a contact get updated? 

A contact is updated in case it complies to one of the below criteria: 

  • The ID of the contact is sent along in the XML
    It will be notified in the response if there is not a contact found with a matching ID.
  • The Code is recorded in the XML and matches an existing contact or contacts.
    In case more contacts are found with the same Code, the most recent contact will be updated.
  • Based on the Type, FullName and Email*
    The contact has to be of the same type and the FullName is identical or is separated by one of the following characters (, . " - space) and compared. In case more contacts are found, the Email (if available) will also be used as filter. If the result still has more than one contact, the most recently created contact will be updated.
    * Email is Type = 0 > EmailHome, Type = 2 > EmailWork    



When is a new contact created?

If no existing contact was found in the XML message based on above criteria, an update is not possible and a new contact will be created. 


Available XML elements


see: https://www.yukiworks.be/schemas/contact.xsd


<ID>

In this field a GUID can be recorded for an existing contact that was given eg. through the ContactSearch. In case you record the ID, the contact will be updated with the respective ID. This will avoid possible duplicates. 


<Type>

Contact person = 0

Company = 2


<Code>

Contact code of a contact


<FirstName>

First name of a contact person


<MiddleName>

Middle name of a contact person


<LastName>

Last name of a contact person


<FullName>

Full name of a company or contact person


<AddressLine_1>

Street name of a contact person


<AddressLine_2>

Street name of a contact person 


<PostCode>

Postal code of a contact person


<City>

City of a contact person


<MailAddressLine_1>

Mailing address: Street name of a company or contact person


<MailAddressLine_2>

Mailing address: Street name of a company or contact person


<MailPostCode>

Mailing address: Postal code of a company or contact person


<MailCity> 

Mailing address: City of a company or contact person


<Country>

Country code of a contact person (according to ISO 3166)


<WorkAddressLine_1>

Street name of a company or an extra address of a contact person


<WorkAddressLine_2>

Street name of a company or an extra address of a contact person


<WorkPostCode>

Postal code of a company or an extra address of a contact person


<WorkCity>

City of a company or an extra address of a contact person


<WorkCountry>

Country code of a company (according to ISO 3166) or an extra address of a contact person


<PhoneHome>

Fixed telephone number of a contact person 


<PhoneWork>

Fixed telephone number of a company 


<MobileHome>

Mobile number of a contact person 


<MobileWork>

Mobile work number of a contact person 


<EmailHome>

Email address of a contact person


<EmailWork>

Email address of a company or work email address of a contact person 


<VATNumber>

VAT number of a company 


<CoCNumber>

Chamber of Commerce number of a company 


Example XML


<Contact xmlns="urn:xmlns:http://www.theyukicompany.com:contact" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Type>0</Type>
<Code>1</Code>
<FirstName>A</FirstName>
<MiddleName>van</MiddleName>
<LastName>B</LastName>
<FullName>A van B</FullName>
<AddressLine_1>Persoonstraat 1</AddressLine_1>
<AddressLine_2>Persoonstraat 2</AddressLine_2>
<PostCode>1234PR</PostCode>
<City>Rotterdam</City>
<MailAddressLine_1>Postadres 1</MailAddressLine_1>
<MailAddressLine_2>Postadres 2</MailAddressLine_2>
<MailPostCode>1234PS</MailPostCode>
<MailCity>Rotterdam</MailCity>
<Country>NL</Country>
<WorkAddressLine_1>Werkstraat 1</WorkAddressLine_1>
<WorkAddressLine_2>Werkstraat 2</WorkAddressLine_2>
<WorkPostCode>1234WK</WorkPostCode>
<WorkCity>Rotterdam</WorkCity>
<WorkCountry>NL</WorkCountry>
<PhoneHome>010-2019734</PhoneHome>
<MobileHome>010-2019734</MobileHome>
<MobileWork>010-2019734</MobileWork>
<EmailHome>support@yuki.nl</EmailHome>
<EmailWork>support@yuki.nl</EmailWork>
</Contact>