-
ChatterFeed
-
0Best Answers
-
0Likes Received
-
0Likes Given
-
1Questions
-
2Replies
B2B Commerce - Product-Search connect API with includePrices as TRUE doesnt return prices
Hi All,
I am trying to run below code snippet with logged in customer user but I am unable to fetch the prices in response.
Request Body:
The customer user is assigned to the buyer of the buyer group which is linked to the store
There is entitlement policy linked to the above buyer group with visible price and visible product flag as checked.
The Account currency, pricebook entry currency and user currency all match(EUR)
If I dont use API and use standard search component then I am able to see the prices correctly.
I am trying to run below code snippet with logged in customer user but I am unable to fetch the prices in response.
Request Body:
{"searchTerm":"beans","refinements":[],"page":0,"includePrices":true}Response Body
{ "categories": { "category": { "description": "All Categories", "id": null, "name": "All Categories" }, "children": [ { "category": { "description": null, "id": "0ZG68000000LSWMGA4", "name": "Coffee Beans" }, "children": [], "productCount": 3 } ], "productCount": 3 }, "correlationId": "65c251d8c6369165", "facets": [], "locale": "en_US", "productsPage": { "currencyIsoCode": null, "pageSize": 20, "products": [ { "defaultImage": { "alternateText": "Dark Roast Whole Bean Coffee", "contentVersionId": "5OU68000000LTSiGAO", "id": "2pm68000000PaRZAA0", "mediaType": "Image", "sortOrder": 0, "thumbnailUrl": null, "title": "servlet-servletimageserver", "url": "https://c.na139.content.force.com/servlet/servlet.ImageServer?id=0154W00000CxsJK&oid=00D4W0000054JBn" }, "fields": { "LastModifiedDate": { "value": "2023-02-17T16:30:21Z" }, "DisplayUrl": { "value": null }, "IsDeleted": { "value": "false" }, "Description": { "value": "2.5 lbs of dark roasted, single-origin, fair trade and Organic Arabica bean from the Chiapas region of Mexico. It is nutty with notes of caramel and slight baker's chocolate. It is fresh roasted and rated Premium Grade "1," the highest rating available for coffee." }, "ProductCode": { "value": "DRW-1" }, "IsActive": { "value": "true" }, "ExternalId": { "value": null }, "LastViewedDate": { "value": "2023-03-17T17:54:22Z" }, "UserRecordAccessId": { "value": null }, "LastReferencedDate": { "value": "2023-03-17T17:54:22Z" }, "StockKeepingUnit": { "value": "DRW-1" }, "CurrencyIsoCode": { "value": "EUR" }, "ExternalDataSourceId": { "value": null }, "Name": { "value": "Dark Roast Whole Bean Coffee (Sample)" }, "SystemModstamp": { "value": "2023-02-17T16:30:22Z" }, "IsArchived": { "value": "false" }, "Type": { "value": null }, "CreatedById": { "value": "00568000004enxO" }, "QuantityUnitOfMeasure": { "value": null }, "CreatedDate": { "value": "2023-01-31T10:51:24Z" }, "Family": { "value": "Personal" }, "ProductClass": { "value": "Simple" }, "LastModifiedById": { "value": "00568000004enxO" }, "TaxPolicyId": { "value": null } }, "id": "01t68000000WskZAAS", "name": "Dark Roast Whole Bean Coffee (Sample)", "prices": null, "productClass": "Simple", "purchaseQuantityRule": null, "variationAttributeSet": null }, { "defaultImage": { "alternateText": "Medium Roast Coffee", "contentVersionId": "5OU68000000LTScGAO", "id": "2pm68000000PaRWAA0", "mediaType": "Image", "sortOrder": 0, "thumbnailUrl": null, "title": "servlet-servletimageserver", "url": "https://c.na139.content.force.com/servlet/servlet.ImageServer?id=0154W00000CxsJ5&oid=00D4W0000054JBn" }, "fields": { "LastModifiedDate": { "value": "2023-02-17T16:30:21Z" }, "DisplayUrl": { "value": null }, "IsDeleted": { "value": "false" }, "Description": { "value": "Grown in Colombia's rich volcanic soil, this coffee is as distinctive as the countryside. Our medium roast coffee delivers a signature nutty flavor. We use 100% natural roasted arabica beans to create a smooth and balanced, yet crisp, cup of coffee." }, "ProductCode": { "value": "MRC-1" }, "IsActive": { "value": "true" }, "ExternalId": { "value": null }, "LastViewedDate": { "value": "2023-02-14T11:34:04Z" }, "UserRecordAccessId": { "value": null }, "LastReferencedDate": { "value": "2023-02-14T11:34:04Z" }, "StockKeepingUnit": { "value": "MRC-1" }, "CurrencyIsoCode": { "value": "EUR" }, "ExternalDataSourceId": { "value": null }, "Name": { "value": "Medium Roast Coffee (Sample)" }, "SystemModstamp": { "value": "2023-02-24T15:25:10Z" }, "IsArchived": { "value": "false" }, "Type": { "value": null }, "CreatedById": { "value": "00568000004enxO" }, "QuantityUnitOfMeasure": { "value": null }, "CreatedDate": { "value": "2023-01-31T10:51:24Z" }, "Family": { "value": "Personal" }, "ProductClass": { "value": "Simple" }, "LastModifiedById": { "value": "00568000004enxO" }, "TaxPolicyId": { "value": null } }, "id": "01t68000000WskXAAS", "name": "Medium Roast Coffee (Sample)", "prices": null, "productClass": "Simple", "purchaseQuantityRule": null, "variationAttributeSet": null }, { "defaultImage": { "alternateText": "Costa Rican Decaf Roast Bean Bag", "contentVersionId": "5OU68000000LTSUGA4", "id": "2pm68000000PaRSAA0", "mediaType": "Image", "sortOrder": 0, "thumbnailUrl": null, "title": "servlet-servletimageserver", "url": "https://c.na139.content.force.com/servlet/servlet.ImageServer?id=0154W00000CxsJF&oid=00D4W0000054JBn" }, "fields": { "LastModifiedDate": { "value": "2023-02-17T16:30:21Z" }, "DisplayUrl": { "value": null }, "IsDeleted": { "value": "false" }, "Description": { "value": "A water processed decaf that is vivid and packed with flavor, Costa Rican Decaf is made from 100% organic water processed decaffeinated beans. The Decaf is surprisingly (some say freakishly) versatile: about the only preparation we don?t see consistently enjoyable results in is the siphon." }, "ProductCode": { "value": "CR-DEC" }, "IsActive": { "value": "true" }, "ExternalId": { "value": null }, "LastViewedDate": { "value": "2023-02-13T13:47:41Z" }, "UserRecordAccessId": { "value": null }, "LastReferencedDate": { "value": "2023-02-13T13:47:41Z" }, "StockKeepingUnit": { "value": "CR-DEC" }, "CurrencyIsoCode": { "value": "EUR" }, "ExternalDataSourceId": { "value": null }, "Name": { "value": "Costa Rican Decaf Roast Bean Bag (Sample)" }, "SystemModstamp": { "value": "2023-02-17T16:30:22Z" }, "IsArchived": { "value": "false" }, "Type": { "value": null }, "CreatedById": { "value": "00568000004enxO" }, "QuantityUnitOfMeasure": { "value": null }, "CreatedDate": { "value": "2023-01-31T10:51:24Z" }, "Family": { "value": "Personal" }, "ProductClass": { "value": "Simple" }, "LastModifiedById": { "value": "00568000004enxO" }, "TaxPolicyId": { "value": null } }, "id": "01t68000000WskVAAS", "name": "Costa Rican Decaf Roast Bean Bag (Sample)", "prices": null, "productClass": "Simple", "purchaseQuantityRule": null, "variationAttributeSet": null } ], "total": 3 } }Note:
The customer user is assigned to the buyer of the buyer group which is linked to the store
There is entitlement policy linked to the above buyer group with visible price and visible product flag as checked.
The Account currency, pricebook entry currency and user currency all match(EUR)
If I dont use API and use standard search component then I am able to see the prices correctly.
- Karan Khatri 10
- March 20, 2023
- Like
- 0
B2B Commerce - Product-Search connect API with includePrices as TRUE doesnt return prices
Hi All,
I am trying to run below code snippet with logged in customer user but I am unable to fetch the prices in response.
Request Body:
The customer user is assigned to the buyer of the buyer group which is linked to the store
There is entitlement policy linked to the above buyer group with visible price and visible product flag as checked.
The Account currency, pricebook entry currency and user currency all match(EUR)
If I dont use API and use standard search component then I am able to see the prices correctly.
I am trying to run below code snippet with logged in customer user but I am unable to fetch the prices in response.
Request Body:
{"searchTerm":"beans","refinements":[],"page":0,"includePrices":true}Response Body
{ "categories": { "category": { "description": "All Categories", "id": null, "name": "All Categories" }, "children": [ { "category": { "description": null, "id": "0ZG68000000LSWMGA4", "name": "Coffee Beans" }, "children": [], "productCount": 3 } ], "productCount": 3 }, "correlationId": "65c251d8c6369165", "facets": [], "locale": "en_US", "productsPage": { "currencyIsoCode": null, "pageSize": 20, "products": [ { "defaultImage": { "alternateText": "Dark Roast Whole Bean Coffee", "contentVersionId": "5OU68000000LTSiGAO", "id": "2pm68000000PaRZAA0", "mediaType": "Image", "sortOrder": 0, "thumbnailUrl": null, "title": "servlet-servletimageserver", "url": "https://c.na139.content.force.com/servlet/servlet.ImageServer?id=0154W00000CxsJK&oid=00D4W0000054JBn" }, "fields": { "LastModifiedDate": { "value": "2023-02-17T16:30:21Z" }, "DisplayUrl": { "value": null }, "IsDeleted": { "value": "false" }, "Description": { "value": "2.5 lbs of dark roasted, single-origin, fair trade and Organic Arabica bean from the Chiapas region of Mexico. It is nutty with notes of caramel and slight baker's chocolate. It is fresh roasted and rated Premium Grade "1," the highest rating available for coffee." }, "ProductCode": { "value": "DRW-1" }, "IsActive": { "value": "true" }, "ExternalId": { "value": null }, "LastViewedDate": { "value": "2023-03-17T17:54:22Z" }, "UserRecordAccessId": { "value": null }, "LastReferencedDate": { "value": "2023-03-17T17:54:22Z" }, "StockKeepingUnit": { "value": "DRW-1" }, "CurrencyIsoCode": { "value": "EUR" }, "ExternalDataSourceId": { "value": null }, "Name": { "value": "Dark Roast Whole Bean Coffee (Sample)" }, "SystemModstamp": { "value": "2023-02-17T16:30:22Z" }, "IsArchived": { "value": "false" }, "Type": { "value": null }, "CreatedById": { "value": "00568000004enxO" }, "QuantityUnitOfMeasure": { "value": null }, "CreatedDate": { "value": "2023-01-31T10:51:24Z" }, "Family": { "value": "Personal" }, "ProductClass": { "value": "Simple" }, "LastModifiedById": { "value": "00568000004enxO" }, "TaxPolicyId": { "value": null } }, "id": "01t68000000WskZAAS", "name": "Dark Roast Whole Bean Coffee (Sample)", "prices": null, "productClass": "Simple", "purchaseQuantityRule": null, "variationAttributeSet": null }, { "defaultImage": { "alternateText": "Medium Roast Coffee", "contentVersionId": "5OU68000000LTScGAO", "id": "2pm68000000PaRWAA0", "mediaType": "Image", "sortOrder": 0, "thumbnailUrl": null, "title": "servlet-servletimageserver", "url": "https://c.na139.content.force.com/servlet/servlet.ImageServer?id=0154W00000CxsJ5&oid=00D4W0000054JBn" }, "fields": { "LastModifiedDate": { "value": "2023-02-17T16:30:21Z" }, "DisplayUrl": { "value": null }, "IsDeleted": { "value": "false" }, "Description": { "value": "Grown in Colombia's rich volcanic soil, this coffee is as distinctive as the countryside. Our medium roast coffee delivers a signature nutty flavor. We use 100% natural roasted arabica beans to create a smooth and balanced, yet crisp, cup of coffee." }, "ProductCode": { "value": "MRC-1" }, "IsActive": { "value": "true" }, "ExternalId": { "value": null }, "LastViewedDate": { "value": "2023-02-14T11:34:04Z" }, "UserRecordAccessId": { "value": null }, "LastReferencedDate": { "value": "2023-02-14T11:34:04Z" }, "StockKeepingUnit": { "value": "MRC-1" }, "CurrencyIsoCode": { "value": "EUR" }, "ExternalDataSourceId": { "value": null }, "Name": { "value": "Medium Roast Coffee (Sample)" }, "SystemModstamp": { "value": "2023-02-24T15:25:10Z" }, "IsArchived": { "value": "false" }, "Type": { "value": null }, "CreatedById": { "value": "00568000004enxO" }, "QuantityUnitOfMeasure": { "value": null }, "CreatedDate": { "value": "2023-01-31T10:51:24Z" }, "Family": { "value": "Personal" }, "ProductClass": { "value": "Simple" }, "LastModifiedById": { "value": "00568000004enxO" }, "TaxPolicyId": { "value": null } }, "id": "01t68000000WskXAAS", "name": "Medium Roast Coffee (Sample)", "prices": null, "productClass": "Simple", "purchaseQuantityRule": null, "variationAttributeSet": null }, { "defaultImage": { "alternateText": "Costa Rican Decaf Roast Bean Bag", "contentVersionId": "5OU68000000LTSUGA4", "id": "2pm68000000PaRSAA0", "mediaType": "Image", "sortOrder": 0, "thumbnailUrl": null, "title": "servlet-servletimageserver", "url": "https://c.na139.content.force.com/servlet/servlet.ImageServer?id=0154W00000CxsJF&oid=00D4W0000054JBn" }, "fields": { "LastModifiedDate": { "value": "2023-02-17T16:30:21Z" }, "DisplayUrl": { "value": null }, "IsDeleted": { "value": "false" }, "Description": { "value": "A water processed decaf that is vivid and packed with flavor, Costa Rican Decaf is made from 100% organic water processed decaffeinated beans. The Decaf is surprisingly (some say freakishly) versatile: about the only preparation we don?t see consistently enjoyable results in is the siphon." }, "ProductCode": { "value": "CR-DEC" }, "IsActive": { "value": "true" }, "ExternalId": { "value": null }, "LastViewedDate": { "value": "2023-02-13T13:47:41Z" }, "UserRecordAccessId": { "value": null }, "LastReferencedDate": { "value": "2023-02-13T13:47:41Z" }, "StockKeepingUnit": { "value": "CR-DEC" }, "CurrencyIsoCode": { "value": "EUR" }, "ExternalDataSourceId": { "value": null }, "Name": { "value": "Costa Rican Decaf Roast Bean Bag (Sample)" }, "SystemModstamp": { "value": "2023-02-17T16:30:22Z" }, "IsArchived": { "value": "false" }, "Type": { "value": null }, "CreatedById": { "value": "00568000004enxO" }, "QuantityUnitOfMeasure": { "value": null }, "CreatedDate": { "value": "2023-01-31T10:51:24Z" }, "Family": { "value": "Personal" }, "ProductClass": { "value": "Simple" }, "LastModifiedById": { "value": "00568000004enxO" }, "TaxPolicyId": { "value": null } }, "id": "01t68000000WskVAAS", "name": "Costa Rican Decaf Roast Bean Bag (Sample)", "prices": null, "productClass": "Simple", "purchaseQuantityRule": null, "variationAttributeSet": null } ], "total": 3 } }Note:
The customer user is assigned to the buyer of the buyer group which is linked to the store
There is entitlement policy linked to the above buyer group with visible price and visible product flag as checked.
The Account currency, pricebook entry currency and user currency all match(EUR)
If I dont use API and use standard search component then I am able to see the prices correctly.
- Karan Khatri 10
- March 20, 2023
- Like
- 0