SuiteCommerce Advanced Models, Collections, and Services

SuiteCommerce Advanced uses frontend models, collections, and backend services to effectively manage data interactions with NetSuite during shopping...

·3 min read·View Oracle Docs

SuiteCommerce Advanced (SCA) enables interactive e-commerce experiences by working seamlessly with data stored in NetSuite. During a shopping session, SCA can read, update, and receive data based on user interactions. Understanding how SCA manages this data is essential for developers and administrators who want to leverage its full potential.

How Does SuiteCommerce Advanced Handle Data?

SCA performs several data-related actions, including:

  • Reading Data: When a user views item details, that information is directly retrieved from the corresponding NetSuite item record.
  • Updating Data: If a user places an order, the relevant order information is stored within a NetSuite order record.
  • Receiving New Data: For example, when a user adds a new address to their Address Book, the associated NetSuite address record gets updated accordingly.

Data Processing Structure

To facilitate these actions, SCA employs a structured model that includes both frontend and backend processes:

Frontend

This aspect defines how data is presented to users and how they input data. It utilizes frontend models and collections developed using Backbone.js framework components.

Backend

This component manages how SCA transfers data to and from NetSuite. The backend is facilitated through services and backend models that orchestrate the data flow.

What Are Frontend Models?

Frontend models in SCA are extensions of Backbone.Model and represent the data SCA utilizes. Each model encapsulates methods available to all models defined within SCA. When necessary, these core methods can be overridden to customize functionality. As a best practice, for specific modules, consider using SCModel instead of Backbone.Model for improved compatibility and performance.

Example Model Definition

Models can be defined in two primary ways:

  1. Specific Feature Models:
    javascript
    "text-purple-400">return Backbone.Model.extend
  2. Wider Application Context Models:
    javascript
    ProfileModel = Backbone.Model.extend

This approach allows for models, such as ProfileModel, to be accessed globally within the application, promoting reusability and efficiency.

Understanding Collections

Collections in SCA group sets of models together. They enable the application to manage dynamic lists of data, such as support cases or products. When using collections, certain actions can be triggered upon data changes, benefiting the user experience.

Transition to SCCollection

Starting from SuiteCommerce 2020.1, SCCollection should be employed in place of Backbone.Collection to maintain alignment with the extensibility API and improve functionality.

Who This Affects

This information is vital for:

  • Developers: They must understand how to structure and manipulate models and collections.
  • Administrators: They should know how data interactions are managed and displayed, ensuring optimal configurations.

Key Takeaways

  • SuiteCommerce Advanced effectively integrates with NetSuite data through models and collections.
  • Frontend and backend processes are essential for data management in e-commerce applications.
  • Transitioning to SCModel and SCCollection is best for maximizing capabilities in newer SCA versions.

Source: This article is based on Oracle's official NetSuite documentation.

Frequently Asked Questions (4)

How can I customize functionality in SuiteCommerce Advanced frontend models?
You can customize functionality in SCA frontend models by overriding the core methods available in Backbone.Model. However, for better compatibility and performance, it is recommended to use SCModel instead of Backbone.Model, especially for specific modules.
What should developers use in place of Backbone.Collection starting from SuiteCommerce 2020.1?
Developers should transition to using SCCollection instead of Backbone.Collection to maintain alignment with the extensibility API and enhance functionality in SuiteCommerce 2020.1 and newer versions.
How does SuiteCommerce Advanced handle data updates triggered by user actions like placing an order?
When a user places an order on SuiteCommerce Advanced, the relevant order information is stored in a corresponding NetSuite order record, ensuring that the data is updated in real-time within the NetSuite system.
What are the responsibilities of SuiteCommerce Advanced backend services?
The backend services in SCA are responsible for managing data transfer between SCA and NetSuite. They utilize backend models to orchestrate the flow of data, ensuring seamless interaction and data exchange.
Source: SCA Models, Collections, and Services 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 →