Skip to content
Back to integrations

NetSuite integration

Connect NetSuite with Token-Based Authentication. For carriers, approved demurrage charges become invoices; for fuel buyers, they become vendor bills. Payments are kept in step both ways.

Early access

Pro plan

Carriers need Pro ($199 a month) to set this up; upgrade on Settings > Plan & billing. Fuel buyers get it free. See pricing.

Early access

Tested against each vendor's API format; we're completing live sandbox certification. Talk to us before relying on it for month-end.

How sync works

For a carrier, when a customer approves a demurrage record, Demurly creates one invoice to that customer in NetSuite for exactly the approved amount. Payments sync in both directions. For a fuel buyer, the same approval becomes a vendor bill: see For fuel buyers.

For carriers: invoices in NetSuite

What syncs

  • One invoice per approved record, one line, with the record number (DMR-…) as the PO/Check #
  • The customer: found by name, or created the first time
  • Payments made through Demurly (card, or confirmed paid outside Demurly) are recorded against the invoice
  • An invoice paid in NetSuite marks the record paid in Demurly (checked every 10 minutes)

Safeguards and controls

  • Nothing is created twice: a retry finds what was already made
  • A payment that came from NetSuite isn't sent back
  • If the invoice total in NetSuite differs from the approved amount (for example, tax from the item's settings), the sync fails with a message until you fix the invoice; then click Retry
  • Turn off Invoice approved records automatically to stop new invoices; payments for invoices already sent still sync
  • Records approved before you connected can be invoiced with Invoice them
  • Recent activity, with Retry, is shown in Settings > Connected systems

Prerequisites

  • NetSuite account with REST Web Services and Token-Based Authentication enabled
  • A role that can log in with access tokens and run SuiteQL (see Permissions below)
  • Admin access to your Demurly organization

Setup instructions

1

Enable Token-Based Authentication in NetSuite

  1. Go to Setup > Company > Enable Features
  2. Click the SuiteCloud tab
  3. Enable REST Web Services and Token-Based Authentication
  4. Save
2

Create an integration record

  1. Go to Setup > Integration > Manage Integrations > New
  2. Name: "Demurly Integration"
  3. Enable Token-Based Authentication
  4. Save and copy the Consumer Key and Consumer Secret

Important

The Consumer Secret is only shown once. Store it securely.
3

Create access token

  1. Go to Setup > Users/Roles > Access Tokens > New
  2. Select the Application (Demurly Integration)
  3. Select a User who has the role below
  4. Select the Role for this integration
  5. Save and copy Token ID and Token Secret
4

Connect in Demurly

  1. Go to Settings > Connected systems
  2. Click Connect on the NetSuite card
  3. Enter your credentials:
    • Account ID (Setup > Company > Company Information), e.g. 1234567 or 1234567_SB1 for a sandbox
    • Consumer Key and Secret
    • Token ID and Secret
  4. Click Save and Test

Demurly stores the credentials encrypted and runs a SuiteQL query for your company name. If it succeeds, the card shows Connected; otherwise you see the error from NetSuite. Use Test Connection on the card to re-check later. Stored credentials aren't shown again; to change them, use Configure and enter all four again.

5

Set invoice settings

  1. In Settings > Connected systems, open the NetSuite invoice settings
  2. Enter the Item internal ID (required): the service item demurrage is billed as
  3. OneWorld accounts: enter the Subsidiary internal ID that new customers belong to (optional)
  4. Save

Customers and invoices Demurly creates get an External ID starting with demurly-. Payments are made by turning the invoice into a Customer Payment.

Required permissions

For carriers, the role on the access token needs:

  • REST Web Services
  • Log in using Access Tokens
  • SuiteAnalytics Workbook (to run SuiteQL)
  • Customers: create
  • Invoices: create
  • Customer Payments: create
  • Items: view

For fuel buyers: bills in NetSuite

Free for fuel buyers

Fuel buyers connect NetSuite the same way (Token-Based Authentication). Each charge you approve becomes a vendor bill from the carrier, payments you make in Demurly are recorded against it, and a bill you pay in NetSuite tells the carrier.

What syncs

  • On approval: one vendor bill for exactly the approved amount, dated the day you approved it, with the carrier's invoice number as Reference No., one expense line, and a memo with the record number, terminal, date, billed time and a link to the record. NetSuite numbers the bill (for example VB1042)
  • Paid in Demurly: a vendor payment applied to the bill, from your payment account
  • Paid in NetSuite: within about 10 minutes the charge shows as paid outside Demurly, with the check number, and the carrier confirms the money arrived
  • Each record says where it is: "In NetSuite as VB1042, paid (check 4471)"

What doesn't sync

  • The invoice PDF: NetSuite's REST API can't attach files, so the bill's memo links to the record, where the PDF is
  • A bill waiting in an approval workflow reads as a draft; a Demurly payment waits until it's approved
  • Changes made to a bill in NetSuite; a voided or deleted bill is noted on the record and the charge is left as it is

What NetSuite needs

  • The role on the access token: Vendors (Full), Bills (Full), Pay Bills (Full), Find Transaction (View), Accounts (View), REST Web Services, Log in using Access Tokens and SuiteAnalytics Workbook
  • An expense account for demurrage (by account number, such as 6150, or internal ID), or a default expense account on each carrier's vendor record
  • A bank account bill payments come from (the Payment account; empty uses the form's default). In OneWorld, the subsidiary new vendors belong to

Set it up

  1. Set up Token-Based Authentication as above, with the role's permissions for bills.
  2. Go to Settings > Connected systems and connect NetSuite. Saving runs a connection test.
  3. On the NetSuite bills card, map each carrier to its vendor (search by name or vendor ID), or turn on Create vendors.
  4. Fill in the expense account and payment account, and payment terms if you want them.
  5. Charges approved before you connected: Bill earlier charges on the bills card. Pick a start date (the day you connected, unless you change it) and Demurly shows how many it will bill first. Charges you already paid are left out unless you tick Also bill charges you already paid; then each is billed with its payment recorded.

Security

  • Token-Based Authentication (OAuth 1.0a with HMAC-SHA256)
  • Credentials encrypted at rest with AES-256-GCM
  • NetSuite access tokens stay valid until you revoke them in NetSuite
  • Each request is signed with a timestamp and nonce

Need help?

Check the troubleshooting guide or contact support@demurly.com.

Contact support