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.
Pro plan
Early access
How sync works
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
Enable Token-Based Authentication in NetSuite
- Go to Setup > Company > Enable Features
- Click the SuiteCloud tab
- Enable REST Web Services and Token-Based Authentication
- Save
Create an integration record
- Go to Setup > Integration > Manage Integrations > New
- Name: "Demurly Integration"
- Enable Token-Based Authentication
- Save and copy the Consumer Key and Consumer Secret
Important
Create access token
- Go to Setup > Users/Roles > Access Tokens > New
- Select the Application (Demurly Integration)
- Select a User who has the role below
- Select the Role for this integration
- Save and copy Token ID and Token Secret
Connect in Demurly
- Go to Settings > Connected systems
- Click Connect on the NetSuite card
- 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
- 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.
Set invoice settings
- In Settings > Connected systems, open the NetSuite invoice settings
- Enter the Item internal ID (required): the service item demurrage is billed as
- OneWorld accounts: enter the Subsidiary internal ID that new customers belong to (optional)
- 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
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
- Set up Token-Based Authentication as above, with the role's permissions for bills.
- Go to Settings > Connected systems and connect NetSuite. Saving runs a connection test.
- On the NetSuite bills card, map each carrier to its vendor (search by name or vendor ID), or turn on Create vendors.
- Fill in the expense account and payment account, and payment terms if you want them.
- 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