SuiteScript Explained: Choose the Right Script for NetSuite
Not sure which SuiteScript type fits your NetSuite project? This guide breaks down Client, User Event, Suitelet, Map/Reduce, and RESTlet scripts—clearly and simply.
Learn how we built a custom solution for managing multi-site customers in SuiteCommerce Advanced—streamlining logins, orders, and transaction visibility.
One of the most common challenges faced by businesses operating multiple eCommerce storefronts within NetSuite SuiteCommerce Advanced (SCA) is managing customer records across these sites. This becomes especially complex when customers need seamless access to multiple brands or subsidiaries through a single login, without duplicating customer records. In this post, we’ll explore a comprehensive solution designed to solve this problem for a client managing two brands.
This solution consolidates customer access across multiple subsidiaries and web stores, enabling a unified customer experience. We’ll walk through the architectural decisions, backend customizations, and system constraints we navigated to bring this solution to life.
NetSuite SuiteCommerce Advanced, by default, requires customer records to be tied to a single subsidiary. In a multi-site environment, this creates fragmented customer data. Customers must register and manage separate logins for each site, despite being the same individual.
The primary challenge was:
How do we enable a single customer record to shop across multiple SuiteCommerce websites (under different subsidiaries) without duplicating customer records, compromising the user experience, or causing issues with the order placement and communication?
Our approach divides the solution into five key modules:
Each module plays a vital role in delivering a seamless, unified experience. Although they’re presented as distinct components, they’re interdependent and must be implemented as a cohesive solution.
The first major challenge was login management. The Contact-Customer Customization module addresses the need for a single login that allows users to access any customer record associated with their account across multiple web stores. To achieve this, we developed a custom service that retrieves all customer relationships linked to the logged-in contact.
Upon login, users are presented with a tailored menu where they can select which customer account they wish to access. This process is seamless to the user and handled through custom scripting within the SuiteCommerce extension, ensuring that switching between customer records happens smoothly without requiring multiple logins.
A few additional enhancements ensured everything ran smoothly:
Next up was order placement. NetSuite’s standard setup wouldn’t allow customers to place orders under different subsidiaries without separate accounts, so we had to work around that. The Sales Order Management module enables customers to place orders across multiple subsidiaries from a single login without duplicating customer records. When a customer places an order, a User Event script triggers before submission to intercept the standard NetSuite order creation process.
The order is then created through a custom backend process, which dynamically assigns the appropriate subsidiary based on the originating website. This ensures the order adheres to NetSuite’s subsidiary-specific accounting rules while allowing cross-subsidiary transactions through a unified customer interface. Since the standard NetSuite order placement is bypassed, the order confirmation process is also customized.
A tailored confirmation page displays order details and provides links to the transaction history, replicating the expected customer experience. To support this functionality, we:
The Email Management module replaces NetSuite’s native transactional emails with a custom notification system designed to align with the bespoke order placement process. Because our Sales Order Management solution bypasses native order creation flows, standard system emails (such as order confirmations and shipping notifications) are not triggered automatically. Instead, we implemented User Event scripts that listen for key events—such as order approval, fulfillment, or cancellation—and send custom email notifications to customers.
We created four new email templates to support these communications:
These templates mimic NetSuite’s native formats but include additional customization to reflect the client’s branding and user experience requirements. Notably, certain dynamic fields—like website-specific details, item images, and call-to-action buttons—required custom logic to populate correctly within the emails.
The Transaction History Management module ensures customers can view the correct order history when logged into any web store. NetSuite’s standard transaction history filters transactions by website rather than subsidiary, which can result in customers seeing incomplete records if they’ve placed orders across multiple sites.
To address this, we customized the SuiteCommerce Transaction History module to filter transactions by a custom body field that captures the originating website. This allows the My Account page to display only those transactions relevant to the current site, ensuring consistency and clarity for the customer. The customized transaction history provides a seamless, intuitive experience, giving users confidence that they can track and manage their orders effectively across all sites they interact with.
The Quotes to Sales Order Management module ensures that customers can continue using NetSuite’s native functionality to convert quotes into sales orders, even within the customized multi-subsidiary framework. Customers can view and approve quotes as they normally would in SuiteCommerce, and upon approval, the system processes the quote-to-order conversion using standard NetSuite logic.
However, once converted, the newly created sales orders are handled by our custom Email Management module to ensure that confirmation and fulfillment communications are sent consistently with the rest of the customized order flow. This hybrid approach balances NetSuite’s out-of-the-box functionality with the need for customized communication and subsidiary handling.
During the development of this solution, we encountered several important limitations. First, NetSuite limits the use of User Event scripts in web store contexts, requiring creative workarounds—such as custom body fields—to capture necessary data and execute scripts at the appropriate stages.
Additionally, email template customization presented challenges, as certain system variables behave differently in custom templates compared to native NetSuite templates. These limitations required extra development effort to ensure consistent behavior across the system.
By implementing this solution, we bridged SuiteCommerce Advanced limitations by enabling multi-site access with a single customer record—eliminating duplicate records while providing a seamless user experience. With tailored Sales Order flows, dynamic email management, and enhanced transaction history, businesses like the one we worked with can offer a modern eCommerce experience across multiple brands and subsidiaries within a single NetSuite environment.
If your organization is facing similar challenges with SuiteCommerce Advanced, reach out! We’re happy to discuss how this solution—or a variation of it—can work for your business.
Not sure which SuiteScript type fits your NetSuite project? This guide breaks down Client, User Event, Suitelet, Map/Reduce, and RESTlet scripts—clearly and simply.
Discover the best SuiteCommerce extensions for B2B and B2C online stores. From bulk ordering tools to infinite scroll, these must-have add-ons boost UX and drive conversions.
SuiteCommerce vs. SuiteCommerce Advanced—which one is right for your business? Learn the 5 key differences in customization, cost, and scalability to make the best choice.
Let’s talk about how we can help you to launch, migrate or optimize your digital channels with SuiteCommerce. Please complete our contact form and we’ll be in touch as soon as possible.