Hi @israel_sanchez,
I assume every recipient will be getting a different set of products. In your JS code, you can add those products into the temporary schema against each recipient record using the xtk.session.Write() method [I know it is not efficient to this method to write into temporary tables], and then get all the products in the content block just like other targetData elements and attributes.
e.g. <%= targetData.product1 %>
To make the workflow efficient, you can avoid writing into the temporary schema, but write into a file (.csv) on the server instead. The file would contain the recipient identifier, and the products per line of data. Later on in the workflow, you can use the "data loading (File)" activity to read that file and then enrich your targeting dimension with the data from that file.
You can keep using the same file name for every execution of the workflow, but remember to delete the file from the server once it has served its purpose (end of the workflow). This operation (file write/read) is way faster than writing into the temporary schema in your JS code when the number of records in the temporary schema is too high.
Let me know if that helps.
Thanks,
Ishan