I am passing one or more than one product through API call ([https://www.exacttargetapis.com/interaction/v1/events][1]) in the same Data Extension's field (using ~ tilde as separator). This is the example of the API call

   "EstablishContactKey": false,
        "EmailAddress":"[email protected]",
        "AbandonedCartID" : "9218921" ,
        "NumberOfItems" : "4" ,
        "SkuID" : "1076847~1076848" ,
        "Price" : "150.00~70.34",
        "Quantity" : "1~3",
        "IsConverted" : false,
        "CartTotal": "210.34"        

I would like to understand how retrieve SkuIDs of the products in HTML email content using AMPSCRIPT. I noticed that if i want to pass multiple values i should set 'Text' as data type of the fields (Quantity, Price, SkuID). Do you confirm that is the standard way to handle them?

Do you think is possible to use BuildRowsetFromString("150.00~70.34", "~") ?

1 Answer 1


Yes, it is possible to use BuildRowsetFromString("150.00~70.34", "~") in this scenerio.


var @rowSet
set @rowSet = BuildRowsetFromString("150.00~70.34", "~") 
for @i = 1 to RowCount(@rowSet) do
    set @row = Row(@rowSet, @i)
    set @value = Field(@row,1)
    @value = Field(Row(@rowSet, @i),1)
    output(concat("<div>", @value,"</div>"))
next @i



The data extension field must have a data type of text because the tilde is stored in the data extension field and is not considered numeric. Also, be sure to assign a field width that is large enough to store all the data being passed.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .