# MuleSoft

![Mulesoft.svg](https://assets.relyanceuat.xyz/images/docs/7120889538573/7119857623309.svg)
MuleSoft is a web-based SaaS platform that provides integration software for connecting applications, data, and devices across on-premises and cloud computing environments.

In order to integrate MuleSoft with Relyance AI you will need a MuleSoft **Client ID** and **Client Secret**.

#### In MuleSoft:

1. Login to your MuleSoft account.
2. Expand the dropdown menu in the top left-hand corner.
3. Click the **Access Management** link under the **Management Center** section.

![MuleSoft-1.png](https://assets.relyanceuat.xyz/images/docs/7120889538573/7120895257101.png)

4. Click **Connected Apps** in the left-hand navigation.
5. Click **Create App**.
6. Create the app with the following settings:

 **Name**: Relyance AI
 **Type**: App acts on behalf of a user
 **Grant types**:
 Authorization Code
 Refresh Token
 **Website URL**: [https://www.relyance.ai](http://example.com/)
 **Redirect URIs**: [https://root.relyance.ai/api/oauth2](https://root.relyance.ai/api/oauth2)
 **Who can use this application?**: Members of this organization only
 **Scopes**:
 Background Access
 Read-Only Access

 ![MuleSoft-2.png](https://assets.relyanceuat.xyz/images/docs/7120889538573/7120895255949.png)

7. Click **Save**.
8. Copy the **Client ID** and **Secret** to be used in Relyance AI.

![MuleSoft-3.png](https://assets.relyanceuat.xyz/images/docs/7120889538573/7120918470029.png)

#### In the Relyance AI application:

1. Login to your Relyance account.
2. Navigate to the **Settings** Menu in the bottom left-hand side.
3. Select **Integrations**.
4. Click on the **Vendor Integration** tab.
5. Find the **MuleSoft** integration card and click it to open its connections.
6. Under **Authentication Method**, choose **Oauth2 / App Token**.
8. Paste the **Client ID** and **Client Secret** into their respective fields.

![MuleSoft-5.png](https://assets.relyanceuat.xyz/images/docs/7120889538573/7120918392717.png)

9. Click **Authenticate**.
10. You will be brought to the MuleSoft page to allow the new Relyance app permissions to connect. Follow the authorization flow.

![MuleSoft-4.png](https://assets.relyanceuat.xyz/images/docs/7120889538573/7120918483981.png)

11. At this point, you should see the following result on the Vendor Integrations page:

![MuleSoft-6.png](https://assets.relyanceuat.xyz/images/docs/7120889538573/7120895058701.png)

12. Congratulations, you are now connected to **MuleSoft**.

<!-- failure-modes:begin (generated from the integration catalog; do not hand-edit) -->

## If the connection reports Connected but returns nothing

These are the ways this integration comes back empty without reporting an error. Generated from the integration catalog, so it tracks what the connection actually asks for.

1. **Authorised, then empty.** The connection carries an authorisation, not a password: it stops returning data if the account that granted it loses access, its own permissions narrow, or the grant is revoked at the vendor. None of that reports an error here -- the connection keeps its last status until the next scan.
2. **A credential rotated at the vendor is not picked up here.** **Client Secret** is stored when you save the connection, so regenerating the value at the vendor breaks the next scan until it is re-pasted here. Recording the expiry on the connection means Relyance warns you before it lapses.

<!-- failure-modes:end -->

<!-- terraform-examples:begin (generated from the integration catalog; do not hand-edit) -->

## Manage this integration with Terraform

Connections for this integration can be managed as code with the [Relyance Terraform provider](https://registry.terraform.io/providers/Relyance/relyance/latest). Non-secret fields go in `auth.params`; secret fields go in `auth.secrets_wo`, which is write-only — never stored in Terraform state. Rotate secrets by bumping `auth.secrets_wo_version`.

The **OAuth (browser authorization)** method uses a browser authorization flow, so the connection is created in the Relyance app. Manage it in Terraform afterwards by importing it (`terraform import relyance_integration_connection.example salesforce_mulesoft/<connection_id>`) or reading it with the `relyance_integration_connection` data source.

<!-- terraform-examples:end -->
