UpsertContact
This function ‘upserts’ a Contact in Marketing Cloud. If the Contact does not already exist, then a new record is created. If the Contact exists, then the record is updated.
The function will output 1 if an error occurred when upserting the Contact and 0 if the upsert was successful.
Example
The following example inserts or updates a mobile Contact record.
%%[
var @upsert
set @upsert = UpsertContact("mobile",
"phone", 13153695271,
"_City", "Old Forges",
"_State", "NY",
"_ZipCode", 13420,
"_FirstName", "Scott",
"_LastName", "Jones",
"_UTCOffset", -5
)
]%%
result: %%=v(@upsert)=%%
Output
A value of 0 is set by the function, indicating that no errors occurred.
result: 0




