Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GroupBy editable in Recommendations by Cross Selling #467

Merged
merged 4 commits into from
Mar 21, 2024

Conversation

iago1501
Copy link
Contributor

@iago1501 iago1501 commented Mar 8, 2024

What problem is this solving?

We have a limitation in Recommendation queries where we always group by products, but, some customers, especially when talking about fashion segments, want to show also individual SKUs instead, this feature is responsible for allowing that.

Also, there's another limitation presented here that we are trying to cover. When grouping by products and calling the catalog cross selling API, we do a reduced search, in this reduced search, the total quantity of products returned is limited by 12, but, if we don't use this parameter the limit is 50, so, we are also increasing the possibility of the number of products returned by this query

How should this be manually tested?

Workspace

These queries in app vtex.search-graphql

query ProductRecommendations(
  $identifier: ProductUniqueIdentifier
  $type: CrossSelingInputEnum
  $groupBy: CrossSelingGroupByEnum
){
  productRecommendations(identifier: $identifier, type: $type, groupBy: $groupBy) {
    cacheId
    productId
    productName
    productReference
  }
}
{
  "identifier": {
    "field": "id",
    "value": "177"
  },
  "type": "similars",
  "groupBy": PRODUCT
}
 
query ProductsByIdentifier(
  $field: ProductUniqueIdentifierField!
  $values: [ID!]
){
  productsByIdentifier(field: $field, values: $values) {
    recommendations(groupBy: PRODUCT) {
      similars{
        cacheId
      	productId
    		productName
    		productReference
      }
    }
  }
}
{
  "field": "id",
  "values": [21]
}

Screenshots or example usage

image

Type of changes

✔️ Type of Change
_ Bug fix
✔️ New feature
_ Breaking change
_ Technical improvements

Notes

Complements with: vtex-apps/search-graphql#135

@iago1501 iago1501 added the enhancement New feature or request label Mar 8, 2024
@iago1501 iago1501 self-assigned this Mar 8, 2024
Copy link

vtex-io-ci-cd bot commented Mar 8, 2024

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:

  • Patch (backwards-compatible bug fixes)

  • Minor (backwards-compatible functionality)

  • Major (incompatible API changes)

And then you just need to merge your PR when you are ready! There is no need to create a release commit/tag.

  • No thanks, I would rather do it manually 😞

@pedrobernardina
Copy link

@iago1501

I've tested the queries on your WS.
LGTM 🎉

@iago1501 iago1501 merged commit ddc3a31 into v1.x Mar 21, 2024
5 of 9 checks passed
@iago1501 iago1501 deleted the feat/groupByCrossSelling branch March 21, 2024 15:56
Copy link

vtex-io-ci-cd bot commented Mar 21, 2024

Your PR has been merged! App is being published. 🚀
Version 1.68.0 → 1.69.0

After the publishing process has been completed (check #vtex-io-releases) and doing A/B tests with the new version, you can deploy your release by running:

vtex deploy vtex.search-resolver@1.69.0

After that your app will be updated on all accounts.

For more information on the deployment process check the docs. 📖

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants