User Guide: Configuring Source as Salesforce and Target as NetSuite
Overview
This guide provides a detailed walkthrough for configuring Salesforce as the data source and Oracle NetSuite as the data target. It explains how to establish secure API connections, retrieve Salesforce records, process the data, and transmit it to NetSuite.
The configuration supports REST API access, SOQL queries, data filtering, payload construction, and OAuth-based authentication for reliable enterprise data integration.
When to Use
This integration is suitable for organizations that need to synchronize Salesforce data with NetSuite for operational, reporting, or financial processes.
- When transferring Salesforce records to NetSuite
- When SOQL-based data retrieval is required
- When structured API-based data ingestion is needed
- When automated synchronization is required
- When building custom data pipelines
How It Works
The integration follows a structured pipeline to retrieve, transform, and deliver data.
- Connect to Salesforce using REST API
- Execute SOQL queries to retrieve records
- Transform JSON responses
- Filter and enrich data
- Construct NetSuite-compatible payloads
- Authenticate using OAuth
- Send data to NetSuite API
How to Configure
Data Source Configuration
Step 1: Select Source Type
On the Data Source page, select the source type as API.
Step 2: Select Salesforce Product
Select Salesforce as the product.
Step 3: Choose Business Object
Select the required Salesforce business object.
Note: If the required object is unavailable, select Create New and provide all necessary configuration details.
Step 4: Configure Authorization
After selecting the business object, enter the instance identifier and authorization details.
SOQL queries can be used within REST API requests.
Sample SOQL Format
https://{{instance identifier}}-dev-ed.my.salesforce.com/services/data/{{Version}}/query/?q={{query}}
SOQL Filtering Examples
Filter by custom field value:
SELECT id__c,backorder__c,Brand__c,Category__c,Created_Date__c, Supplier__c,Location__c,Item_Name__c,Item_Number__c FROM Item__c WHERE Location__c = 'New-York'
Filter by date range:
SELECT Id,Backorder__c,Brand__c,Category__c,Created_Date__c, Supplier__c,Location__c,Item_Name__c,Item_Number__c FROM Item__c WHERE Location__c='New-York' AND Created_Date__c >= '2023-01-01T00:00:00Z' AND Created_Date__c <= '2023-12-31T23:59:59Z'
Refresh Token Configuration
The refresh token endpoint body contains keys required for authentication.
| Key | Description |
|---|---|
| grant_type | Authentication grant type |
| client_id | Client application ID |
| client_secret | Client secret key |
| username | API user name |
| password | API user password |
These parameters are used to securely generate an access token.
Data Operations
Single Line to Multi-Line
This operation converts single-line JSON responses into multiline format, enabling record-level processing.
Filter
The Filter operation applies conditional logic to extract specific records.
Supported operators include: ==, !=, <, >, =<, =>, and, or.
Examples:
- data[‘Order Status’]==’pending’
- data[‘id’]==5 or data[‘id’]==6
- data[‘Order Status’]!=’failed’ and data[‘Date’]<‘6/03/2022’
Append
The Append operation adds new key-value pairs and maps fields for target payload construction.
"keyname": {
"id": "{%id%}",
"email": "{%email%}",
"first_name": "{%first_name%}"
}
Sample NetSuite Payload
"payload": {
"companyName": "{%Name%}",
"custentity_ch_website_cust_id": "{%Id%}",
"subsidiary": {
"id": "2"
}
}
Mandatory NetSuite fields must be included to prevent data rejection.
Data Target Configuration
Step 7–10: Configure NetSuite Target
- Select Target Type as API
- Choose Oracle NetSuite as target
- Select required business object
- Allow automatic population of API fields
Example API endpoint for Customer object:
https://{{account_id}}.suitetalk.api.netsuite.com/services/rest/record/v1/customer
Do not modify the {%signature%} value in headers.
Pre-request Script Configuration
import datetime
import random
import string
import hashlib
import base64
import hmac
import urllib.parse
request_method = 'POST'
url = 'https://{{account_id}}.suitetalk.api.netsuite.com/services/rest/record/v1/customer'
oauth_consumer_id = 'xxxxxxxx'
oauth_consumer_key = 'xxxxxxxx'
oauth_consumer_secret = 'xxxxxxxx'
oauth_token = 'xxxxxxxx'
oauth_token_secret = 'xxxxxxxx'
oauth_signature_method = 'HMAC-SHA256'
oauth_timestamp = str(int(datetime.datetime.now().timestamp()))
oauth_nonce = "".join(random.choices(string.ascii_letters + string.digits, k=11))
oauth_version = '1.0'
Troubleshooting
- Authentication Failed: Verify OAuth credentials.
- Invalid SOQL Query: Review query syntax.
- Missing Payload Fields: Confirm mandatory NetSuite keys.
- Authorization Error: Check signature generation.
- Data Not Loaded: Validate target configuration.
Frequently Asked Questions
Can SOQL queries be customized?
Yes. Users can define custom SOQL queries to retrieve specific Salesforce records.
Is OAuth mandatory for NetSuite?
Yes. OAuth authentication is required for secure NetSuite API access.
Can I use different business objects?
Yes. Both Salesforce and NetSuite business objects can be customized.
Why is Append required?
Append is used to construct NetSuite-compatible payloads.
Where is data filtered?
Filtering is applied using the Filter operation in the Data Operations stage.
Notes
- Always test API connections before deployment.
- Secure all OAuth credentials.
- Validate payloads before production use.
- Monitor logs regularly.
- Update API versions when required.
After completing all configurations, users can establish a secure and reliable connection between Salesforce and Oracle NetSuite.