---
sourceDocument: Brazil Sales Customer Relationship Management
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/order-management

 Release :

    - brazil

ft:locale :

    - en-US

ft:publication_title :

    - Brazil Sales Customer Relationship Management

ft:clusterId :

    - omgmt

bundleId :

    - omgmt

workflow :

    - Customer and Industry


---

# The On BOM Response enrichment

# The On BOM Response enrichment {#ariaid-title1}

Release version: Brazil  
Updated March 12, 2026  
![](https://www.servicenow.com/docs/portal-asset/ico-clock) 3 minutes to read
Summarize  
![AI sparkle icon](https://servicenow.com/docs/portal-asset/ai-sparkle-icon) Summarized using AI  
This content was generated using new OpenAI-powered functionality. Results are provided on an as is basis and are not guaranteed to be accurate or complete.  

## Summary of The On BOM Response enrichment

The On BOM Response enrichment in ServiceNow CPQ allows customers to manipulate ProductList items whenever there is an update to the bill of materials (BOM).
It is enabled by default and is designed to work with product rules and actions within the CPQ environment.
This enrichment provides a mechanism to dynamically adjust product details such as pricing or attributes based on updates to the BOM.
Show full answer Show less  

## Key Features

* **ProductList manipulation:** Enables looping through products in the BOM to update prices or other product attributes dynamically based on conditions.
* **External REST service integration:** Supports calling external APIs (via GET or POST) to retrieve data like customer-specific rates, which can then be applied to adjust product pricing within the BOM.
* **Prevention of infinite loops:** The enrichment operates on the rules engine BOM (the BOM after product rules are applied) rather than the enriched BOM itself to avoid recursive updates causing infinite loops.
* **Flexible use cases:** Can perform static or dynamic price adjustments, alter product attributes based on BOM conditions, or remove line items from the BOM.

## Practical Considerations for ServiceNow Customers

* The CPQ environment must have product action rules configured for the enrichment to process ProductList items effectively.
* Because the enrichment works on the rules engine BOM, changes made in the enrichment script may reoccur on subsequent BOM updates if conditions persist, especially if external data changes with each call.
* Using external APIs for pricing adjustments requires consistent responses to avoid repeated changes on BOM refreshes.

## Expected Outcomes

By leveraging the On BOM Response enrichment, customers can:

* Automatically and dynamically adjust product pricing in response to BOM updates, improving pricing accuracy and responsiveness.
* Integrate external data sources into pricing or BOM logic, enabling personalized or customer-specific pricing models.
* Modify or remove BOM line items based on business rules or external conditions, enhancing BOM flexibility and relevance.  
You can use this enrichment to work with ProductList items whenever there is an update to the bill of materials.

The On BOM Response enrichment is enabled by default in environments and can be used to manipulate items in the ProductList whenever there is an update to the bill of materials (BOM).  
Note:  
The ServiceNow CPQ environment must include rules with product actions, or there will be nothing for the enrichment to loop through.

In the following sample, the On BOM Response enrichment loops through products and changes the price of a product.

    //Loop over products and change price of a product
    let dealProduct = cfg.blueMoonSelected;
    if (dealProduct == true) {
            for(var prod of ProductList) {
                    let price = prod.price * .8;
                    prod.price = price;
            }
    }

On BOM Response enrichments may request external REST services via GET or POST.

In the following sample script, the On BOM Response enrichment uses an external connection to query a powerPricing API with customer data. With the customer-specific rate data retrieved from the service, the enrichment
adjusts the pricing of existing ProductList records.

    var powerInputs = {"membershipCode":cfg.eCMembershipCode, "icp":cfg.eCICPNumber};
    let powerResponse = External.powerPricing(powerInputs);
    let dailyCharge = 0; let ratesArr = [];

    if(powerResponse.status == 200) {
    	for(var record of powerResponse.body) {
    		if(record.chargeType == cfg.expectedUsage) {
    			dailyCharge = record.dailyCharges;
    			ratesArr = record.rates;
    		}
    	}
    	for(var prod of ProductList) {
    		if(prod.id=="electricBillEstimator") {
    			let addedPrice = dailyCharge * cfg.serviceDurationInDays;
    			prod.price = addedPrice;
    		}
    			if(prod.id=="Standard Rate" || prod.id=="Low Rate") {
    			prod.price = dailyCharge;
    		}
    	}
    	for(var rateVal of ratesArr) {
    		ProductList.id = "Additional Charge Per KWH: " + rateVal.name;
    		ProductList.quantity = 1;
    		ProductList.bomType = "Manufacturing";
    		ProductList.orderNumber = 2;
    		ProductList.price = rateVal.rate;
    		ProductList.notes = rateVal.measure;
    		ProductList.parentProduct = "electricBillEstimator";
    		ProductList.next();
    	}
    }

    return ProductList;

## The difference between the rules engine BOM and the enriched BOM {#enrichments_on_bom_response_scripts__difference_between_rules_engine_bom_and_enriched_bom}

There are two versions of the BOM during runtime: the rules engine BOM, which is based on the results of product rules during runtime, and the enriched BOM, which is the result of the BOM enrichment.

The BOM enrichment's ProductList object (referenced in the script) is the result of the rules engine BOM, not the enriched BOM. This is to make sure there are no infinite loops. Suppose that the script were to
reference its own ProductList that it returns, and the script were set up to increase the price of certain objects by a percentage on BOM update. In this case, the next time the contents of the BOM were
updated, the price increase would happen again and again.

To prevent this situation, the enriched BOM is not referenced by any rule or enrichment other than the validation enrichment's ProductList. While this makes sure that the BOM enrichment can function outside the
rules engine, it also means that if a condition is met in the BOM enrichment, those conditions can be met again the next time the BOM is updated, because any change to the BOM in the BOM enrichment script
that stops that condition will not be referenced.

With external connections, this is not a problem as long as the response is consistent. However, if the response changes when fired multiple times, such as when generating a string or saving a certain time, it
will update each time the BOM is updated.

The BOM Response enrichment might be used to:

* dynamically change the price of products in the BOM. This can be either a static or dynamic change rate, such as a shipping fee being static and taxes being dynamic.
* change attributes of products in the BOM that are reliant on some condition in the BOM, such as the quantity of free stickers given out once $100+ of tax has been quoted.
* remove a line item from the BOM.
{#enrichments_on_bom_response_scripts__ul_eq2_bxg_dhc}

