Showing a Product Directory from Oracle Sales Cloud in Visual Builder Cloud Service
Oracle Sales Cloud (OSC) REST APIs have resources for Product Groups and Products. From this organizations can build deep multi-level product catalogs. But displaying and navigating these catalogs in a REST client like VBCS can be challenging.
With the help of VBCS custom code guru David Konecny, we recently built a catalog that looked like this:

The Product Groups REST API has the following quirks:
- Product Group (/crmRestApi/resources/11.13.0.0/setupSalesCatalogs) has children called Subgroups and Products.
- A Subgroup of a Product Group (/crmRestApi/resources/11.13.0.0/setupSalesCatalogs/{ProdGroupId}/child/ProductGroupSubgroupAdministration) is not a regular Product Group and doesn’t have all of its properties, most notably the list of the subgroup’s subgroups.
- Similarly a Product in a Product Group (/crmRestApi/resources/11.13.0.0/setupSalesCatalogs/{ProdGroupId}/child/ProductGroupProductSetup) is not a regular Product (/crmRestApi/resources/11.13.0.0/products) and is missing key properties.
The problem here is that when you dig into one of those subgroups what you want to show is not a ProductGroupSubgroupAdministration object but just a plain old Product Group. To accomplish this, we have to bust into some custom code.
- Drop a list and hook it up to Product Groups business object. Only enable the Details action.
- In the Product Group Details page, drop a list and bind it to Subgroups. Don’t add any of the CRUD action pages.
- Select the Subgroup name and go to Actions tab in the Property Inspector. Add a new Custom Action.
- Add a custom JavaScript block to the action and enter this code:
// Replace com_oracle_abcs_fa_V7OhT with the variable used in your page
// Get the ProdGroupId for the subgroup
var prodId = $com_oracle_abcs_fa_V7OhT_setupSalesCatalogs_ProductGroupSubgroupAdministrationListArchetypeRecord.getValue('ProdGroupId');// Create a new record with the ProdGroupId
var record = new Record({'_breeze_system_id' : prodId});// Navigate to the ProductGroup details page and pass in the record with the ProdGroupId Abcs.Pages().navigateToPage('com_oracle_abcs_fa_V7OhT_setupSalesCatalogsPage',
ContextualData.createRecordToEditContext({entityId: 'com.oracle.abcs.fa.V7OhT.setupSalesCatalogs', data: record}));
resolve();
To set up the Product links do the same thing.
- Drop at list and bind it to the Products child (ProductGroupProductSetup) of the Product Group.
- Set the action on the product name to this custom JavaScript:
var prodId = $com_oracle_abcs_fa_V7OhT_setupSalesCatalogs_ProductGroupProductSetupListArchetypeRecord.getValue('InventoryItemId');var record = new Record({'_breeze_system_id' : prodId});Abcs.Pages().navigateToPage('ProductDetail',
ContextualData.createRecordToEditContext({entityId: 'com.oracle.abcs.fa.xPiEu.products', data: record}));
resolve();
This assumes that you’ve already created the ProductDetail page by going to the list of pages, creating a new Page of type Detail, and binding it to the Product (/crmRestApi/resources/11.13.0.0/products) Business Object.

