> For the complete documentation index, see [llms.txt](https://manual.firstresonance.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://manual.firstresonance.io/automations/set-close-by-run-step-on-issue-creation.md).

# Set Close by Run Step on Issue Creation

Automatically set a run step in the "resolve issue by step" field on ION Issues. Configurable as either the next run step or the last step in the run.

**TERMS TO KNOW:**

*Term:* Run Step ID & "issue close by step"

*Definition:* The run step that the issue resolve by will be set to.

**USE CASE:**

Issues in ION are a key piece to any manufacturing systems ability to trace and provide quality product. The feedback that results from issue resolutions drives continuous improvement activities.

This automation ensures that issues are closed out either before runs continue with subsequent run steps or are completed in full. This leads to better issue resolution rates, faster root causing actions, and will force that an issue is resolved / will be noticed before teams lose context of the issue. The automation will be triggered when an issue is created on a run. Upon deploying this automation, you have the choice between two configurations. For setting the run step to resolve the issue as the next step choose the next step configuration. For setting the run step to resolve the issue as the last step in the run choose the last step configuration. See the details below for an example of these two deployments.

**CONFIGURATIONS:**

**"Next Step" Configuration:** This style of configurations will assign the close issue by Run Step ID to the next step. Example: If the issue is created on step 2 of 5, and step 3 is in state CANCELED, the Run Step ID assigned will be that from step 4. If all subsequent run steps are in state CANCELED then a new run step will be created in status REDLINE.

**"Last Step" Configuration:** This configuration will assign the issue close by Run Step ID as the last step in the run. If the last step in the run is in CANCELED state then a new run step will be created in status REDLINE.

<figure><img src="https://3615148728-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LkRqYp6lJhwxjYdzYG8%2Fuploads%2Fgit-blob-d73736be00ae12748c9a91eb023bc0092f69ea15%2FScreenshot%202024-03-05%20at%209.33.33%E2%80%AFAM.png?alt=media" alt=""><figcaption><p>Configurations Visual</p></figcaption></figure>

**PROCESS:**

1. In ION, navigate to integrations, and go to the marketplace. Activate the "Set Close by on Issue Creation" integration. Go to the configuration.
2. Choose your configuration option, "Next Step" or "Last Step".
3. Follow prompts to input your API credentials, **clientId** and **clientSecret**. If you need to setup your [API credentials look here](/api/api-keys.md).
4. Complete the deployment by clicking finish!

**VERIFICATION:**

Where can I view the resultant close (resolve) by step?

See the example bellow where on the right hand side of the issue page there is a section titled "Resolve issue by step". Clicking on this Run Step will also populate the Run Step ID in your URL as follows.

<figure><img src="https://3615148728-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LkRqYp6lJhwxjYdzYG8%2Fuploads%2Fgit-blob-204efb970237070c4dc4ba1dd13cee6548d10691%2Fimage.png?alt=media" alt=""><figcaption><p>Result of the "Next Step Configuration" being used where an issue on the third step get set to be resolved by the fourth step.</p></figcaption></figure>

Run Step ID that issue must be closed by: 37441

<figure><img src="https://3615148728-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LkRqYp6lJhwxjYdzYG8%2Fuploads%2Fgit-blob-069a6b59ec8f2d5b0dee8f878712d516d8795faa%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>


---

# 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://manual.firstresonance.io/automations/set-close-by-run-step-on-issue-creation.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.
