# Parent-child rebate rules

A child rebate [rule](/rebates/rules.md) allows you to create a parent-child relationship in which the result of a calculation for one rebate is applied to other rebates with additional conditions. The child automatically takes on the brackets of the parent, but you select the entities to include or exclude.

## Create the parent-child relationship <a href="#useparent-childrebaterules-createtheparent-childrelationship" id="useparent-childrebaterules-createtheparent-childrelationship"></a>

The relationship starts with the parent.

1. Identify the existing rule you want to use as the parent or [create a rule](/rebates/rules.md#create-rules) to use as the parent. Then set up that rule as required:
   * The brackets you set here will flow onto the child rules.
   * It’s useful to edit its name to reflect that it’s a parent. You might also want to add a description, so you and others can quickly understand the family connections when looking at the Rules page.

     <div align="left"><figure><img src="/files/ofUIMHaglnLgLXVtq3Y6" alt="image-20240501-023806.png" width="405"><figcaption></figcaption></figure></div>
2. Create a rule for the first child, then set up that rule:
   * The key setting is in the **Name and Scope** section, where you select **This rule is** > **Child**, then select the **parent** rule from the dropdown list.

     <div align="left"><figure><img src="/files/ab6HAhgQVCk8xt2SJpWu" alt="image-20240501-023845.png" width="489"><figcaption></figcaption></figure></div>
   * The bracket and other settings inherited from the parent rule are now unavailable.
   * Set inclusions or exclusions, if required. For example, you could use a parent rule to target a customer on their overall spend, and various child rules to apply those rebate amounts to a certain product or selection of products. For example, if a customer spends $10,000 overall, they unlock a 10% rebate through the parent rule. That 10% rebate is then applied to their $500 spend on Product A through the child rule. In this case, the child rebate amount is $50.
3. Create additional child rules as required.

## View the child rules belonging to a parent <a href="#useparent-childrebaterules-viewthechildrulesbelongingtoaparent" id="useparent-childrebaterules-viewthechildrulesbelongingtoaparent"></a>

Open the parent rule and expand the **Children** tab. Click a blue child link to open that rule’s setup.

<div align="left"><figure><img src="/files/zQ36YYtCIcL49nJMs5P4" alt="image-20240501-024101.png" width="563"><figcaption></figcaption></figure></div>

## Delete a parent rule <a href="#useparent-childrebaterules-deleteaparentrule" id="useparent-childrebaterules-deleteaparentrule"></a>

When you [delete a parent rule](/rebates/rules.md#delete-a-rule), you also delete all its child rules. This action cannot be reversed. You might prefer to [deactivate the parent rule](/rebates/rules.md#deactivate-a-rule) instead.<br>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.phocassoftware.com/rebates/rules/parent-child.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
