org.mule.modules

mule-module-netsuite

2.1
Namespacehttp://repository.mulesoft.org/releases/org/mule/modules/mule-module-netsuite
Schema Locationhttp://repository.mulesoft.org/releases/org/mule/modules/mule-module-zuora/2.0/mule-netsuite.xsd
Version1.0
Minimum Mule Version3.2

Module Overview

The NetSuite cloud connector facade, based on a NetSuiteClient

Summary

Configuration
<netsuite:config>
Configure an instance of this module
Message Processors
<netsuite:get-server-time>
Answers the server time, resulting in more accurate and reliable sync'ing of data than using using local client time.
<netsuite:add-file>
Creates a new file record.
<netsuite:add-record>
Creates a new record.
<netsuite:async-find-records>
Searches for all records that match the given filtering expression, asynchronously.
<netsuite:attach-record>
Attaches a source record - that is, the attachment - to another destination one, optionally specifying a contact for the attachment.
<netsuite:check-async-status>
Answers the status of an asynchronous Web services submission.
<netsuite:delete-record>
Deletes a record.
<netsuite:detach-record>
Detaches a source record - that is, the attachment - from a destination record.
<netsuite:find-first-record>
Answers the first records that match the given filtering expression.
<netsuite:find-records>
Answers all records that match the given filtering expression.
<netsuite:get-async-find-first-result>
Answers the the first result of an asynchronous asyncFind.
<netsuite:get-async-find-result>
Answers the results of an asynchronous web services submission.
<netsuite:get-budget-exchange-rates>
Answers the list of budget exchange rates Example:

<netsuite:get-consolidated-exchange-rates>
Answers the list of consolidated exchange rates Example:
<netsuite:get-customization-ids>
Answers the ids of available customizations for a given record type.
<netsuite:get-deleted-records>
Answers a list of deleted records of a given record type that match a given date expression.
<netsuite:get-item-availabilities>
Answers the availability for a given record reference.
<netsuite:get-record>
Answers a record given its id Example:
<netsuite:get-records>
Answers all the record of a given type Example:
<netsuite:get-saved-search>
Retrieves a list of existing saved searches for the given record type.
<netsuite:initialize>
Populates fields on transaction line items with values from a related record, in a similar way empty text boxes are prepopulated within the Netsuite UI Example:
<netsuite:saved-find-records>
Answers all records of a given type for a saved search, given its search id.
<netsuite:update-invitee-status>
Sets a new invitation status for a given event.
<netsuite:update-record>
Updates an existing record.

Configuration

To use the this module within a flow the namespace to the module must be included. The resulting flow will look similar to the following:

<mule xmlns="http://www.mulesoft.org/schema/mule/core"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xmlns:netsuite="http://repository.mulesoft.org/releases/org/mule/modules/mule-module-netsuite"
      xsi:schemaLocation="
               http://www.mulesoft.org/schema/mule/core
               http://www.mulesoft.org/schema/mule/core/current/mule.xsd
               http://repository.mulesoft.org/releases/org/mule/modules/mule-module-netsuite
               http://repository.mulesoft.org/releases/org/mule/modules/mule-module-zuora/2.0/mule-netsuite.xsd">

      <!-- here goes your flows and configuration elements -->

</mule>

This module is configured using the config element. This element must be placed outside of your flows and at the root of your Mule application. You can create as many configurations as you deem necesary as long as each carries its own name.

Each message processor, message source or transformer carries a config-ref attribute that allows the invoker to specify which configuration to use.

Attributes
TypeNameDefault ValueDescription
xs:string name Optional. Give a name to this configuration so it can be later referenced.
xs:string account SuiteTalk -NetSuite WebService - account id.
xs:string email The login email of both NetSuite UI and SuiteTalk
xs:string password The login password of both the NetSuite UI and SuiteTalk
xs:string roleId The id of the role used to login in SuiteTalk, which determines the Processor privileges

Message Processors

<netsuite:get-server-time>

Answers the server time, resulting in more accurate and reliable sync'ing of data than using using local client time. Example:

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescription
config-ref Optional. Specify which configuration to use.
Child Elements
Return Payload
  • the server time, as a Date

<netsuite:add-file>

Creates a new file record. This Processor is similar to addRecord, but is customized for simplifying local content passing.

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescription
config-ref Optional. Specify which configuration to use.
content The content of the file record to add. It can be of type String, byte array, File or InputStream. If it is an input stream, this Processors also closes it.
fileName The name of the remote file
folderId The id of the folder record where to add this file
folderIdType Optional. The id type of the folder record
Child Elements
<netsuite:attributes>
Optional. The additional file attributes
Return Payload
  • the RecordRef of the new record
Exception Payload
IOException

<netsuite:add-record>

Creates a new record. Example:

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescription
config-ref Optional. Specify which configuration to use.
recordType The type of record to add
Child Elements
<netsuite:attributes>
The record attributes, as a string-object map
Return Payload
  • the RecordRef of the new record

<netsuite:async-find-records>

Searches for all records that match the given filtering expression, asynchronously. If no expression is specified, all records of the given type are retrieved Filtering expressions support both basic and joined syntax, that is, using in the filters attributes of both the target entity and the target entity associations. Advanced search is not supported. Search expressions are in the form operator(attribute, arguments...) for basic search, and operator(join.attribute, arguments...) for joined search, where operator is any of the string, long, double, and text operators supported by SuiteTalk - MultiSelect operators are not supported - plus the isTrue/isFalse boolean operators, and arguments are zero up to three operands that depend on the operator used. Examples:

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescription
config-ref Optional. Specify which configuration to use.
recordType The type of record to search
expression Optional. The filtering expression, in the form operator(attribute, arguments...) for basic search, and operator(join.attribute, arguments...) for joined search, where operator is any of the string, long, double, and text operators supported by SuiteTalk - MultiSelect operators are not supported - plus the isTrue/isFalse boolean operators, and arguments are zero up to three operands that depend on the operator used. Multiple filters can be combined using multiple predicates separated by commas.
Child Elements
Return Payload
  • the AsyncStatusResult of the query
Exception Payload
Exception

<netsuite:attach-record>

Attaches a source record - that is, the attachment - to another destination one, optionally specifying a contact for the attachment. Not all record type are supported as source, destination or contact. Please consult NetSuite documentation. Example:

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescription
config-ref Optional. Specify which configuration to use.
sourceRecordType The type of the target record to be attached
sourceId The id of the target record to be attached
sourceIdType Optional. The id type of the record to be attached
destinationRecordType The type of the record to be attached to
destinationId The id of the record to be attached to
destinationIdType Optional. The id type of the record to be attached to
contanctRecordType Optional. The record type of the optional contact record
contanctId Optional. The id of the optional contact record
contanctIdType Optional. The id type of the optional contact record
Child Elements

<netsuite:check-async-status>

Answers the status of an asynchronous Web services submission. When a jobId is submitted, the status, percent complete, and estimated remaining duration are returned. Example:

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescription
config-ref Optional. Specify which configuration to use.
jobId The id of the job whose status to check
Child Elements
Return Payload
  • the AsyncStatusResult for the given job

<netsuite:delete-record>

Deletes a record. Not all records can be deleted. Please consult NetSuite documentation Example:

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescription
config-ref Optional. Specify which configuration to use.
recordType The type of the record to delete
id The id of the record to delete
idType Optional. The type of id of the record to delete
Child Elements

<netsuite:detach-record>

Detaches a source record - that is, the attachment - from a destination record. Example:

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescription
config-ref Optional. Specify which configuration to use.
sourceRecordType The type of the target record to be detached
sourceId The id of the target record to be detached
sourceIdType Optional. The id type of the record to be detached
destinationRecordType The type of the record to be detached to
destinationId The id of the record to be detached to
destinationIdType Optional. The id type of the record to be detached to
Child Elements

<netsuite:find-first-record>

Answers the first records that match the given filtering expression. If no expression is specified, the empty expression is used, which retrieves all records of the given type. Throws a NoSuchElementException if no record can be retrieved. Filtering expressions support both basic and joined syntax, that is, using in the filters attributes of both the target entity and the target entity associations. Advanced search is not supported. Search expressions are in the form operator(attribute, arguments...) for basic search, and operator(join.attribute, arguments...) for joined search, where operator is any of the string, long, double, and text operators supported by SuiteTalk - MultiSelect operators are not supported - plus the isTrue/isFalse boolean operators, and arguments are zero up to three operands that depend on the operator used. Examples:

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescription
config-ref Optional. Specify which configuration to use.
recordType The type of record to search
expression Optional. The filtering expression Multiple filters can be combined using multiple predicates separated by commas.
Child Elements
Return Payload
  • the first record that match the given filtering expression

<netsuite:find-records>

Answers all records that match the given filtering expression. If no expression is specified, the empty expression is used, which retrieves all records of the given type. Filtering expressions support both basic and joined syntax, that is, using in the filters attributes of both the target entity and the target entity associations. Advanced search is not supported. Search expressions are in the form operator(attribute, arguments...) for basic search, and operator(join.attribute, arguments...) for joined search, where operator is any of the string, long, double, and text operators supported by SuiteTalk - MultiSelect operators are not supported - plus the isTrue/isFalse boolean operators, and arguments are zero up to three operands that depend on the operator used.

XML Sample
INCLUDE_ERROR
Examples:

Attributes
NameDefault ValueDescription
config-ref Optional. Specify which configuration to use.
recordType The type of record to search
expression Optional. The filtering expression Multiple filters can be combined using multiple predicates separated by commas.
Child Elements
Return Payload
  • a list of Record's

<netsuite:get-async-find-first-result>

Answers the the first result of an asynchronous asyncFind. Throws a NoSuchElement exception if there are no results. This Processor can be executed Processor up to 20 times within a 30 day time period to retrieve the results of an asynchronous job. Example:

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescription
config-ref Optional. Specify which configuration to use.
jobId The id of the job
Child Elements
Return Payload
  • the first Record

<netsuite:get-async-find-result>

Answers the results of an asynchronous web services submission. This Processor can be executed Processor up to 20 times within a 30 day time period to retrieve the results of an asynchronous job. Example:

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescription
config-ref Optional. Specify which configuration to use.
jobId The id of the job
Child Elements
Return Payload
  • the Record's list

<netsuite:get-budget-exchange-rates>

Answers the list of budget exchange rates Example:

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescription
config-ref Optional. Specify which configuration to use.
periodId The id of the period
periodIdType Optional. The period id type
fromSubsidiaryId The id of the staring subsidiary
fromSubsidiaryIdType Optional. The starting subsidiary id type
toSubsidiaryId Optional. The the id of the optional ending subsidiary
toSubsidiaryIdType Optional. The id type of the optional ending subsidiary
Child Elements
Return Payload
  • a list of BudgetExchangeRate's

<netsuite:get-consolidated-exchange-rates>

Answers the list of consolidated exchange rates Example:

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescription
config-ref Optional. Specify which configuration to use.
periodId The id of the period
periodIdType Optional. The period id type
fromSubsidiaryId The id of the staring subsidiary
fromSubsidiaryIdType Optional. The starting subsidiary id type
toSubsidiaryId Optional. The the id of the optional ending subsidiary
toSubsidiaryIdType Optional. The id type of the optional ending subsidiary
Child Elements
Return Payload
  • a list of ConsolidatedExchangeRate's

<netsuite:get-customization-ids>

Answers the ids of available customizations for a given record type. Example:

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescription
config-ref Optional. Specify which configuration to use.
type The target record type
includeInactives Optional. If inactive customizations should also be returned
Child Elements
Return Payload
  • a list of CustomizationRef's

<netsuite:get-deleted-records>

Answers a list of deleted records of a given record type that match a given date expression. This Processors accepts two different date expression passing styles: string oriented, and object oriented. If whenExpression is specified, it is parsed and used as date expression. Otherwise, a date expression is build from date1, date2 and operator parameters. The first style is more appropriate when the date expression can be harcdoded, while the second style is better when client code already has date objects. However, predefined search values like thisWeek, tomorrow or today can only be used with the first, string oriented, style. String oriented date expressions are in the form Processor( searchValue, arguments...), where Processor is any of the NetSuite supported date Processors, arguments are one or two operands for the given operator, and searchValue is some of the supported predefined search value as defined by NetSuite or any of the following expressions: isoDate( anIsoDate ), isoDateRante( anIsoDate, anotherIsoDate ) , dateTime( aQuotedDateTime, aQuoatedJavaDateFormat ), dateTimeRange( aQuotedDateTime, anotherQuotedDateTime, aQuoatedJavaDateFormat ). Supported predefined search values are: today, thisWeek, thisBusinessWeek, thisMonth,thisYear, yesterday, twoDaysAgo, lastWeek, lastMonth, threeMonthAgo,tomorrow, nextMonth , nextWeek Examples using both string and object oriented styles:

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescription
config-ref Optional. Specify which configuration to use.
type The type of the target deleted record to retrieve
whenExpression Optional. A predicate-style date filtering expression
date1 Optional. The first date to use
date2 Optional. The second date to use
operator Optional. The date operator
Child Elements
Return Payload
  • the list of DeletedRecord's that match the given date filtering expression

<netsuite:get-item-availabilities>

Answers the availability for a given record reference. If the Multi-Location Inventory feature is enabled, this Processor returns results for all locations. For locations that do not have any items available, only location IDs and names are listed in results. Example:

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescription
config-ref Optional. Specify which configuration to use.
recordType The target record type
id The target record id
idType Optional. The id type of the given record id
ifModifiedSince Optional. An optional modified since date. If set, only items with quantity available changes recorded as of the specified date are returned.
Child Elements
Return Payload
  • A list of ItemAvailability's

<netsuite:get-record>

Answers a record given its id Example:

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescription
config-ref Optional. Specify which configuration to use.
recordType The target record type
id The target record id
idType Optional. The id type of the given record id
Child Elements
Return Payload
  • a Record

<netsuite:get-records>

Answers all the record of a given type Example:

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescription
config-ref Optional. Specify which configuration to use.
type The target record type
Child Elements
Return Payload
  • the list of Record's

<netsuite:get-saved-search>

Retrieves a list of existing saved searches for the given record type. Example:

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescription
config-ref Optional. Specify which configuration to use.
type The target record type
Child Elements
Return Payload
  • the list of RecordRedf's

<netsuite:initialize>

Populates fields on transaction line items with values from a related record, in a similar way empty text boxes are prepopulated within the Netsuite UI Example:

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescription
config-ref Optional. Specify which configuration to use.
type The type of record whose defaults values are used to populate the target record
recordType The target record type
id The target record id
idType Optional. The id type of the given record id
Child Elements
Return Payload
  • the initialized Record

<netsuite:saved-find-records>

Answers all records of a given type for a saved search, given its search id. Examples:

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescription
config-ref Optional. Specify which configuration to use.
recordType The type of record to search
searchId The id of the save search
Child Elements
Return Payload
  • a list of Record's

<netsuite:update-invitee-status>

Sets a new invitation status for a given event. Example: Example:

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescription
config-ref Optional. Specify which configuration to use.
eventId The target event id
eventIdType Optional. The id type of the given eventId
status The new status to set
Child Elements

<netsuite:update-record>

Updates an existing record. Example:

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescription
config-ref Optional. Specify which configuration to use.
recordType The target record type to update
id The target record id
idType Optional. The id type of the given record id
Child Elements
<netsuite:attributes>
The record attributes, as a string-object map
Exception Payload
Exception