--- title: "How do I create a compliance rule?" slug: "how-do-i-create-a-compliance-rule" updated: 2026-08-04T13:55:36Z published: 2026-08-04T13:55:36Z canonical: "support.lusid.com/how-do-i-create-a-compliance-rule" --- > ## Documentation Index > Fetch the complete documentation index at: https://support.lusid.com/llms.txt > Use this file to discover all available pages before exploring further. # How do I create a compliance rule? A compliance rule applies a sequence of grouping and filtering operations to your valued holdings, then checks the result against a limit you define. Familiarise yourself with how compliance rules, templates, and operations work before creating your own; [see understanding compliance rules in LUSID](/v1/docs/understanding-compliance-rules-and-templates). Provided you have suitable [access control permissions](/v1/docs/identity-management-and-access-control-iam), you can create a wide range of compliance rules to use in pre- and post-trade compliance runs. [See what compliance rules LUSID supports.](/v1/docs/what-compliance-rules-does-lusid-support) - Method 1: [Using the LUSID web app](/v1/docs/how-do-i-create-a-compliance-rule#using-the-lusid-web-app) - Method 2: [Using the LUSID API](/v1/docs/how-do-i-create-a-compliance-rule#using-the-lusid-api) ## ![Anchor](https://cdn.document360.io/d575ad81-c0ed-4980-bbd1-d59ac5c3de82/Images/Documentation/base64-converted-image-1785834530043.gif?sv=2026-02-06&spr=https&st=2026-11-04T02%3A02%3A13Z&se=2026-11-04T03%3A02%3A13Z&sr=c&sp=r&sig=yQaoaRDpZFDaPDo4n4Bz3g00WU2%2BLNCPuN689u1r%2FxI%3D)Using the LUSID web app ### Compliance wizard for supported templates We recommend using the **Compliance wizard** to create compliance rules for supported templates. This method guides you through every step of creating a compliance rule, from choosing your portfolio group to building your sequence of operations and the final pass/fail check. To get started: 1. Sign in to the [LUSID web app](https://www.lusid.com/app/home) and navigate to **Portfolio Management > Compliance Rules**. 2. Select **Create compliance rule with wizard**. ![](https://cdn.document360.io/d575ad81-c0ed-4980-bbd1-d59ac5c3de82/Images/Documentation/image-9FV6L5AJ.png?sv=2026-02-06&spr=https&st=2026-11-04T02%3A02%3A13Z&se=2026-11-04T03%3A02%3A13Z&sr=c&sp=r&sig=yQaoaRDpZFDaPDo4n4Bz3g00WU2%2BLNCPuN689u1r%2FxI%3D) 3. Follow the instructions on the screen. If you need more detail than the wizard provides, see [understanding compliance rules in LUSID](/v1/docs/understanding-compliance-rules-and-templates). ![](https://cdn.document360.io/d575ad81-c0ed-4980-bbd1-d59ac5c3de82/Images/Documentation/image-XG71L16K.png?sv=2026-02-06&spr=https&st=2026-11-04T02%3A02%3A13Z&se=2026-11-04T03%3A02%3A13Z&sr=c&sp=r&sig=yQaoaRDpZFDaPDo4n4Bz3g00WU2%2BLNCPuN689u1r%2FxI%3D) ### Creating a rule without the wizard You can also use the LUSID web app to create compliance rules from any supplied or custom template. To do this: 1. Sign in to the [LUSID web app](https://www.lusid.com/app/home) and navigate to **Portfolio Management > Compliance Rules**: ![](https://cdn.document360.io/d575ad81-c0ed-4980-bbd1-d59ac5c3de82/Images/Documentation/image(771).png?sv=2026-02-06&spr=https&st=2026-11-04T02%3A02%3A13Z&se=2026-11-04T03%3A02%3A13Z&sr=c&sp=r&sig=yQaoaRDpZFDaPDo4n4Bz3g00WU2%2BLNCPuN689u1r%2FxI%3D) 2. Select **Create compliance rule**. ![](https://cdn.document360.io/d575ad81-c0ed-4980-bbd1-d59ac5c3de82/Images/Documentation/image(772).png?sv=2026-02-06&spr=https&st=2026-11-04T02%3A02%3A13Z&se=2026-11-04T03%3A02%3A13Z&sr=c&sp=r&sig=yQaoaRDpZFDaPDo4n4Bz3g00WU2%2BLNCPuN689u1r%2FxI%3D) 3. Supply the following: - A **Scope** and **RuleID** that together uniquely identify the compliance rule. > [!NOTE] > Note > > The default **Scope** is `PMS`. An enabled rule in this scope is automatically included in pre-trade compliance runs in the **Order Blotter**. - A friendly **Name** and **Description** for the rule. - The **Portfolio Group** that the rule applies to. - Whether the rule should be enabled as soon as it’s created. 4. Select a **Template** and **Template variation**. Each template defines a sequence of operations. You supply the values those operations use. You can read a [variation’s](/v1/docs/understanding-compliance-rules-and-templates#how-does-lusid-apply-a-compliance-rule-to-multiple-portfolios) **Description** to learn more about it. ![](https://cdn.document360.io/d575ad81-c0ed-4980-bbd1-d59ac5c3de82/Images/Documentation/compliance rule template and variant.png?sv=2026-02-06&spr=https&st=2026-11-04T02%3A02%3A13Z&se=2026-11-04T03%3A02%3A13Z&sr=c&sp=r&sig=yQaoaRDpZFDaPDo4n4Bz3g00WU2%2BLNCPuN689u1r%2FxI%3D) 5. Provide the required values for the operations in your rule. You must specify a reference list for certain operations; [see how to create a reference list](/v1/docs/using-reference-lists-in-lusid). For example, to create a rule checking that no portfolio exceeds 20% exposure to any one country, you might select the **PercentCheck** template with its **standard** variation. You could then supply the following values to create your rule: ![](https://cdn.document360.io/d575ad81-c0ed-4980-bbd1-d59ac5c3de82/Images/Documentation/compliance rule operations.png?sv=2026-02-06&spr=https&st=2026-11-04T02%3A02%3A13Z&se=2026-11-04T03%3A02%3A13Z&sr=c&sp=r&sig=yQaoaRDpZFDaPDo4n4Bz3g00WU2%2BLNCPuN689u1r%2FxI%3D) 6. Click **Save** to create your rule. [See how to run pre-trade compliance and view the results.](/v1/docs/how-do-i-perform-a-pre-trade-compliance-run-and-view-the-results) ## ![Anchor](https://cdn.document360.io/d575ad81-c0ed-4980-bbd1-d59ac5c3de82/Images/Documentation/base64-converted-image-1785834530043.gif?sv=2026-02-06&spr=https&st=2026-11-04T02%3A02%3A13Z&se=2026-11-04T03%3A02%3A13Z&sr=c&sp=r&sig=yQaoaRDpZFDaPDo4n4Bz3g00WU2%2BLNCPuN689u1r%2FxI%3D)Using the LUSID API You can create and manage compliance rules programmatically by calling the [UpsertComplianceRule](https://www.lusid.com/docs/api/lusid/endpoints/compliance/UpsertComplianceRule) endpoint. Use the LUSID API when no existing template covers the rule you need. You can create a custom template, then create rules from it. If you are creating a rule from a FINBOURNE template, we recommend using the [LUSID web app](/v1/docs/how-do-i-create-a-compliance-rule#using-the-lusid-web-app), which shows you exactly which parameters the variation you have chosen requires.