netsuite egress connector

NetSuite Egress Connector

Version: 17.07

Supported Since: 17.07

What is a NetSuite Egress Connector?

NetSuite egress connector can be used to communicate with NetSuite for information retrieval from its production environment or sandbox environment using NetSuite’s API.

By default, this connector has not been connected to a connector operation, and would require a connector operation to be added. Based on the operation added, the behaviour of the NetSuite connector would change.

In order to use the NetSuite Egress Connector, you must first select the NetSuite Connector dependency from the connector list when you are creating an empty Ultra project. If you have already created a project, you can add the NetSuite Connector dependency via Component Registry. From Tools menu, select Ultra Studio → Component Registry and from the Connectors list, select the NetSuite Connector dependency.
netsuite outports

Out Ports

On Exception

The message will be emitted from this out port if the connector failed to send the message to the intended NetSuite endpoint.

Response Processor

The response message received from NetSuite will be directed to this port. You can use this port to connect any precessing element or connector that is supposed to process/consume the response.

Side Ports

Connector Operation

This port is used to connect operational elements to the Egress Connector

Parameters

* marked fields are mandatory

Production Check *

NS Config

Choose between NetSuite sandbox and production environments. The default option is the production environment. If a user want to test in the sandbox environment. he/she should turn off this feature.

NetSuite URL

NS Config

Where a user would like to provide the NetSuite URL which is provided by the WSDL file, the user could enter the URL here. This would override the above option and the endpoint will be selected.

Transaction Scope Variable Name

NS Config

Transaction scope variable name to be specified. This will be used for logging purposes if an interceptor is used. Please note if this variable is not specified interceptors cannot operate (for message logging).

Email *

Basic

E-mail of the NetSuite user

NetSuite Account Password *

Basic

Password of the NetSuite user

NetSuite role Id *

Basic

Role Id of the NetSuite user

NetSuite Account Name *

Basic

Account name of the NetSuite user

Application Id *

Basic

Application Id of the NetSuite user. Please note that an integration needs to be created from NetSuite. The integration would be assigned an application Id. This id will be used to keep track of application activities by NetSuite.

Partner Id

Optional

Partner Id of the NetSuite user

In Interceptor

Interceptors

In Interceptor list separated with commas. These interceptors can be used for logging purposes. For custom development of interceptors, please go through http://cxf.apache.org/docs/interceptors.html An interceptor should extend AbstractNSInterceptor class provided through our framework in developing. For example, a logging interceptor would look as follows.

@LogInfo(loggerId = 1, nextLogCode = 1)
public class LogInInterceptor extends AbstractNSInterceptor {

    private static final Logger logger = LoggerFactory.getLogger(LogInInterceptor.class);

    public LogInInterceptor() {
        super(Phase.RECEIVE);
    }

    @Override
    public void init(ApplicationContext applicationContext) {
        super.init(applicationContext);
    }

    @Override
    public void handleMessage(Message message) throws Fault {
       logger.info("Message received", message.getContent(String.class));
    }

}

Out Interceptor

Interceptors

Out Interceptor list separated with commas. These interceptors can be used for logging purposes. For custom development of interceptors, please go through http://cxf.apache.org/docs/interceptors.html. An interceptor should extend AbstractNSInterceptor class provided through our framework in developing. An out interceptor follows the same pattern as given above.

In Fault Interceptor

Interceptors

In Fault Interceptor list separated with commas. These interceptors can be used for logging purposes. For custom development of interceptors, please go through http://cxf.apache.org/docs/interceptors.html. An interceptor should extend AbstractNSInterceptor class provided through our framework in developing. An out interceptor follows the same pattern as given above.

Out Fault Interceptor

Interceptors

Out Fault Interceptor list separated with commas. These interceptors can be used for logging purposes. For custom development of interceptors, please go through http://cxf.apache.org/docs/interceptors.html. An interceptor should extend AbstractNSInterceptor class provided through our framework in developing. An out interceptor follows the same pattern as given above.

Sample Use Case

Use case description

This is an example use case of NetSuite egress connector, on how to expose certain NetSuite endpoint operations over HTTP to other applications or clients without giving them the burden of managing API credentials or authentication overhead.

In this example, an external HTTP client will send a HTTP request to UltraESB-X to obtain the server time from NetSuite. The NetSuite egress connector in-combination with Get Server Time connector operation can be configured to obtain the server time from NetSuite.

Implementation

To implement above use case, let’s create our integration flow named netsuite-get-servertime and get required components from the component registry. For this use case it’s required to get, NetSuite Egress Connector and HTTP NIO Connector from the connector store.

First, a NIO HTTP Ingress Connector should be added and configured to accept HTTP requests from the external. Depending on the requirement, HTTP port and service path can be configured in the HTTP ingress connector.

Then a NetSuiet Egress connector should be added to integrate with NetSuite endpoint. This egress connector should be configured with the details of the NetSuite service account details including endpoint base URL, username and password.

  • Operation - Get Server Time Entity

  • Production Check - False (testing is to be done in the Sandbox environment)

  • Transaction Scope Variable Name - serverTime

  • NetSuite Email - User’s email address

  • NetSuite Password - User’s password

  • NetSuite Role - NetSuite role Id of the user

  • NetSuite Account - NetSuite Account name of the user

  • Application Id - Integration Id

  • Partner Id - Partner Id

netsuite egress config 1
netsuite egress config 2

After that, attach a NetSuite Get Server Time Operation Connector Operation as the connector operation for the above NetSuite egress connector to obtain the server time. This connector operation does not need any custom configurations.

With all above elements, complete flow would look as below,

netsuite egress connector flow

Now if you run the flow, and send a request to the configured HTTP endpoint with the required parameters as transport headers, you should be able to obtain the server time from NetSuite.

In this topic
In this topic
Contact Us