Retrieve Child Items Using TMF620 API

Create custom metadata and update the DataRaptor Transform in Salesforce for the specific resource to retrieve child items from TMF620 Product Catalog Management API resources. By default, the API returns the parent-bundled items in the response.

  • With these changes, the GET and POST APIs for all TMF 620 API resources return the child items in the responses.
  • To retrieve child products information, set Specification Sub Type = Bundle for the product specifications or offerings created through Vlocity Product Designer or Console App.
  1. From Setup, in the Quick Find box, enter Metadata, and then click Custom Metadata Types.
  2. Click Manage Records associated with Vlocity Integration Setting.
  3. Click New.
  4. Create the TMForumDefaultAttributeCategory custom metadata with these values:
    • Label: TMForumDefaultAttributeCategory
    • Type of API: TMForum
    • API Name: TMForumDefaultAttributeCategory
    • Key: AttributeCategoryName
    • Default Value: TMForum
    • Vlocity Integration Setting Name: TMForumDefaultAttributeCategory
  5. Create the TMForumProductSpecificationUseChildForBu custom metadata for the productSpecification resource with these values:
    • Label: TMForumProductSpecificationUseChildForBu
    • Type of API: TMForum
    • API Name: TMForumProductSpecification
    • Key: UseChildForBundleProduct
    • Default Value: true
    • Vlocity Integration Setting Name: TMForumProductSpecificationUseChildForBu
  6. Create the TMForumProductOfferingUseChildForBu custom metadata for the productOffering resource with these values:
    • Label: TMForumProductOfferingUseChildForBu
    • Type of API: TMForum
    • API Name: TMForumProductOffering
    • Key: UseChildForBundleProduct
    • Default Value: true
    • Vlocity Integration Setting Name: TMForumProductOfferingUseChildForBu
  7. Create the TMForumAllFieldstoQuery custom metadata, which is required for both the productSpecification and productOffering resources, with these values:
    • Label: TMForumAllFieldstoQuery
    • Type of API: TMForum
    • API Name: TMForum
    • Key: AllFieldstoQuery
    • Default Value: true
    • Vlocity Integration Setting Name: TMForumAllFieldstoQuery
  1. Update the TMFTMForumProductSpecificationResponseTransform DataRaptor Transform for the productSpecification resource.
    1. On the OmniStudio DataRaptors tab in the OmniStudio app, access the TMFTMForumProductSpecificationResponseTransform DataRaptor Transform.
    2. Modify the mapping for the bundledProductSpecification node to use the ChildProductId__r field for the Name and ID properties.
      • Change the input JSON path from productChildItems:vlocity_cmt__ParentProductId__r:Name to productChildItems:vlocity_cmt__ChildProductId__r:Name.
      • Change the input JSON path from productChildItems:vlocity_cmt__ParentProductId__r:vlocity_cmt__GlobalKey__c to productChildItems:vlocity_cmt__ChildProductId__r:vlocity_cmt__GlobalKey__c.
    3. Modify the formula for productChildItems:href to use the ChildProductId field instead of the ParentProductId field.
      • Change the formula from IF(productChildItems:Id != null, CONCAT(requestUrl,'productSpecification/',productChildItems:vlocity_cmt__ParentProductId__r:Id), null) to IF(productChildItems:Id != null, CONCAT(requestUrl,'productSpecification/',productChildItems:vlocity_cmt__ChildProductId__r:Id), null).
  2. Update the TMFTMForumProductOfferingResult DataRaptor Transform for the productOffering resource.
    1. On the OmniStudio DataRaptors tab in the OmniStudio app, access the TMFTMForumProductOfferingResult DataRaptor Transform.
    2. Modify the mapping for the bundleProductOffering node to use the ChildProductId__r field for the Name and ID properties.
      • Change the input JSON path from productChildItems:vlocity_cmt__ParentProductId__r:Name to productChildItems:vlocity_cmt__ChildProductId__r:Name.
      • Change the input JSON path from productChildItems:vlocity_cmt__ParentProductId__r:vlocity_cmt__GlobalKey__c to productChildItems:vlocity_cmt__ChildProductId__r:vlocity_cmt__GlobalKey__c.
    3. Modify the formula for productChildItems:href to use the ChildProductId field instead of the ParentProductId field.
      • Change the formula from IF(productChildItems:Id != null, CONCAT(requestUrl,'productOffering/',productChildItems:vlocity_cmt__ParentProductId__r:Id), null) to IF(productChildItems:Id != null, CONCAT(requestUrl,'productOffering/',productChildItems:vlocity_cmt__ChildProductId__r:Id), null).