Overview

Skill Level: Intermediate

Step-by-step

  1. Syntax of the request and response XML for UpdateRecipient

    Use of the optional OPT_OUT child element allows this operation to add a currently opted‐out contact back into the database.

    If your database has a key other than Email, you must include all unique key columns with their corresponding name/value pairs.

    If updating contacts in a database that has no Unique Identifier defined, one or more Sync Fields must be specified in order to look up the contact.

    When adding/updating records in your organization’s CRM List, you can specify whether to sync the contact to your CRM system by passing a COLUMN element with a NAME “CRM Enable Sync” and VALUE of “Yes” or “No”. If you do not include this column, the organization’s default setting will be used.

    When adding/updating records in your organization’s CRM List, you can specify whether the individual is a Lead or Contact by passing a COLUMN element with a NAME “CRM Contact Type” and VALUE of “Lead” or “Other”. If you do not include this column, the individual will be designated a Lead.

    Operation <UpdateRecipient>
    Elements LIST_ID The ID of the database to which the contact resides in.
      OLD_EMAIL Optional Old email address for the contact.
      SEND_AUTOREPLY Optional If the database has an autoresponder associated with it and the SEND_AUTO_REPLY element is set to true, Watson Campaign Automation sends the confirmation when the contact is added to the database.
      ALLOW_HTML Optional If true, Watson Campaign Automation will interpret—and properly render—HTML markup within a value in the text field. The default value is false, which will convert HTML tags to character entity references (and tags will display as literal characters in the field).
      VISITOR_ID Optional Allows specifying a visitor key to associate a contact to apreviously unknown visitor when using the Web Tracking feature.
      SYNC_FIELDS Optional Required if the database has no Unique Identifier. Used to lookup a contact in a database that has no Unique Identifier defined. Include a SYNC_FIELD element for each column that defines aunique contact. Note: If more than one contact is found matching the lookup columns, the oldest contact will be updated.
      Child Element SYNC_FIELD XML nodes defining the column name and value of the unique identifier fields. Each node must have a Name tag and a Value tag.
        Child Element NAME Defines the field name.
          VALUE Contains the field value.
      COLUMN XML nodes defining the column name and value. Note: Each node must have a Name tag and a Value tag. If the database has a key that is not Email, Unique key columns must also be part of the submission with column names and values. If changing a value of one of the SYNC_FIELDS, the new value should be included as a COLUMN node.
      Optional Child Element NAME OPT_OUT Use this name‐value pair only to subscribe a
    previously opted out contact. For normal usage, omit this name‐value pair.
        VALUE False  
      Child Element NAME Defines the field name.
        VALUE Contains the field value.
    Example 1
    with normal usage
    <Envelope>
    <Body>
    <UpdateRecipient>
    <LIST_ID>85628</LIST_ID>
    <CREATED_FROM>2</CREATED_FROM>
    <OLD_EMAIL>somebody@domain.com</OLD_EMAIL>
    <COLUMN>
    <NAME>CustomerId</NAME>
    <VALUE>123-45-6789</VALUE>
    </COLUMN>
    <COLUMN>
    <NAME>EMAIL</NAME>
    <VALUE>somebodynew@domain.com</VALUE>
    </COLUMN>
    <COLUMN>
    <NAME>Street_Address</NAME>
    <VALUE>123New Street</VALUE>
    </COLUMN>
    <SNOOZE_SETTINGS>
    <SNOOZED>true</SNOOZED>
    <RESUME_SEND_DATE>03/15/2015</RESUME_SEND_DATE>
    </SNOOZE_SETTINGS>
    </UpdateRecipient>
    </Body>
    </Envelope>
         
    Example 2
    with resubscribe
    <Envelope>
    <Body>
    <UpdateRecipient>
    <LIST_ID>85628</LIST_ID>
    <CREATED_FROM>2</CREATED_FROM>
    <OLD_EMAIL>somebody@domain.com</OLD_EMAIL>
    <COLUMN>
    <NAME>OPT_OUT</NAME>
    <VALUE>false</VALUE>
    </COLUMN>
    <COLUMN>
    <NAME>CustomerId</NAME>
    <VALUE>123-45-6789</VALUE>
    </COLUMN>
    <COLUMN>
    <NAME>EMAIL</NAME>
    <VALUE>somebodynew@domain.com</VALUE>
    </COLUMN>
    <COLUMN>
    <NAME>Street_Address</NAME>
    <VALUE>123NewStreet</VALUE>
    </COLUMN>
    </UpdateRecipient>
    </Body>
    </Envelope>
         
    Example 3
    with Sync
    Fields
    <Envelope>
    <Body>
    <UpdateRecipient>
    <LIST_ID>85628</LIST_ID>
    <CREATED_FROM>2</CREATED_FROM>
    <SYNC_FIELDS>
    <SYNC_FIELD>
    <NAME>EMAIL</NAME>
    <VALUE>somebody@domain.com</VALUE>
    </SYNC_FIELD>
    <SYNC_FIELD>
    <NAME>CustomerId</NAME>
    <VALUE>123-45-6789</VALUE>
    </SYNC_FIELD>
    </SYNC_FIELDS>
    <COLUMN>
    <NAME>EMAIL</NAME>
    <VALUE>somebody2@domain.com</VALUE>
    </COLUMN>
    <COLUMN>
    <NAME>Street_Address</NAME>
    <VALUE>123NewStreet</VALUE>
    </COLUMN>
    </UpdateRecipient>
    </Body>
    </Envelope>
         
    Response <RESULT>      
    Elements SUCCESS True if successful.
      Recipient ID ID of the updated contact.
      ORGANIZATION_ID Identifies your Watson Campaign Automation Organization.
      VISITOR_ASSOCIATION Optional Indicates whether the specified Visitor ID is valid and was associated to a profile.
    Example
    <Envelope>
    <Body>
    <RESULT>
    <SUCCESS>TRUE</SUCCESS>
    <RecipientId>33439394</RecipientId>
    </RESULT>
    </Body>
    </Envelope>
         

1 comment on"Update a Contact"

  1. Sam Lewis June 11, 2019

    The documentation for UpdateRecipient is incorrect when it says to pass VISITOR_ID to associate a web visitor to a contact. It seems to need VISITOR_KEY as stated in AddRecipient.

Join The Discussion

Your email address will not be published. Required fields are marked *