Contact Free trial Login

NetSuite OpenAir Connector


The NetSuite OpenAir connector is a closed source enterprise connector which provides a connection between OpenAir and third-party software.


This document assumes that you are familiar with Mule, Anypoint Connectors, Anypoint Studio, Mule concepts, elements in a Mule flow, and Global Elements.

To use this connector, you need:

  • A NetSuite OpenAir instance

  • A set of valid credentials, including username, password, companyID, API namespace and key.

  • A MuleSoft Enterprise License

We recommend you use the NetSuite OpenAir SOAP API Guide (PDF) as you familiarize yourself with the connector.

OpenAir complex types are limited to a set of OpenAir operations. See the OpenAir guide to see the object types. You can see, for example, that object oaActualCost works with "read", "add", "modify", and "upsert" methods, while object oaApproval only works with the "submit" method.

What’s New in this Connector

Support for Mule 4 has been added.


The OpenAir connector is compatible with:

Application/Service Version

Mule Runtime

EE 4.1.0 and later

Anypoint Studio

7.1 and later



To Connect in Design Center

  1. Click a trigger such as HTTP Listener or Scheduler.

  2. To create an HTTP global element for the connector, first set the path where your mule application listens:

  3. Click Edit and set these fields:

    Trigger options
    Field Description


    Protocol selected for the HTTP endpoint, it can be HTTP or HTTPS (secure).


    IP address where your Mule application listens for requests.


    Port address where your Mule application listens for requests.

    Base Path

    An optional base path, the Mule application listens to the base path + path.

  4. Select the plus sign next to the trigger to add a component.

  5. Select the connector as a component.

  6. Select the operation:

  7. Configure the global element for the connector:

    account config
    Field Description


    Enter the company.


    Enter the username who is going to connect.


    Enter the password for the user previously chosen.

    API Namespace

    Enter the API namespace.

    Api Key

    Enter the API key.

  8. Optionally configure the connection options for the connector:

    connector config
    Field Description


    Enter the endpoint.

    Connection Timeout

    Enter the connection timeout.

    Read Timeout

    Enter the read timeout.

Connect in Anypoint Studio 7

You can use this connector in Anypoint Studio by adding it as a dependency in your Mule application.

Install Connector in Studio

  1. In Anypoint Studio, click the Exchange icon in the Studio task bar.

  2. Click Login in Anypoint Exchange.

  3. Search for the connector and click Install.

  4. Follow the prompts to install the connector.

When Studio has an update, a message displays in the lower right corner, which you can click to install the update. After updating, update Maven pom.xml file dependencies to the new version.

Ensure your Maven dependency is set:

  1. Open your Mule project in Anypoint Studio.

  2. Add the connector as a dependency in the pom.xml file:


Configure in Studio

  1. Drag and drop the connector operation to the Studio Canvas (they are the same as are in Design Center).

  2. Configure the global element for the connector (just like in Design Center):

    anypoint config
  3. Optionally, configure a connection:

    anypoint connection

    To enable the automatic reconnection feature:

    1. Access the OpenAir Global Element configuration window from Studio.

    2. Click the "Advanced" (next to Connection) tab.

    3. Select the "Standard" option in Reconnection Strategy.

    4. Adjust the "Frequency (ms)" and "Reconnection Attempts" fields accordingly.

Use Case: Add OpenAir Object

OpenAir use case flow
  1. Create a new Mule Application in Studio and select an HTTP Listener as a Source in the new flow.

  2. Drag and drop an HTTP Listener onto the canvas and configure it to listen at Port 8081.

  3. Drag and drop the OpenAir Add Operation connector into the flow and configure the connector as described above.

  4. Drag and drop a Transform Message component between the HTTP connector and the OpenAir connector.

  5. Inside the Transform Message insert the DataWeave script below into the DataWeave editor. The script adds both oaCustomer objects to your NetSuite OpenAir instance.

    %dw 2.0
    output application/xml
    ns ns0
      ns0#ArrayOfoaBase: {
        oaBase: {
          oaCustomer: {
            name: "James Bond",
                  company: "MuleSoft"
          oaCustomer: {
            name: "John Doe",
            company: "Pepsi"
  6. Drag and drop another Transform Message component after the OpenAir connector, and insert the DataWeave script below into the Transform Message component’s DataWeave editor. The script should return the IDs of the newly added OpenAir objects.

    %dw 2.0
    output application/json
    ns ns0
      ID1: payload.ns0#ArrayOfUpdateResult.*updateResult[0].id,
      ID2: payload.ns0#ArrayOfUpdateResult.*updateResult[1].id
  7. Save and run the project as a Mule Application by right-clicking the project name in the Package Explorer, selecting Run As > Mule Application.

  8. After hitting the HTTP endpoint you configured, your browser should display the following JSON:

        "ID1": "411",
        "ID2": "412"

Use Case: XML

<?xml version="1.0" encoding="UTF-8"?>
<mule xmlns=""
   <http:listener-config name="HTTP_Listener_config" doc:name="HTTP Listener config">
      <http:listener-connection host="localhost" port="8081" />
   <openair:config name="Open_Air_Config" doc:name="Open Air Config">
      readTimeout="${config.readTimeout}" />
   <flow name="testopenairFlow">
      <http:listener doc:name="Listener" config-ref="HTTP_Listener_config" path="/" />
      <ee:transform doc:name="Transform Message">
            <ee:set-payload><![CDATA[%dw 2.0 output application/xml ns ns0  --- { ns0#ArrayOfoaBase: { oaBase: { oaCustomer: { name: "James Bond", company: "MuleSoft" }, oaCustomer: { name: "John Doe", company: "Pepsi" } } } }]]></ee:set-payload>
      <openair:add doc:name="Add" config-ref="Open_Air_Config" oaObject="jasdhjasdhik" />
      <ee:transform doc:name="Transform Message">
            <ee:set-payload><![CDATA[%dw 2.0 output application/json ns ns0 --- { ID1: payload.ns0#ArrayOfUpdateResult.*updateResult[0].id, ID2: payload.ns0#ArrayOfUpdateResult.*updateResult[1].id }]]></ee:set-payload>

We use cookies to make interactions with our websites and services easy and meaningful, to better understand how they are used and to tailor advertising. You can read more and make your cookie choices here. By continuing to use this site you are giving us your consent to do this.