Backend Models for NetSuite SuiteCommerce Integration

Backend models facilitate data transactions in SuiteCommerce with RESTful APIs, connecting frontend applications to NetSuite records.

·2 min read·View Oracle Docs

TL;DR Opening

Backend models in SuiteCommerce Advanced (SCA) provide a critical interface for handling data transactions with NetSuite. Leveraging RESTful APIs, these models ensure seamless communication between frontend applications and backend records.

What Are Backend Models?

Backend models act as the method interfaces that access NetSuite records through the SuiteScript API. They are essential components of the data architecture in SuiteCommerce, enabling various functionalities within the application.

Structure of Backend Models

Each backend model is designed to manage specific HTTP actions (GET, POST, PUT, DELETE), and each model must format the resultant JSON object returned to the frontend framework. For example, a model handling a GET request to retrieve data must define a method to format this data appropriately.

Example Use Case: Cart Module

The Cart module within SCA is a practical illustration where backend models and services work together to access items in the shopping cart. This integration involves defining services that link to various backend models responsible for different aspects of cart functionality.

Deployment and Organization

When deploying SuiteCommerce Advanced:

  • Gulp Tasks: These tasks deploy services to the SSP application and include backend models in the ssp_libraries.js file. This file contains all backend models combined from the application modules.
  • JavaScript Structure: Services and backend models are stored within the JavaScript directory of each module, ensuring they can leverage the SuiteScript API effectively.

Related Components

  1. Services: Services manage the communication initiated by frontend models and handle the HTTP requests.
  2. SuiteScript API: This API provides access to the underlying records, crucial for the backend model's operations.

By migrating to SuiteScript 2.0, SuiteCommerce and SuiteCommerce Advanced will improve their interaction with core NetSuite records, enhancing overall functionality and integration efficiency.

Who This Affects

  • Developers: They need to configure and deploy backend models appropriately within the SuiteCommerce framework.
  • Administrators: Responsible for managing and overseeing the deployment of SuiteCommerce solutions.

Key Takeaways

  • Backend models are essential for integrating SuiteCommerce with NetSuite records.
  • They provide a structured way to handle various data transaction requests using RESTful APIs.
  • Proper deployment involves using Gulp tasks to compile models into the SSP application.

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

Frequently Asked Questions (4)

Do backend models in SuiteCommerce require enabling a feature flag?
The article does not specify the need for enabling a feature flag to use backend models in SuiteCommerce.
How do backend models in SuiteCommerce handle HTTP request methods?
Backend models are designed to manage specific HTTP actions such as GET, POST, PUT, and DELETE. Each model formats the JSON object returned for these actions to the frontend framework.
What role do Gulp tasks play in the deployment of backend models?
Gulp tasks deploy services to the SSP application, compiling all backend models from application modules into the `ssp_libraries.js` file.
Does migrating to SuiteScript 2.0 affect backend model interactions with NetSuite records?
Yes, migrating to SuiteScript 2.0 enhances the interaction between SuiteCommerce and NetSuite records, improving functionality and integration efficiency.
Source: Backend Model 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 →