Can we/How to provide an array as contextual metadata on GetRecommendation?

0

This is a follow up question after this Question.

I am storing contextual metadata on interaction whose value is an array so it is stored as | separated string. The data stores the users licenses at the time of interaction. User may bought new licenses any time. Say, The definition of the Contextual Metadata on interaction is,

{
          "name": "LICENSES",
          "type": "string",
          "categorical": true
 }

And the data can be "L1", "L1|L3",, or "L1|L2|L3" etc. Where L1, L2, L3 are different licenses. Users may have any combination of them.

Now I want to get Recommendations using GetRecommendation based on that context data. I would like to pass the current licenses user have on the Context. Can I pass the | separated string and get the desired result? For example an user has license L1 and L2,

context = {
      'LICENSES': 'L1|L2'
    }

Now my question is, can we pass context like this? And will it work? I want to show items based on the license users have. On the documentation, it never explicitly says that we can provide such categorical data in context. All the examples use a single string, not a | separated array of strings. So I am wondering if I can pass such | separated array of string on context which would work.

One might suggest filtering the Items based on license. But we want to show items without filtering in our case.

preguntada hace 2 años260 visualizaciones
1 Respuesta
0

Hello,

Thank you for using Personalize Service.

Looking at the questions you have asked along with the follow up question, I believe deeper exploration needs to be done on your use case along. To get better assistance, I'd recommend you to open a case with Premium Support Personalize team so that we can discuss more on the use case along with the implementation required for your use case

Open a support case with AWS using the link:

https://console.aws.amazon.com/support/home?#/case/create

AWS
INGENIERO DE SOPORTE
respondido hace 2 años

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas