Consider numeric category ID in facets to obtain ads#33
Conversation
|
Hi! I'm VTEX IO CI/CD Bot and I'll be helping you to publish your app! 🤖 Please select which version do you want to release:
And then you just need to merge your PR when you are ready! There is no need to create a release commit/tag.
|
|
Beep boop 🤖 I noticed you're not using the Docs Builder properly yet, if you need help to set that up please go to IO Documentation |
fltiago
left a comment
There was a problem hiding this comment.
We really need to start testing this resolver as soon as possible. What do you think about addressing this issue and also adding some unit tests later?
Also, how much of a problem do you think it is to make an additional request just to check the category?
| (facet) => CATEGORY_FACET_KEYS.includes(facet.key?.toLowerCase()) | ||
| ) || [] | ||
|
|
||
| let categoryName: string | undefined |
There was a problem hiding this comment.
This logic could be extracted into a separate method or class. Including it here makes it difficult to understand the main purpose of this method, which is to retrieve sponsored products.
There was a problem hiding this comment.
I totally agree! will work on that if we keep this PR
@fltiago In our current scenario of dealing with facets and translating them to the ad server API, at least one additional request will be required. This PR makes it for each category if they are represented as a numeric value, but it would be more like a quick win for a specific scenario than a final solution. I will keep this PR closed until we have designed the final solution! |
What is the purpose of this pull request?
To consider numeric category IDs and translate them to their corresponding category names before sending to the Newtail API.
Test workspace with sponsored shelf containing a facet
cwith numeric IDTypes of changes