> For the complete documentation index, see [llms.txt](https://docs.novacura.com/flow-connect/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.novacura.com/flow-connect/reference/how-to-guides/context-files-for-llms/connectors/inform3-api-socket.md).

# InforM3 API (Socket)

## InforM3 Connector - FlowScript Language Quick Guide (for LLM code generation)

Use the Infor M3 connector to interact with the M3 ERP system directly from your workflows. It enables you to query M3 programs and transactions, pass input parameters, and retrieve business data, allowing seamless integration with M3 business processes such as manufacturing, distribution, and supply chain operations.

### 1) getPrograms

Retrieves a list of available M3 programs.

* Signature :
  * Signature: ( optional responseLimit: number ) -> Program\*
* Parameters:

| Parameter               | Type   | Description                                                                                              |
| ----------------------- | ------ | -------------------------------------------------------------------------------------------------------- |
| Options - responseLimit | object | Supports responseLimit (number) to limit the number of results returned. Defaults to return all records. |

* Output: Returns a collection of Program objects, each containing:
  * ProgramName (text) – The name of the program.
  * ComponentName (text) – The component the program belongs to.
  * Description (text) – A brief description of the program.
* Examples

```
return M3Api.getPrograms()
```

* Example with options:

```
return M3Api.getPrograms({ responseLimit: 10 })
```

### 2) getTransactions

Retrieves a list of transactions available for a specified M3 program.

* Signature :
  * Signature: ( programName: text ) -> Transaction\*
* Parameters:

| Parameter   | Type | Description                                              |
| ----------- | ---- | -------------------------------------------------------- |
| programName | text | The name of the M3 program to retrieve transactions for. |

* Output: Returns a collection of Transaction objects, each containing:
  * TransactionName (text) – The name of the transaction.
  * Description (text) – A brief description of the transaction.
* Example :

```
return M3Api.getTransactions("CRS610MI")
```

### 3) getFields

Retrieves the input and output fields for a specified transaction within an M3 program.

* Signature :
  * Signature: ( programName: text, transactionName: text ) -> Field\*
* Parameters:

| Parameter       | Type | Description                                         |
| --------------- | ---- | --------------------------------------------------- |
| programName     | text | The name of the M3 program.                         |
| transactionName | text | The name of the transaction to retrieve fields for. |

* Output: Returns a collection of Field objects, each containing:
  * FieldName (text) – The name of the field.
  * Direction (text) – Indicates whether the field is an input or output field.
  * DataType (text) – The data type of the field.
  * IsMandatory (boolean) – Whether the field is required.
  * Description (text) – A brief description of the field.
* Example :

```
return M3Api.getFields("CRS610MI", "GetBasicData")
```

### 4) query

Executes a transaction against a specified M3 program and returns the resulting records.

* Signature :
  * Signature: ( programName: text, transactionName: text, { optional inputFields: {}, optional outputFields: \[], optional responseLimit: number } ) -> {}\*
* Parameters:

| Parameter       | Type   | Description                                                                         |
| --------------- | ------ | ----------------------------------------------------------------------------------- |
| programName     | text   | The name of the M3 program to query.                                                |
| transactionName | text   | The name of the transaction to execute.                                             |
| inputFields     | object | Optional. Key-value pairs passed as input to the transaction.                       |
| outputFields    | text\* | Optional. A list of field names to include in the response.                         |
| responseLimit   | number | Optional. Limits the number of records returned. Defaults to returning all records. |

* Output: Returns a collection of dynamic objects ({}\*), where each object represents a result record with fields corresponding to the transaction's output.
* Example:

```
return M3Api.query("CRS610MI", "LstByNumber")
```

* Example with options:

```
return M3Api.query("CRS610MI", "LstByNumber", {
     inputFields: { CUNO: "123" },
     outputFields: ["CUNO", "CUNM", "TOWN"],
     responseLimit: 50
})
```


---

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.novacura.com/flow-connect/reference/how-to-guides/context-files-for-llms/connectors/inform3-api-socket.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
