m3terDocumentation

Completing NetSuite Integration Prerequisites

m3ter offers a few different options when it comes to integrating with NetSuite, be it the highly configurable NetSuite Bill Native Integration or the more advanced m3sh Workflow. Regardless of what is the best choice for your precise use case, you must first complete some prerequisites tasks in your NetSuite instance and in m3ter.

This topic explains how to complete the necessary prerequisites to set up Netsuite in preparation for connecting and authenticating your m3ter integration with your NetSuite instance and allow m3ter to send out Bills to NetSuite:

Important - Please consult your NetSuite Documentation! The instructions given in this topic for setting-up your NetSuite system to prepare for an outbound Bill integration with m3ter are intended for guidance only. We do not hold ourselves responsible for any changes made by NetSuite, and strongly recommend that you consult the NetSuite end user documentation as you perform this configuration and treat the NetSuite documentation as authoritative.

Completing Prerequisites

There are some key prerequisite tasks you'll need to complete:

Creating New Role and User for the Integration

For your NetSuite instance, you'll first have to complete the following general steps:

1. Go to Setup>Company>Enable Features:

  • Select the SuiteCloud tab.

  • Select the option for OAuth 2.0.

  • Accept the OAuth 2.0 Terms and Conditions.

2. Go to Setup>Users/Role>Manage Roles>New:

  • Create a new Role for the m3ter integration. This Role will need the appropriate permissions for the integration. Please get in touch with your NetSuite Administrator and be ready to provide details on the record types and operations that the role is likely to access.

  • Select the option for Web Services Only Role.

  • Select Save.

3. Go to Setup>Users/Roles>Manage Users>New:

  • Create a new User for the m3ter integration that uses the m3ter integration Role you’ve just created.

Checks for NetSuite Bill Integrations

If you are planning to set up a NetSuite Bill Integration, there are some additional aspects to consider. When creating the Role in NetSuite and in addition to the above listed steps, ensure you check and confirm the following:

1. While in Setup>Users/Role>Manage Roles>New:

  • This Role will need read access to Customer/Items and read/write access to Invoices.

2. Go to the Custom>List, Records & Fields>Transaction Column Fields>New. This opens Transaction Line Field.

3. Enter a LABEL, such as m3ter External ID.

4. Enter the ID as: _m3ter_external_line_item.

  • This will create a custom field for transactions called: custom_m3ter_external_line_item.

5. Check that the TYPE setting is Free-Form Text.

6. Under Applies to check SALE ITEM.

7. Select Save and Apply to Forms.

Generating Key Pair Using OpenSSL

This section explains how to generate a new key pair using OpenSSL. You'll generate the m3ter-cert certificate for upload into your NetSuite, and the corresponding m3ter-key that the Integration will be using to authenticate when syncing data.

Tip: Windows User? If you are a Windows user, OpenSSL will not be installed automatically and you will have to install it to complete this section. Here is a website with instructions on how to install openssl that you might want to use to help you do this.

1. Open a command line terminal window on your local machine.

2. Enter and run the following command:

1
openssl req -new -x509 -newkey rsa:4096 -keyout m3ter-key.pem -sigopt rsa_padding_mode:pss -sha256 -sigopt rsa_pss_saltlen:64 -out m3ter-cert.pem -nodes -days 730
2

3. When the command runs, you'll be asked to enter some details:

  • Country name

  • Organization

  • Email address

Two files are generated in the current directory.

4. Perform a list command to check. Two files should be listed:

  • m3ter-cert. This certificate will be uploaded to NetSuite.

  • m3ter-key. This private key will be loaded into m3ter.

Tip: Note that you'll be able to delete these key pair files from your local machine later.

Configuring NetSuite

Having completed the prerequisites, you can now proceed to configure your NetSuite instance.

1. Go to Setup>Integration>Manage Integrations>New:

  • Enter a NAME - for example: m3ter Integration - and a DESCRIPTION.

  • Unselect the options for TOKEN-BASED AUTHENTICATION, TBA: AUTHORIZATION-FLOW, and AUTHORIZATION CODE GRANT.

  • Under OAuth 2.0:

    • Select the option for CLIENT CREDENTIALS (MACHINE TO MACHINE) GRANT.

    • Under SCOPE, select the options for:

      • RESTLETS

      • REST WEB SERVICES

      • SUITEANALYTICS CONNECT

2. Select Save. Under Client Credentials, you'll see your credentials appear:

  • CONSUMER KEY / CLIENT ID

  • CONSUMER SECRET / CLIENT SECRET

Warning! Note the NetSuite warning that these credentials will be displayed only once - ensure you copy and save these locally before you leave this page. If you fail to record them, you can re-open the page for the new integration and select Reset Credentials.

3. Go to Setup>Integration>OAuth 2.0 Client Credentials (M2M) Setup:

4. Select Create New. This opens the Create a New Client Credentials Mapping modal:

  • ENTITY is the user you want to grant access for.

  • ROLE should be the role created on step #2 of "Creating New Role and User for the Integration", or higher.

  • APPLICATION is m3ter Integration for this example.

  • Under CERTIFICATE, select Choose a file. A select file dialog opens. Locate and select the m3ter-cert file. The chosen file will then show as selected.

5. Select Save. The Create a New Credentials Mapping modal closes.

6. Back on the OAuth 2.0 Client Credentials (M2M) Setup page, copy and save the CERTIFICATE ID.

7. Copy and save the URL prefix of your NetSuite instance. For example:

  • 1234555567-sb1.app.netsuite.com

You can now open your m3ter Organization and perform the required set up work there - see the following section.

Configuring m3ter

You can set up authentication for your m3ter NetSuite integration to connect with your NetSuite instance through the m3ter Console as described in this section and using the Netsuite Connection modal:

On the modal, enter the settings for authentication with your NetSuite system for the integration:

  • Account Id. Enter the NetSuite Account Id. You can find this on the Setup>Company>Company Information page in the NetSuite console.

Warning! Sandbox Account Id - use hyphen: If you are setting up in your NetSuite Sandbox, the Account Id field will need to use an hyphen character instead of an underscore. For example, 12345-SB instead of 12345_SB.

  • Client Id. Enter the m3ter Integration Client ID, which was available when the integration was set up in the NetSuite console.

  • Certificate Id. The Certificate ID. You can obtain this from the Setup>Integrations>OAuth 2.0 Client Credentials Setup page in the NetSuite console.

  • Upload Netsuite Credentials. Allows you to upload a private key - click Browse and select the m3ter-key.pem you created under Key Pair Generation above using OpenSSL.

Next: Configuring NetSuite Integrations

Completing NetSuite Integration Prerequisites - m3ter