Custom Plug-in Overview

A custom plug-in is customizable functionality that is defined by an interface. When you define an interface, third-party solution providers can develop custom plug-in implementations and bundle them in a SuiteApp. After the SuiteApp is installed in an account, a solution implementer can define one or more alternate implementations. These implementations let the solution implementer customize the plug-in’s logic to suit specific business needs.

Important:

The object-oriented interface is central to the plug-in model. To be more exact, a plug-in is an interface. Plug-ins aren't APIs and don't expose a class’s functions or objects. However, a Plug-in lets a third party override the logic in its default implementation.

A custom plug-in interface defines the function names, their parameters, and return types. You can call Interfaces in any third-party server SuiteScript script, except for Mass Update scripts.

Note:

Solution providers can only call functions from a custom plug-in interface within the custom plug-in implementation.

The solution provider defines a custom plug-in’s default logic in a default implementation. If applicable, the solution provider may define one or more alternate implementations.

Note:

Alternate implementations must be associated with a plug-in implementation type, which is a standard record type in NetSuite. When a solution provider releases a custom plug-in with alternate implementations, solution implementers cannot edit these alternate implementations.

When the custom plug-in’s implementations are installed or defined in the user's account, the NetSuite administrator activates the available implementations and chooses which one use. Whether a custom plug-in can use one or multiple implementations at a time depends on how the custom plug-in is set up. When an implementation is active, function calls in the custom plug-in script run that implementation’s logic.

Sample Use Case

Consider a SuiteApp that includes logic for calculating asset depreciation. The solution provider turns this functionality into a custom plug-in. The solution implementer then overrides the default functionality with one or more alternate implementations based on the user's specific accounting principles and business needs.

In another scenario, the solution provider releases the custom plug-in with multiple implementations, by-passing the solution implementer role. The NetSuite administrator chooses (activates) which one to run based on the user's needs.

Custom Plug-in Types

A custom plug-in type is a record type in NetSuite that holds a custom plug-in’s implementations and any supporting library files. The name of a custom plug-in type helps you distinguish its implementations from other custom plug-in implementations installed on an account.

Solution providers, solution implementers, and administrators use custom plug-in type in the following ways. For more information, see Custom Plug-in Creation.

Solution Providers
Solution Implementers
Administrators

Related Topics

General Notices