> For the complete documentation index, see [llms.txt](https://docs.ins-pi.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ins-pi.com/command/get-the-app/future-state-approvals.md).

# Set up approvals for planned records

Register the approval consumer so YouDesign Command can ask for approval before a planned record becomes real.

{% hint style="info" %}
You need the **admin** role on the instance.
{% endhint %}

In YouDesign Command, a planner can turn a planned record into a real one. A Command administrator can require approval for that, per record type. Approval needs one record on the instance first: the approval consumer that ties these requests to the code that applies them. Do this once per instance, after installing or upgrading to a release that includes it.

Without it, every record type set to **Approval** falls back to the planner's own create rights, and **Global Settings > General** says *Approvals for this are not set up on this instance*.

## Before you start

* The release that adds **Make current** is installed. It includes the Script Includes `FSRMaterializeApprovalExecutor` and `FSRMaterializeRequest`.

## Steps

1. In ServiceNow, open **Scripts - Background** (filter navigator: `Scripts - Background`).
2. In **in scope**, choose **YouDesign Command** (`x_inpgh_upmx`).
3. Paste this script and click **Run script**:

   ```javascript
   new x_inpgh_upmx.YCMApproval().registerConsumer(
       'fsr_materialize',
       'Make a Future State plan current',
       'FSRMaterializeApprovalExecutor',
       JSON.stringify([{ key: 'future_of_class', label: 'Class, as listed in the setting', type: 'string' }])
   );
   ```

Running it again is safe: it updates the existing record and leaves it active.

## Check it worked

1. Open the table `x_inpgh_upmx_approval_consumer.list` and find the row with **Token** `fsr_materialize`. It is **Active**, and its **Callback** is `FSRMaterializeApprovalExecutor`.
2. In the portal, open **Global Settings > Approvals** and click **Add Policy**. **Make a Future State plan current** is offered as a **Consumer**.

## Reference

| Name              | Technical name                                                  | Purpose                                                                                                                                        |
| ----------------- | --------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
| Approval consumer | `fsr_materialize` in `x_inpgh_upmx_approval_consumer`           | Ties approval requests for planned records to the code that applies them                                                                       |
| Approval executor | `FSRMaterializeApprovalExecutor`                                | Makes the plan real when its request is approved, and describes the request to approvers                                                       |
| Setting           | `fsr.materialize_entitlement` in `x_inpgh_upmx_global_settings` | Per record type: `create_rights` or `approval`, with `*` as the default. Edited in **Global Settings > General**                               |
| Scope attribute   | `future_of_class`                                               | The record type a request is scoped by: the one listed in the setting that decided, so a policy for a type also covers its more specific types |

## Related

* [Global Settings](https://docs.ins-pi.com/command/administration/global-settings.md#require-approval-for-a-record-type)
* [Future State Repository](https://docs.ins-pi.com/command/features/future-state-repository.md)


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.ins-pi.com/command/get-the-app/future-state-approvals.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
