Link NetSuite to FTP via Open Source Middleware

This article is relevant if you seek to connect NetSuite to FTP file systems using open source technologies.

Background

For a recent client, we developed an EDI integration to a third party logistics provider. ¬†From the provider’s perspective, they only worked with FTP services to pass files back and forth between order management systems (in our case, NetSuite). ¬†Since the provider was unwilling to work with more modern REST or Web Service technologies, to produce fully automated integration, we needed a reliable and robust way to get NetSuite to talk to FTP services.

Introducing Apache Camel Integration Services

Apache Camel is an open source Java based integration service framework. ¬†The services are designed using an enterprise message oriented architecture for connecting any two systems together. ¬† Because there is strong momentum and support for Apache Camel, it is now considered the “Go To Standard” for any organization that seeks scalable application integration using Open Source techniques.

Apache Camel has a growing list of nearly 100 connectors including FTP services.  Hence, to link NetSuite to FTP, one can connect NetSuite to Apache Camel and thus route files to and from an FTP server.

How to Connect NetSuite to FTP

For our client, we created a NetSuite Apache Camel component that works with NetSuite’s File Cabinet via SuiteTalk Web Services. ¬†A simple requirement: as soon as the EDI provider placed a file in their FTP server, it became visible in our NetSuite file cabinet. ¬†Likewise, as soon as we placed a file in a specific NetSuite folder, it was delivered to a respective FTP directory. ¬†Simple to conceive but not easy to execute without helpful tools. ¬†With this service in place, we solved the “plumbing” problem of routing files to and from environments leaving us to focus on the important business challenge of data integration.

With the NetSuite Apache software components complete, we then setup a reliable internet server to run as a service in the background.  Given the tools utilize Java, we were able to create a low cost Amazon Linux based server that acts as a middleware service to transparently connect the NetSuite and FTP environments together.   The Apache Camel framework makes it easy to implement robust polling and routing management including a queuing architecture that accounts for intermittent network issues and retry handling when systems are offline.  Bottom line: reliable, trouble-free operation.

Connect your NetSuite to FTP and Other File Services

The technologies we developed can easily be adapted to fit any requirement to connect NetSuite to FTP services. ¬†Furthermore, should you need to distribute NetSuite documents to and from other storage systems, such as Amazon S3, ¬†Dropbox, Google Drive, among others, we can quickly solve your challenge. ¬† ¬†When you are ready to get more out of your NetSuite investment, let’s have a conversation.

Be Sociable, Share!

Marty Zigman

Holding all three official certifications, Marty is Southern California's NetSuite expert and leads a team of senior professionals at Prolecto Resources, Inc. He is a former Deloitte & Touche CPA and has held CTO roles. For over 25 years, Marty has produced leadership in ERP, CRM and eCommerce business systems. Contact Marty to setup a conversation.

More Posts - Website - Twitter - Facebook - LinkedIn - Google Plus - YouTube

| Tags: , , , , , | Category: NetSuite, Technical | 2 Comments

2 Comments

  1. Oscar
    Posted October 21, 2015 at 11:34 am | Permalink

    Not for this but for the future, remember SuiteTalk has a size limitation of 10MG to upload… Also sometime you must check the unit code (UTF-8). We also did it for SFTP and maybe for that you need other java framework.
    Thanks as usual !

  2. Posted October 24, 2015 at 12:19 pm | Permalink

    Thanks Oscar for the reminder of the file size limitation. The service is agnostic about the data type in our use case. We are referencing the 2015.1 WSDL and pointing to a file enumerator. See below. Also, Camel supports SFTP as well as many different end points. It’s a few lines of code to work with a different storage end point.

    import com.netsuite.webservices.platform.core_2015_1.types.RecordType

    private File getFile(String internalId) throws Exception {
    RecordRef fileRef = new RecordRef();
    fileRef.setInternalId(internalId);
    fileRef.setType(RecordType.file);

    ReadResponse readResponse = port.get(fileRef);
    if (readResponse.getStatus().isIsSuccess()) {
    log.info(“File with internalId: {} received.”, internalId);
    return (File) readResponse.getRecord();
    } else {
    throw new Exception(“Receiving file with internalid: ” + internalId + ” FAILED.”);
    }
    }

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>