createFunctionProduction( )


Developer Preview

This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

Creates a function production.

This method creates a function, an automation, and a service plugin configuration. It also creates a function method that links the function to the automation. Learn more about function creation.

You can create a function production from a function type or a function template. If you create a function production from a function type, the automation created will not contain any logic. If you create a function production from a function template, the automation created will contain the template's automation logic.

Note: Some function types have a default template applied, in which case the automation created will contain the default template's automation logic.

Once created, all parts of the function production can be updated using the Update Function Production method or other APIs. They work together so if you update the function, or anything related to it, the function production object will be updated to reflect the changes.

Authentication
  • When developing websites or building an app with Blocks, this method may require elevated permissions, depending on the identity of the user calling it and the calling user's permissions.
  • When building apps without Blocks or for headless projects, you can only call this method directly when authenticated as a Wix app or Wix user identity. When authenticated as a different identity, you can call this method using elevation.
  • Elevation permits users to call methods they typically cannot access. Therefore, you should only use it intentionally and securely.
Permissions
Manage Functions
Learn more about app permissions.
Method Declaration
Copy
Method Parameters
functionProductionFunctionProductionRequired

Function production to create.

Returns
Return Type:Promise<FunctionProduction>
Errors

This method doesn't return any custom errors, but may return standard errors. Learn more about standard Wix errors.

Did this help?