---
title: "User Guide"
canonical: "https://help.agiloft.com/space/HELP/43714793/User+Guide"
format: markdown
---
For detailed guidance on adding the Agiloft connector and configuring it in Mulesoft, see Mulesoft's [documentation about configuring connectors](https://docs.mulesoft.com/connectors/introduction/intro-connector-configuration-overview) as well as the information below:

# Installation

Download the release JAR file and load it into your Anypoint Studio Maven repository. Once present, you can add a dependency to your pom.xml to incorporate the module.

```
<dependency>  
  <groupId>org.mule.connectors</groupId>  
  <artifactId>agiloft-connector</artifactId>  
  <version>1.0.0</version>  
  <classifier>mule-plugin</classifier>  
</dependency>  
```

# Authorization

Determine how you will provide connection to Agiloft. There are two ways you can choose to authorize users: 

- **Basic Authorization**: This authorization process uses the standard login and password combination you use for Agiloft.
- **OAuth2**: This authorization process uses a previously created OAuth record entry in Agiloft. See the [Using OAuth2 to Access REST API](https://agiloft-public.atlassian.net/wiki/spaces/HELP/pages/43716464) for more information.

# Usage

The Agiloft connector component can be placed into your flow like any other component. The following is a list of the operations you can use.

| **Name** | **Description** | **Parameters** |
| --- | --- | --- |
| Query | Run queries on tables and fields using the query condition parameter as the main operator. | Table Name - Agiloft logical table name<br>Fields List - list of logical field names<br>Query condition - expression for filtering records<br>Saved Search Name - Agiloft predefined saved search name<br>Records limit - set the max number of records that can return<br>Page number - number of selected page number, if result was limited by records |
| Create | Create a new record with specified field values. | Table Name - Agiloft logical table name<br>Field Values - A map of fields and values that will create the new record |
| Update | <span style="color: #172b4d">Update a record in Agiloft with new field values.</span> | <span style="color: #172b4d">Table Name - Agiloft logical table name</span><br><span style="color: #172b4d">ID - record ID to update</span><br><span style="color: #172b4d">Field Values - A map of fields and values to update</span> |
| Delete | <span style="color: #172b4d">Delete a record in Agiloft.</span> | <span style="color: #172b4d">Table Name - Agiloft logical table name</span><br><span style="color: #172b4d">ID - record ID to delete</span> |
| Choice List ID | <span style="color: #172b4d">A helper operation to return the ID of a "Choice list" entry.</span> | <span style="color: #172b4d">Table Name - Agiloft logical table name</span><br><span style="color: #172b4d">Field Name - Field name in Agiloft table</span><br><span style="color: #172b4d">Value - value of the choice list entry</span> |
| Attach | <span style="color: #172b4d">Sends an attachment of any file type to Agiloft.</span> | <span style="color: #172b4d">Table Name - Agiloft logical table name</span><br><span style="color: #172b4d">ID - identifier of the Agiloft record</span><br><span style="color: #172b4d">Field Name - Field name in Agiloft table</span><br><span style="color: #172b4d">File Name - file name of the attachment</span><br><span style="color: #172b4d">Payload - attachment data</span> |
| Attach Retrieve | <span style="color: #172b4d">Retrieve an attachment from a specific record.</span> | <span style="color: #172b4d">Table Name - Agiloft logical table name</span><br><span style="color: #172b4d">ID - identifier of the Agiloft record</span><br><span style="color: #172b4d">Field Name - Field name in Agiloft table</span><br><span style="color: #172b4d">Position - number of the file you want to return, beginning at 0</span> |
| Attach Remove | <span style="color: #172b4d">Removes an attachment from a specific record.</span> | <span style="color: #172b4d">Table Name - Agiloft logical table name</span><br><span style="color: #172b4d">ID - identifier of the Agiloft record</span><br><span style="color: #172b4d">Field Name - Field name in Agiloft table</span><br><span style="color: #172b4d">Position - number of the file you want to remove, beginning at 0</span> |

## Examples

### Query

Query the Company table for companies that have fewer than 500 employees:

```
Table Name = company

Field Names = [id, company name]

Query condition = "no_employees>500"
```

This returns a list of records that fit the query condition parameter:

```
[

{"id":1, "company_name": "Agiloft"], 
{"id":2, "company_name": "North Acme Hardware"]

]
```

### Create

Create a new Company record with the name South Acme Hardware:

```
Table Name = company

Field Values = {"company_name":"South Acme Hardware"}
```

This returns the ID of the newly created company record: `{"id": 101}`

### Update

Change the Name field of a Company record:

```
Table Name = company

ID = 101

Field Values = {"company_name":"Southeast Acme Hardware"}
```

This returns the updated field and value: `{"id": 101, "company_name": "Southeast Acme Hardware"}`

### Delete

Delete a Company record:

```
Table Name = company

ID = 101
```

This returns a success indicator: `{"result": true}`

### Choice List ID

Return the ID of the choice list entry "Parent" of the Company Role field:

```
Table Name = company

Field Name = company_role

Value = Parent
```

This returns the ID of the Value parameter: `{"id": 4}`

### Attach

Attach a .txt file called "example" to a Company record:

```
Table Name = company

ID = 102

Field Name = attached_file

File Name = example.txt

Payload = #[payload]
```

This returns a success indicator: `{"result": true}`

### Attach Retrieve

Retrieve an attached file from a Company record:

```
Table Name = company

ID = 102

Field Name = attached_file

Position = 0
```

This returns the name and encoded base64 attachment from the Company record:

`{"fileName":"example.txt","dataEncoded":"89769822029872982683"}`

### Attach Remove

Remove an attached file from a Company record:

```
Table Name = company

ID = 102

Field Name = attached_file

Position = 0
```

This removes the attachment from the record and returns a success indicator: `{"result": true}`