API Extensions Reference

API Extensions as a Service, formerly known as Arc.js, is a development framework that allows developers to execute custom code whenever certain actions occur. To learn the basics of API Extensions, refer to:

Reference Help

The API Extensions documentation are organized first by domains, and then by the actions each domain contains. This structure mirrors how the Yeoman scaffolding tool organizes a project folder on your local machine. Each domain is a folder that contains actions, and each action is a JavaScript file in which you can insert your custom code. Each action has access to specific methods that can get or update objects. To learn about these methods, refer to the individual action reference topics.

Domains

Note that some of these domains may require eCommerce implementation (such as storefront and catalog.admin), and thus will not apply to an OMS-only integration of the platform.

Domain NameDomain Description
commerce.cartsThis domain contains actions associated with the cart.
commerce.catalog.adminThis domain contains actions associated with your catalog.
commerce.catalog.storefront.productsThis domain contains actions associated with storefront products.
commerce.catalog.storefront.shippingThis domain contains actions associated with shipping.
commerce.catalog.storefront.taxThis domain contains actions associated with tax.
commerce.customerThis domain contains actions associated with shopper accounts.
commerce.ordersThis domain contains actions associated with orders.
commerce.paymentsThis domain contains actions associated with payments.
commerce.returnThis domain contains actions associated with returns.
commerce.settingsThis domain contains actions associated with settings for sites, checkout, installed applications, locations, shipping, and general settings.
platform.applicationsThis domain contains actions associated with applications.
storefrontThis domain contains actions associated with storefront pages.

Software Requirements

Install the following software on your local machine in order to code actions:

  • Command Line Interface—Provides a console or terminal environment in which to execute commands. If you are developing on a Windows machine, Kibo recommends you use the Windows command prompt. However, due to known Windows compatibility issues in Node.js, you may encounter issues when using the API Extensions tools (for example, the tools may not register your keystrokes). If you encounter such issues, Kibo recommends you use a third-party console emulator, such as cmder, which plays nicer with Node.js.
  • Node.js—Provides a platform for creating scalable network applications. Includes the npm package manager, which you can use to install the Yeoman generator and the helper function described in the Tools section of this topic.
  • Grunt.js—Provides a task manager that automates repetitive tasks. You use Grunt to build your project files and upload them to the Dev Center.
  • Git (optional)—Provides a version control system to manage your project files. When you set up your project files using the Yeoman tool, you have the option of creating a Git repository for those files.

Tools

API Extensions provide the following tools to facilitate development:

  • Yeoman Generator—Provides a scaffolding tool that enables you to quickly create a project folder on your local machine that contains all the necessary files to code actions.
  • Action Management JSON Editor—Available within a sandbox, this editor allows you to enable or disable actions for the sandbox. It also allows you to specify settings and pass custom data to the actions.
  • JSON Configuration Helper Function—Provides code that you can insert into the embedded.platform.applications.install action so that the actions installed in your project files are automatically enabled when you install the application that contains the actions to a sandbox. Note that you can also achieve this functionality through a setting available in the Yeoman Generator.