> For the complete documentation index, see [llms.txt](https://docs.appstrategy.com/apprules-r-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.appstrategy.com/apprules-r-documentation/samples/sample-projects/integration-and-automation/decision-table-customer-discount.md).

# Decision Table - Customer Discount

The Decision Table - Customer Discount project illustrates the appRules Evaluate Decision Table activity.

## Product & Hosting Options

#### Platform Product Availability

The workflow activities and other modules used in this sample project are available in the following appRules Platform products:

<table><thead><tr><th width="374"> Platform Product</th><th data-type="checkbox">Availability</th></tr></thead><tbody><tr><td>appRules Data Migration Engine</td><td>false</td></tr><tr><td>appRules Integration &#x26; Automation Engine</td><td>true</td></tr><tr><td>appRules Enterprise 360</td><td>true</td></tr></tbody></table>

#### Hosting & Execution Environment&#x20;

If you are running the On-Premise, Azure Marketplace or AWS Marketplace editions, the following hosting options supported by appRules are recommended for running this sample project:

<table><thead><tr><th>Hosting Option</th><th data-type="checkbox">Recommended for Project</th></tr></thead><tbody><tr><td>IIS</td><td>true</td></tr><tr><td>appRules Host Service</td><td>true</td></tr></tbody></table>

{% hint style="info" %}
Since the appRules Host Service is automatically installed and ready to go, it is recommended that you use it for evaluating this sample project.  Just point your browser to the appRules URL
{% endhint %}

&#x20;

{% hint style="info" %}
The completed project is available in the appRules **Samples** project database. Click the "Open" toolbar button on the appRules home page to select the "Decision Table - Customer Discount" project.
{% endhint %}

EvaluateDecisionTable is the only workflow activity required for configuring a decision table in appRules.  It can be accessed from the **Business Rules** module in the toolbox.

For simplicity, we have used a single activity in this sample project.  In an actual project, the EvaluateDecisionTable activity is used in conjunction with other activities.

Also, in this sample, the values to be evaluated are passed to the EvaluateDecisionTable activity from the arguments used to run the project.   In an actual project, the values passed to the activity typically come from record values in data sources such as CRM, ERP, Databases, etc.  The project can also be called via the appRules WebAPI.

{% hint style="info" %}
Note that the **View Execution Results** box of the EvaluateDecisionTable activity is checked to display the result when the activity is executed.  This is the practice for debugging appRules activities.  At deployment, the View Execution Results box is automatically deactivated if the project is not run in interactive mode.
{% endhint %}

You can experiment with this project by making changes and running the project to view results. No external data sources are required.

Define Conditions to be used in the decision table.

Define Actions to be used in the decision table.

Set up Conditions and Actions

Define Decision Conditions Items.

Define Decision Action Items.

Configure Condition and Action combinations.

Run the project directly and pass arguments to be used for evaluating the decision table.

View the Execution Results and notice that row 3 in the result table below meets the criteria as defined by the arguments passed to the project.

{% hint style="info" %}
The project can also be called via the appRules WebAPI.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.appstrategy.com/apprules-r-documentation/samples/sample-projects/integration-and-automation/decision-table-customer-discount.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
