---
sourceDocument: Australia Sales Customer Relationship Management
sourceDocumentLink: https://www.servicenow.com/docs/r/australia/order-management

 Release :

    - australia

ft:locale :

    - en-US

ft:publication_title :

    - Australia Sales Customer Relationship Management

ft:clusterId :

    - omgmt

bundleId :

    - omgmt

workflow :

    - Customer and Industry


---

# Create an external connection

# Create an external connection {#ariaid-title1}

Release version: Australia  
Updated March 12, 2026  
![](https://www.servicenow.com/docs/portal-asset/ico-clock) 2 minutes to read  
Create an external connection in ServiceNow CPQ to enable enrichments to retrieve data from an external system for use in configuration rules.

## Before you begin

Role required: admin

## About this task

External connections are used in configuration rules only. They can only be called from an enrichment script. After you configure an external connection, reference it in your enrichment script using
`External.`<var class="keyword varname">connectionName</var>`(inputs)`, where <var class="keyword varname">connectionName</var> is the unique name of the connection.

Note:  
To call an external system from a transaction rule instead, add a connection. For more information, see [Create a connection for ServiceNow Quote Experience calls](https://www.servicenow.com/docs/SpgMPg0X6IB6utNS~_y8Gg "Add a connection in ServiceNow CPQ to define the host, path, and authentication credentials used when ServiceNow Quote Experience calls an external system during a transaction.").

## Procedure

1. Navigate to AllCPQ AdministrationUtilitiesExternal Connections.  
2. Select +New to create a new external connection.
3. In the Authentication type field, select the credential method that the external system requires, then complete the fields for that authentication type.

   | Authentication type | Action |
   | No authentication | No additional fields are required. The external connection calls the API without credentials. |
   | Bearer token | In the Authentication token field, enter the bearer token provided by the external service. |
   | OAuth - Client credentials flow | Complete the following fields: * Client ID: Client identifier created for ServiceNow CPQ with the authorization server. * Client secret: Tokenized reference to the client secret. The actual value is stored in the GCP secret store. In development environments, the value is stored directly. * Token URL: URL of the authorization server where ServiceNow CPQ exchanges the client ID and secret for an access token. * Scope: Scopes to include in the token request. This field is available only when OAuth - Client credentials flow is selected in the Authentication type field. |
   |-|-|

4. In the Path field, enter the path to append to the host URL, including any parameter variables for dynamic segments.  
   Use double curly braces to define a parameter variable in the path. For example:

       /v4/latest/{{inputVariable}}

   In your enrichment script, pass the variable as a key-value pair in the inputs object and wrap the value in `encodeURIComponent()` to ensure the value is URL-safe:

       let inputs = {"inputVariable": encodeURIComponent(cfgRequest.baseCurrency.value)};
       let results = External.exchangeRatesAPI(inputs);

5. In the Timeout field, enter the maximum time in milliseconds that ServiceNow CPQ waits for a response from the external system.  
   Start with 500 milliseconds. If the external connection regularly exceeds this limit, increase the value, keeping in mind that higher timeouts may slow the end-user configuration experience.
6. Select Save.

## Result

The external connection is saved and available to call from enrichment scripts.

## BOM enrichment using an external pricing connection

The following on-BOM-response enrichment calls a `powerPricing` external connection to retrieve customer-specific rate data and apply it to `ProductList` records. The connection accepts two input
variables --- `membershipCode` and `icp` --- and returns a pricing response that the script uses to set prices on individual products.

    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;

**Related concepts**   

* [Set up External connections for configuration rules](https://www.servicenow.com/docs/y8G8h6MfDzeLAm_GbsmE1g "External connections enable enrichments in ServiceNow CPQ to retrieve data from systems outside ServiceNow CPQ for use in configuration rules, such as fetching third-party pricing or product attributes during a configuration.")

*[\>]: and then


