bulk operation not getting me correct data

I am trying to perform the bulk operation to fetch the contextual prices. Here is the Query:

mutation {
bulkOperationRunQuery(
query: “”"
{
FiPrices: productVariants {
edges {
node {
id
contextualPricing(context: {country: FI}) {
compareAtPrice{
amount
currencyCode
}
price{
amount
currencyCode
}
}
}
}
}
AuPrices: productVariants {
edges {
node {
id
contextualPricing(context: {country: AU}) {
compareAtPrice{
amount
currencyCode
}
price{
amount
currencyCode
}
}
}
}
}
}
“”"
) {
bulkOperation {
id
status
}
userErrors {
field
message
}
}
}

But Everytime, the record count is incorrect and different, I am trying to fetch contextual prices of multiple context which works in Graph QL but does not work with Bulk, try this and you can find that it works normally:

query
{
FI: productVariants(first: 20) {
edges {
node {
id
contextualPricing(context: {country: FI}) {
compareAtPrice{
amount
currencyCode
}
price{
amount
currencyCode
}
}
}
}
}
US: productVariants(first: 20) {
edges {
node {
id
contextualPricing(context: {country: US}) {
compareAtPrice{
amount
currencyCode
}
price{
amount
currencyCode
}
}
}
}
}
}

Hello,

have you found a solution?

Regards

Jan

Hi, No unfortunately, we would stop using bulk operations now.

Regards

Tejas

Thank you Tejas for reply.

Did you try to use this variant in the bulk?

query MyQuery {
products(first: 10) {
nodes {
title
variants(first: 10) {
nodes {
price
prices_MX: contextualPricing(context: {country: MX}) {
price {
amount
currencyCode
}
compareAtPrice {
amount
currencyCode
}
}
prices_CZ: contextualPricing(context: {country: CZ}) {
price {
amount
currencyCode
}
compareAtPrice {
amount
currencyCode
}
}
}
}
}
}
}

Only problem is where to pull all available contextual countries for the store.

Jan

Well, we changed the approach to use webhooks for the markets prices but for fetching the contextual countries, markets API call would be helpful:

query Markets {
markets(first: 7) {
nodes {
id
name
regions(first: 7) {
pageInfo {
hasNextPage
}
nodes {
name
… on MarketRegionCountry {
code
}
}
}
enabled
webPresence {
rootUrls {
locale
url
}
}
}
}
}

That’s what I was looking for. I figured it out once but I couldn’t find it again. Probably, you are using productFeeds for webhook pricing, right?

Thank you for your time and help, I appreciate it

Jan

Yes, its product feed for the prices. :slightly_smiling_face:

Regards

Tejas