Configuring NetSuite Integrations

You can define and manage native integrations for sending your end customer Account Bills generated in m3ter outbound into your NetSuite system:

This topic also includes a section designed to help you set up NetSuite in preparation for connecting and authenticating your m3ter integration with your NetSuite instance:

Creating the Integration

To create and configure a native integration, you can follow a three-stage process:

  • Stage 1. Select the Entity Type that the integration is for. Currently, only native integrations for Bills are supported.

  • Stage 2. Select the external system that is the destination for the integration.

  • Stage 3. Configure the details required for the selected integration destination and create the integration.

Tip: Reviewing Integration Runs! When you've set up an integration with NetSuite for your Organization in your production environment, you can review details of the integration runs performed for the integration. See Reviewing Integration Run Details.

To define a m3ter - NetSuite integration:

1. Select Integration>Configurations. The Integrations Configurations page opens.

2. Select Create Integration. The Create page opens at Stage 1: Select entity type.

3. On the Entity Type Settings panel, use the Entity Type drop-down to select the entity type you want to integrate with an external system. Currently, only Bill is available for selection.

4. Select Next. The page adjusts to show Stage 1 as checked and completed and shifts focus to Stage 2: Select destination.

5. On the Destination Settings panel, use the Destination drop-down to select Netsuite.

6. Select Next. The page adjusts to show Stage 2 as checked and completed and shifts focus to Stage 3: Configure and create. The Entity Type and Integration Destination you've selected are shown.

7. On the Global Configuration panel, select the Accounts you want the integration to apply to:

  • Account Ids. Select the Accounts you want to include - all selected Accounts are treated as allowed for the integration.

  • Restricted Account Ids. Select the Accounts you want to exclude - all selected Accounts are treated as not allowed for the integration.

Note: If you want to include all Accounts in the integration, leave both Accounts Ids and Restricted Account Ids empty.

8. Use the Entity Configuration panel to configure the m3ter entity you will be synchronizing with for the integration. In the case of an outbound Bill integration, this entity will be the Bill generated for a customer Account in m3ter:

  • Only Send Bill On Approval. Enable this if you only want Bills to be sent when they have been approved. If disabled, the Bill will be sent every time it is regenerated. Default is disabled. Note that:

    • The frequency of Bills sent will depend on the billing frequency defined for the Account Plan attached to the Account - such as daily/weekly/monthly/annually.

    • If an Account has a Prepayment on it and the billing for Prepayment fees is configured to run on a customized schedule, Bills will be sent when scheduled Bills are generated.

    • If a Bill is manually recalculated the updated Bill will be sent.

    • If you enable this, then the integration will not run for all Bill Jobs.

  • Use External Mapping Account Code. Enable this if you want the integration to look in the External Mappings for the Account identifier, which means you can use an external Id. If this is disabled, the m3ter Account Id is used. Default is disabled.

  • Excluded Line Item Types. Filter the Bill line items you send to the destination system. For example, only send charges or credits and exclude all other line items.

  • Sort Line Items By. Optionally, select a property to sort line items by before they are sent out to the external system. Three options:

    • None

    • Subtotal

    • Aggregation ID

  • Account Filter. Optionally, enter an expression that is run on the Account to determine whether or not the integration is run. You can use this setting if you have multiple destinations for sending Bills outbound to your NetSuite system. For example:

    • customFields != null AND customFields.country = = UK

    • In this example, the integration will run for an Account only if you have created a Custom Field for the Account called country and given the field a value of UK.

Tip: Other Account Fields for Account Filter Expression? You can reference other fields on the Account object in the Account Filter expression. For details and another example, see Managing Multiple Third Party Destinations for Integrations.

9. Use the Destination Configuration panel to enter the settings specific to the destination system. These settings include field mappings as well as other system-specific configurations. Note that these settings will change for each destination:

  • Split Usage Line Items. Select how you want to split line items in the outgoing Bill. Three options:

    • Item per usage band. Create a line item on your NetSuite invoice for each pricing band.

    • Item per product. Create one NetSuite Item per m3ter Bill Item.

  • Netsuite Send Due Date. Whether the calculated due date is sent from m3ter to NetSuite. If this option is disabled, NetSuite will default the due date based on the customer configuration.

  • Netsuite Commitment Item Id. Enter the Id of the Commitment item in NetSuite. This field is only required if you are representing Commitments with a specific NetSuite Item. If not configured, the NETSUITE_DEFAULT_ITEM_ID will be used.

  • Netsuite Minimum Spend Id. Enter the Id of the Minimum Spend in NetSuite. This field is only required if you are representing Minimum Spends with a specific NetSuite Item. If not configured, the NETSUITE_DEFAULT_ITEM_ID will be used.

  • Netsuite Default Item Id. Enter the Id of the Default item in NetSuite. This will be used if there is no External Mapping entity configured in m3ter between m3ter and NetSuite - for example "Other".

  • Netsuite Item Mapping. Enter the details for mapping each Bill line item type to their corresponding items in NetSuite. Optionally map each line item type in m3ter with a specific Item in NetSuite. These values will be used if there is no external mapping for a NetSuite Item. For any of these fields which are not populated, the value in NETSUITE_DEFAULT_ITEM_ID will be used as the default for that line item type.

  • Netsuite Item Custom Field Mapping. Optionally choose a specific mapping to NetSuite Custom fields for the m3ter fields in this section. Currently, there are only two fields for a line item available to map to Custom fields:

    • servicePeriodStart

    • servicePeriodEnd

10. Select Create Integration. You are taken to the details page for the integration, where you can immediately complete the configuration by setting up authentication to allow the integration to connect with your NetSuite system - see the following Setting Up Authentication section for details:

  • Note that if you are not ready to continue your workflow and set up authentication immediately, you can do this at a later time.

Setting Up Authentication for the Integration

When you have created a NetSuite integration, you can set up authentication to allow the integration to connect with your NetSuite system:

  • Note that if you've followed the workflow given in the earlier section for creating the integration, on creation you'll be taken directly to the integration details page to continue and immediately set up authentication. The procedure described in this section assumes you've returned at a later date to set up authentication for the integration - the main steps you need to follow if you're setting up authentication immediately after creation are the same

To set up authentication for your m3ter - NetSuite integration:

1. Select Integration>Configurations. The Integrations Configurations page opens.

2. Select the ENTITY TYPE hotlink text of the NetSuite integration you want to set up authentication for. The Integration Details page opens:

  • Notes:

    • A warning is shown that the integration is not yet authenticated for connection to your NetSuite system.

    • The ID of the integration configuration is shown at the bottom of the Details card, and you can copy the ID directly to your clipboard.

3. Select Connect. A Netsuite Connection modal appears:

4. 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 underscore: If you are setting up in your NetSuite Sandbox, the Account Id field will need to use an underscore character instead of a hyphen. 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. This should be generated via OpenSSL or other tool providing a comparable encryption level.

Note: NetSuite OAuth user's client credentials. See the following Setting up your NetSuite System section for more details on how to generate these credentials.

5. Select Save. The modal closes and the credentials you've entered are saved. You are returned to the integration details page:

  • An "Integration connected successfully" message appears for a few seconds at the top of the page.

  • The integration now shows as CONNECTED.

Tip: Testing your Native Integration Setup? Your NetSuite integration is now available for use. However, it remains in Beta release and we strongly recommend you test the implementation in your m3ter Sandbox or QA environment before releasing it to your Production environment. See section 7. of our Terms of Service for Beta Usage.

Tip: Integrations API Calls? When you have set up your NetSuite integration, you can review and manage the integration using a full set of API Calls. See the Integrations section of our API Reference Docs.

Setting Up your NetSuite System

This section provides guidance on setting up Netsuite in preparation for connecting and authenticating your m3ter integration with your NetSuite instance and to allow m3ter to send out Bills to NetSuite. The set up work is in four stages:

Important - Please consult your NetSuite Documentation! The instructions given in this section 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.

Prerequisites

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

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 read access to Customer/Items and read/write access to Invoices.

  • 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.

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

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

6. Enter the ID as: _m3ter_external_line_item.

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

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

8. Under Applies to check SALE ITEM.

9. Select Save and Apply to Forms.

Configuring NetSuite

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 is Administrator.

  • 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.

Key Pair Generation

This section explains how to generate a new key pair using OpenSSL.

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 -x509 -newkey rsa:4096 -sha256 -keyout m3ter-key.pem -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 m3ter

You can set up authentication for your m3ter NetSuite integration to connect with your NetSuite instance through the m3ter Console as described in the above 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 underscore: If you are setting up in your NetSuite Sandbox, the Account Id field will need to use an underscore character instead of a hyphen. 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.

Configuring m3ter Using Command Line

Alternatively, you can configure the m3ter connection with your NetSuite instance from the command line:

1. Log into your m3ter Organization.

2. Open a command line terminal window and run the following command in the same directory that you created the key pair files in:

1
base64 -i m3ter-key.pem | pbcopy
2

This will encode the file as Base64 and copy it to the clipboard.

3. Send the following POST API call with the relevant substitutions to this endpoint:

/organizations/{orgId}/integrationauth/Netsuite/netsuiteauth

1
{
2
"type" : "NETSUITE_AUTH",
3
"accountId" : "{Customer's account ID}",
4
"certificateId" : "{Certificate ID}",
5
"clientId" : "{ClientId from Netsuite}"
6
"privateKey" : "{Base64 encoded m3ter-key.pem file}"
7
}
8

Note that the "accountId" required is the URL prefix of your NetSuite Instance, of the form 1234555567-sb1.

Next: Creating and Managing Destinations



Additional Support

Login to the Support portal for additional help and to send questions to our Support team.