# Creating AARI Requests

[AARI](https://www.automationanywhere.com/products/aari), the Automation Anywhere Robotic Interface, is a solution for creating business processes with seamless human and bot coordination

With PixieBrix, you can create an AARI Request from any web page. There are two ways to create an AARI request:

* Create an AARI Request in a new browser tab
* Create an AARI Request via API

### Locating the AARI Process Information

#### Locating the Process Id

Find the process id of your AARI process:

<figure><img src="https://2274778196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fq123bF1HPQPV35s5vHa1%2Fuploads%2FNxTNVghU4BUVC55ia5tz%2FUntitled%20(94).png?alt=media&#x26;token=19af20f1-574e-42d5-b321-418146bfa74f" alt=""><figcaption></figcaption></figure>

#### Locating Field Element Ids

Find the Element Ids of the fields you’d like to populate. In the Automation Anywhere form editor, the Element Id is available in the Properties pane:

<figure><img src="https://2274778196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fq123bF1HPQPV35s5vHa1%2Fuploads%2FNFZCI8JgX3yL9PCVS2NK%2FUntitled%20(95).png?alt=media&#x26;token=9dfa2d4b-7d51-40d3-9e0f-078618c66fff" alt=""><figcaption></figcaption></figure>

### Creating an AARI Request in a New Browser Tab

#### Creating the Request in a New Tab

To create the request, add the [Create AARI Request in a New Tab](https://www.pixiebrix.com/marketplace/04220e4f-04d7-43c1-8e51-57bd71d4e51e/) brick from the public marketplace to any mod:

{% hint style="info" %}
This brick uses an integration definition to retrieve the Control Room URL. It does not make any API calls to the Automation Anywhere / AARI
{% endhint %}

#### Pre-filling Request Fields

1. Add the [Set Input Value](https://www.pixiebrix.com/marketplace/51c95696-f0ad-4cc8-acab-e9b351e4e9ca/) brick
2. Set the Target to “Target Tab (target)”. This will tell PixieBrix to run the brick in the context of the opened AARI request tab

   &#x20;**⚠️ PixieBrix must have access to AARI URLs for your Control Room in order to form fill values on the opened page**
3. For each input you want to pre-fill, add an inputs item:

   * `selector`: use [a CSS attribute begins with selector](https://www.w3schools.com/cssref/sel_attr_begin.asp) using the Element Id of the field. For example: `[id^="TextBox0-"] input`
   * `value`: the value to provide to the input, can be a literal, variable, or string template

   <figure><img src="https://2274778196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fq123bF1HPQPV35s5vHa1%2Fuploads%2F73TZd2MSHT8KPDSHZwKj%2FUntitled%20(96).png?alt=media&#x26;token=8c92c81a-6444-4259-aa40-b7162a1d55d6" alt="" width="375"><figcaption></figcaption></figure>

#### Waiting for the AARI Form to Load

When the AARI page loads, the AARI request form does not always load instantaneously.

To make the form fill more reliable, use the “Wait for a DOM element” brick to wait for the form to initialize before filling the value:

1. Add the [Wait for a DOM element brick](https://www.pixiebrix.com/marketplace/e0defa25-5d8f-4cda-9426-864a8b0807aa/)
2. Set the Target to “Target Tab (target)”
3. Indicate the selector `.case-form` for the selector

<figure><img src="https://2274778196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fq123bF1HPQPV35s5vHa1%2Fuploads%2F0QVCCxp66IwytMuBIJgB%2FUntitled%20(97).png?alt=media&#x26;token=b0843953-a7e0-4a88-8a0f-ca47b7d5a24f" alt=""><figcaption></figcaption></figure>

### Creating an AARI Request via API

{% hint style="info" %}
If you are using Automation Anywhere Community Edition, calling an API will log you out of your Automation Anywhere browser session
{% endhint %}

Add the [Create AARI Request Brick](https://www.pixiebrix.com/marketplace/a37b06ce-d5dc-4b20-b569-ed40b05db214/) from the PixieBrix Marketplace. Configure the brick Input with the AARI Process Id and Element Ids:

<figure><img src="https://2274778196-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fq123bF1HPQPV35s5vHa1%2Fuploads%2FAt569tFcFptWOmrP6ZJw%2FUntitled%20(98).png?alt=media&#x26;token=00d7853c-2c17-4a52-aa40-ecdd115c8cf4" alt=""><figcaption></figcaption></figure>

#### Providing Inputs

Currently the following input types are supported:

* String

#### Brick Output

The Create AARI Request Brick returns the id of the new AARI request. The id can be used to fetch the status of the AARI request


---

# 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.pixiebrix.com/integrations/automation-anywhere/creating-aari-requests.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.
