Function Architecture

Several components work together to provide additional capabilities for Wix sites through Functions. Understanding these components helps you create and manage functions effectively.

Tip:

To get the most out of this article, first create a function in a site's dashboard.

Function types and templates

When you create a function in the dashboard, you choose a type of function from the Function catalog. These are function types created by Wix that define:

  • When the business solution calls your function.
  • What parameters the function accepts.
  • What the function returns.

Function templates provide pre-configured automation logic that you can customize for specific function types. This makes function development more efficient by providing a starting point for common use cases.

With the Functions APIs, just as in the dashboard, you can create a function from a function type (start from scratch) or a function template.

Apps made by Wix create function types and templates that are only available on sites with the app installed. Use the Function Types and Function Templates APIs to retrieve the list of available function types and templates for a site.

Function components

A working function requires several components that work together. You need to define the function's logic and, for functions built from some function types, its service plugin configuration.

Function logic

An automation defines function logic, and a function method attaches it to a function. You only need to set up the connection once, and to update the function logic, you only need to update the automation.

Service plugin configuration

Manage your functions' service plugin configurations using the Function SPI Configuration API.

Learn more about service plugins and Wix Functions.

See also

Did this help?