N/commerce Modules for SuiteCommerce Development

N/commerce modules streamline SuiteCommerce development, enabling quick access to web store assets with SuiteScript 2.x.

·2 min read·View Oracle Docs

The N/commerce namespace provides a set of modules designed for use with SuiteScript 2.x within SuiteCommerce applications. These modules offer a consistent development experience for web developers working with Commerce APIs. Although N/commerce is not a standalone module, it provides the critical resources needed to access various assets in the web store context effectively.

What Modules Are Available in N/commerce?

The core module currently available in the N/commerce namespace is:

Module NameDescription
N/commerce/recordViewThis module enables fast, cached, and public access to item fields and website settings.

Important Notes

Before loading modules from the N/commerce namespace, an active shopping session is required. While many web store interactions can be managed through these modules, not all functionality is currently supported. To fully customize web store operations on the SuiteCloud platform, developers can also utilize the Commerce APIs, albeit limited to SuiteScript 1.0 for those scenarios.

N/commerce/recordView Module Members

To dive deeper into the N/commerce/recordView module, here’s an overview of its members:

Member TypeNameReturn TypeSupported Script TypesDescription
MethodrecordView.viewItems(options)ObjectarrayRetrieves one or more items with specified item fields.
MethodrecordView.viewWebsite(options)ObjectClient and server scriptsGets website details, returning requested website fields.

Developers writing client and server scripts can easily retrieve item and website data through these methods.

Who This Affects

The following roles and modules may find the N/commerce namespace particularly beneficial:

  • Web Developers: Engaging with SuiteCommerce and enhancing customer experiences.
  • Administrators: Managing eCommerce transactions and configurations.

Key Takeaways

  • The N/commerce namespace simplifies SuiteCommerce application development using SuiteScript 2.x.
  • It currently includes the N/commerce/recordView module for accessing item and website data efficiently.
  • Developers must initiate an active shopping session before working with these modules.
  • Some Commerce API functionalities are accessible only with SuiteScript 1.0.
  • Continuous improvements and updates to these modules are expected in future releases.

Frequently Asked Questions (4)

Which modules are available in the N/commerce namespace for SuiteCommerce development?
The core module currently available in the N/commerce namespace is the N/commerce/recordView module, which facilitates fast, cached, and public access to item fields and website settings.
Are there any prerequisites for using N/commerce modules in SuiteCommerce?
Yes, an active shopping session must be initiated before loading modules from the N/commerce namespace.
What script types are supported by the methods in the N/commerce/recordView module?
The methods in the N/commerce/recordView module support both client and server script types.
Can developers use SuiteScript 1.0 with the N/commerce namespace?
While the N/commerce namespace is designed for SuiteScript 2.x, some functionalities of the Commerce APIs are limited to SuiteScript 1.0 for certain scenarios.
Source: N/commerce Modules Oracle NetSuite Help Center. This article was generated from official Oracle documentation and enriched with additional context and best practices.

Was this article helpful?

More in Commerce

View all Commerce articles →