---
schema_version: "1"
id: 24edcc739015c59ab55082351f63bf37fc484e18b5406fe24fbfede766d66981
title: Configure the Constraint Model for Multisite
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/ind/264-0-0/ene_configure_constraint_model_multisite.md
canonical_url: https://help.salesforce.com/s/articleView?id=ind.ene_configure_constraint_model_multisite.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 353b3e408c98c983519b2a21519f16bddf975290a45c6866ac0304ccb17dde40
description: Configure product constraints and rules to ensure accurate product configuration at runtime.
products:
  - Energy and Utilities
release: "264"
---
# Configure the Constraint Model for Multisite

Configure product constraints and rules to ensure accurate product configuration at runtime.

## Configure Revenue Settings For Constraint Models

Enable the necessary runtime configuration settings and assign permission sets to users.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col style="width:100%"></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: Lightning Experience</td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: <strong>Enterprise</strong>, <strong>Unlimited</strong>, and <strong>Developer</strong> Editions</td></tr></tbody></table>

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small permission">
            <colgroup>
              <col style="width:50%">
              <col style="width:50%">
            </colgroup>
            <thead class="slds-text-title_caps ">
              <tr class="">
                <th scope="colgroup" class="slds-cell-wrap" colspan="2" style="text-align:center;vertical-align:top;" id="d12003e104">User Permissions Needed</th>
              </tr>
            </thead>
            <tbody>
              <tr class="">
                <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d12003e104 ">To create user profiles and users:</td>

                <td class="slds-cell-wrap" style="vertical-align:top;" headers="d12003e104 ">Energy &amp; Utilities Cloud Features</td>

              </tr>
            </tbody>
          </table>

1. From the **App Launcher**, find and select **Revenue Settings**.
2. Enable **Configure Products at Runtime**.
3. Enable **Set Up Configuration Rules and Constraints with Constraints Engine**.
4. Assign the **Product Configurator** permission set to all users, including admins and standard users.

## Create the Constraint Model for Multisite

Use the Salesforce CLI and Python to authenticate your org and generate the Constraint Modeling Language (CML) code.

**Prerequisites**

- Install [Salesforce CLI](https://developer.salesforce.com/tools/salesforcecli)
- Install Python
- Download the [create\_cml.py](https://resources.docs.salesforce.com/rel1/doc/en-us/static/misc/create_cml.py.zip) script

1. Authenticate with the Salesforce org.
    1. Run the following command (do not use the Lightning URL):
        
        sf auth:web:login --instance-url https://login.salesforce.com -a tgtOrg
    2. Complete the browser authentication process.
2. Generate the CML code.
    1. Run the following command:
        
        python3 create\_cml.py --product-class "Commodity Product Classification" --context-definition EUSalesTransactionContext
    2. Wait for the message **CML PIPELINE COMPLETED SUCCESSFULLY!**.

## Verify and Activate the Constraint Model

Review the generated constraint model for accuracy and activate the model version.

1. From the **App Launcher**, find and select **Constraint Models**.
2. Select the **EU Product Constraint** model.
3. Open the constraint model in CML Editor and verify that the **API Name (developerName)** is correct for all attributes, such as payment method, weighted distribution, and distribution region.
4. Activate the constraint model version.
    1. Click the **Constraint Model Versions** tab.
    2. Click **Sync**.
    3. If prompted, click **Confirm**.
    4. Save and activate the contraint model.
        
        ![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ind-energy_utilities-264-0-0-production-enus/520849e5-9b41-4bae-b97b-d269cc2fce83/images/icon_note.png)
        
        Note If you modify the default weighted distribution, you must manually update the total\_weight value in the CML and resync. The total\_weight value is the sum of the weighted distribution of all consumption-based child products. When introducing a new consumption-based child product, update the total\_weight with its weighted distribution value and define the product within the CML following the established pattern.