Expand my Community achievements bar.

SOLVED

Can we pass multiple values as mbox parameter?

Avatar

Employee Advisor

Hi there,

we are trying to pass multiple values as array list in the mbox parameter for recommendations (example in the screenshot below). Based on these parameter values, we want to create an exclusion such as mbox.prohibitedTypes - "itemType is not contained in list". Can someone please confirm if these normal parameters will be accepted by recs.

khushbook25_0-1646223000650.png

We need list on both the sides -

khushbook25_1-1646223141643.png

Here is an example of the use case -

khushbook25_2-1646223177377.png

Thanks!

 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

If you are trying to exclude certain ids from showing up, then Recommendations has a param that is built for that:

 

function targetPageParams() {
   return {
      "excludedIds": ["352", "223", "23432", "432", "553"]
      }
}

 

https://experienceleague.adobe.com/docs/target/using/recommendations/plan-implement.html?lang=en 

 

For your particular question, I don't think you need to stringify the param value since Adobe will be expecting a list (array) on both the left (param) and right (item catalog column) side. 

 

I have found that Adobe Target Recommendations is much easier to troubleshoot by generating a debug token from the Administration / Implementation interface. 

View solution in original post

2 Replies

Avatar

Correct answer by
Community Advisor

If you are trying to exclude certain ids from showing up, then Recommendations has a param that is built for that:

 

function targetPageParams() {
   return {
      "excludedIds": ["352", "223", "23432", "432", "553"]
      }
}

 

https://experienceleague.adobe.com/docs/target/using/recommendations/plan-implement.html?lang=en 

 

For your particular question, I don't think you need to stringify the param value since Adobe will be expecting a list (array) on both the left (param) and right (item catalog column) side. 

 

I have found that Adobe Target Recommendations is much easier to troubleshoot by generating a debug token from the Administration / Implementation interface. 

Avatar

Community Advisor

You can map such a validation via a ProfileScript. There you can create more complex queries and finally return true or false. Maybe this will help you.

I myself would not need a list on either side. At least, I can't think of any current case - and if so, only with some special exceptions, where a list on the left and right would not be sufficient.

 

Best regards