Does Target Recommendations API supports multi-value fields?

Description description


  • Target


Does Target Recommendations API supports multi-value fields like mbox or Launch meta tags do? For example, with an mbox, you can do:{
"mbox": "DemoMBoxCanBeDeleted",
  '':         '123',
  'entity.MultiValueAttribute': '`[` "X", "Y", "Z"`]` '
 "success": function(offer) {
  console.log("Result: "+JSON.stringify(offer));
 "error": function(status, error) {
  console.log('Error', status, error);

That will be stored in Target’s catalog as an array to be used in an activity. However, passing in a string of [ “X”, “Y”, “Z”] through the back end of the API stores a string, not array and passing in a JSON array results in a 400 error. Is there syntax or documentation that should be followed on this?

Resolution resolution

This should work. Its been tested using the GET entity to see another entity that had been passed a multi-value attribute. Then used the same format in a POST (save) entity call. It has worked fine in the past.

It should be passed as a stringifiedJSON array by escaping the double quotes inside the array. Here’s the syntax used for above test:

            "attributes": {
                "message": "test tool yo",
                "multiVal1": "`[` \"X\",\"Y\",\"Z\"`]` "
            "categories": `[`
            `]` ,
            "environment": "183214",
            "id": "prod12",
            "name": "multi-val-via-RecsEntityAPI"