UpsertContact

Overview

Updates an existing contact in the specified channel with the specified primary key and primary key value. List as many attribute name and attribute values as necessary.

Syntax

UpsertContact(1, 2, 3, 4, 5)

Function Properties

OrdinalTypeDescription
1stringRequiredThe channel to update for a contact. Possible values include: mobile
2stringRequiredPrimary key type used to locate contact. Possible values include: phone
3stringRequiredValue of primary key used to locate contact
4stringRequiredName of attribute to upsert
5stringRequiredValue of attribute to upsert

Usage

The sample code below updates a Contact from a landing page.

The function indicates success by returning a value of 0. The sample code below demonstrates how to take information from an SMS message. In this case, the Contact sent their ZIP code via SMS message and the [MSG(0).NOUN(0)] string captures that value:

Again, the function indicates success by returning a value of 0.