I have the following 'To' object in an API request:
"To": {
"Address": "email address here",
"SubscriberKey": "Subscriber key here",
"ContactAttributes": {
"SubscriberAttributes": {
"EmailAddress":"Email address here",
"SubscriberKey": "Subscriber key here",
"Language": "Language here",
"Country": "Country here"
}
}
}
What I am wondering is; how can I add values to the inline objects "ContactAttributes" and "SubscriberAttributes" with AMPscript?
I know that I can set values for the 'To' object with the SetObjectProperty function:
SET @ts_to = CreateObject("To")
SetObjectProperty(@ts_to, "Address", @EmailAddress)
SetObjectProperty(@ts_to, "SubscriberKey", @SubscriberKey)
But I get stuck with these inline objects.