Skip to content

Instantly share code, notes, and snippets.

@matrostik
Last active September 25, 2017 19:54
Show Gist options
  • Save matrostik/6227c1c2c73a94a793b3f7f35809f0da to your computer and use it in GitHub Desktop.
Save matrostik/6227c1c2c73a94a793b3f7f35809f0da to your computer and use it in GitHub Desktop.
%%[
VAR @de, @de_col, @de_statusCode, @de_statusMsg, @errorCode
InsertDE('Customers','SubscriberKey','[email protected]', 'EmailAddress','[email protected]')
SET @de = CreateObject("DataExtensionObject")
SetObjectProperty(@de, "CustomerKey", "17EA5F55-35B7-4A6E-848E-FDCE00D7726C")
SET @de_col = CreateObject("APIProperty")
SetObjectProperty(@de_col, "Name", "SubscriberKey")
SetObjectProperty(@de_col, "Value", "[email protected]")
AddObjectArrayItem(@de, "Properties", @de_col)
SET @de_col = CreateObject("APIProperty")
SetObjectProperty(@de_col, "Name", "EmailAddress")
SetObjectProperty(@de_col, "Value", [email protected])
AddObjectArrayItem(@de, "Properties", @de_col)
SET @de_statusCode = InvokeCreate(@de, @de_statusMsg, @errorCode)
IF @de_statusCode != "OK" THEN
RaiseError(@de_statusMsg, 0, @de_statusCode, @errorCode)
ENDIF
]%%
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment