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

resolvePriceGranularity does not use account price granularity #2075

Closed
muuki88 opened this issue Nov 7, 2022 · 2 comments · Fixed by #3511
Closed

resolvePriceGranularity does not use account price granularity #2075

muuki88 opened this issue Nov 7, 2022 · 2 comments · Fixed by #3511
Assignees
Labels
bug Something isn't working

Comments

@muuki88
Copy link
Contributor

muuki88 commented Nov 7, 2022

I found an unexpected behaviour in the Ortb2ImplicitParameterResolver class.
My configuration looks like this

  • no price granularity send from prebid (I'm debugging still why this is the case)
  • price-granularity is set on the account and properly loaded
  • /openrtb/auction (web) endpoint is used

I debugged the ortb2 bid request sent to Xandr (AppNexusBidder) and it contains the PriceGranularity.Default instead of the one I have configured in the account settings. I found this code

final boolean hasAllMediaTypes = checkExistingMediaTypes(targeting.getMediatypepricegranularity())
.containsAll(getImpMediaTypes(imps));
if (isPriceGranularityNull && !hasAllMediaTypes) {
return mapper.mapper().valueToTree(ExtPriceGranularity.from(PriceGranularity.DEFAULT));
}

What I don't understand is: when the priceGranularity is null and the mediaType price granularity doesn't cover all the cases it should fallback to the account settings and not default-default, right?

@bretg
Copy link
Collaborator

bretg commented Nov 8, 2022

Thanks for the issue @muuki88 . It's a known shortcoming that PBS-Java doesn't support custom price granularities in account config -- that's issue #2314. Is that the scenario here or something different?

But in any case, there appears to be a bug here - agree that account-level granularity should take precedence over default-default.

@bretg bretg added the bug Something isn't working label Nov 8, 2022
@muuki88
Copy link
Contributor Author

muuki88 commented Nov 8, 2022

Thanks for your response 🤗

Custom price granularity is not the issue here. It's for sure a nice to have, but we wouldn't need it as we only have one, which we could easily add ourselves.

As you mentioned correctly, not falling back to the account price granularity, but the default, is IMHO a bug. As I don't see where else it should be used 😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants