> For the complete documentation index, see [llms.txt](https://docs.obto.co/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.obto.co/applications/client-policies.md).

# Client Policies

## How to create a Client Policy

A client policy is the controller for the UI Template. It controls what data is to be shown on UI Template by applying logics.&#x20;

In order to create a Client Policy, follow these steps: -&#x20;

1. On navigation, under Policies, go to Client Policies. You will see a list of all the Client Policies belonging to different applications.&#x20;
2. Click on ‘settings icon’ on top left corner and then click ‘new’.&#x20;
3. A form appears where you have to provide the following details: -&#x20;
4. Name - name of the Client Policy.&#x20;
5. Type: -&#x20;
6. Execute onload – client policy executes when the application loads.&#x20;
7. Execute on change – client policy executes when some form input changes in the                application.&#x20;
8. Script – The JavaScript code (Controller).&#x20;
9. Run On – client policies are meant for platform applications and applications outside the             platform.&#x20;
10. Native – Execute the client policy for the platform applications.&#x20;
11. Portal – Execute the client policy for outside applications.&#x20;
12. Click on ‘create’ button. That’s it, you have created the Client Policy for the application.&#x20;


---

# 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.obto.co/applications/client-policies.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.
