> Portal Navigation: > > - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version. > - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages). > - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`). > - Top-level index of all portals: https://dev.wix.com/docs/llms.txt > - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt # CreateFunctionBuilderlessProduction # Package: functions # Namespace: FunctionBuilderlessProductions # Method link: https://dev.wix.com/docs/api-reference/business-management/functions/builderless-productions/create-function-builderless-production.md ## Permission Scopes: Manage Functions: SCOPE.DC-FUNCTIONS.MANAGE-FUNCTIONS ## Introduction Creates a builderless 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. Once created, the function is ready to be activated. Learn more about [function creation](https://dev.wix.com/docs/api-reference/business-management/functions/about-function-creation-and-activation.md#quick-creation-and-configuration). You can only create a function production from a function template that has a `formTemplateExtensionId`. Use the `formTemplateExtensionId` to retrieve the required form values by calling the Form Schema API's [List Forms](https://dev.wix.com/docs/api-reference/crm/forms/form-schemas/list-forms.md) method, specifying the following parameters: - `namespace`: `wix.function_template.form` - `formIds`: An array that contains the function template's `formTemplateExtensionId` - `kind`: `EXTENSION` --- ## REST API ### Schema ``` Method: createFunctionBuilderlessProduction Description: Creates a builderless 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. Once created, the function is ready to be activated. Learn more about [function creation](https://dev.wix.com/docs/api-reference/business-management/functions/about-function-creation-and-activation.md#quick-creation-and-configuration). You can only create a function production from a function template that has a `formTemplateExtensionId`. Use the `formTemplateExtensionId` to retrieve the required form values by calling the Form Schema API's [List Forms](https://dev.wix.com/docs/api-reference/crm/forms/form-schemas/list-forms.md) method, specifying the following parameters: - `namespace`: `wix.function_template.form` - `formIds`: An array that contains the function template's `formTemplateExtensionId` - `kind`: `EXTENSION` URL: https://www.wixapis.com/functions/v1/function-builderless-productions Method: POST # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present. Required parameters: functionBuilderlessProduction, functionBuilderlessProduction.appId, functionBuilderlessProduction.function.functionTemplateExtensionId, functionBuilderlessProduction.function.formTemplateExtensionId Method parameters: param name: functionBuilderlessProduction | type: FunctionBuilderlessProduction | description: A function builderless production defines a function and its related entities. | required: true - name: appId | type: string | description: App GUID of the business solution that created the function type the function builderless production is based on. | required: true - name: formValues | type: Map | description: Form values used to create the function. Retrieve the required form values by calling the Form Schema API's [List Forms](https://dev.wix.com/docs/api-reference/crm/forms/form-schemas/list-forms.md) method, specifying the following parameters: - `namespace`: `wix.function_template.form` - `formIds`: An array that contains the function template's `formTemplateExtensionId` - `kind`: `EXTENSION` - ONE-OF: - name: nullValue | type: | description: - name: numberValue | type: number | description: - name: stringValue | type: string | description: - name: boolValue | type: boolean | description: - name: structValue | type: object | description: - name: listValue | type: ListValue | description: - name: values | type: array | description: - name: function | type: Function | description: Function created from the function builderless production. - name: functionTemplateExtensionId | type: string | description: Function template extension id | required: true - name: formTemplateExtensionId | type: string | description: Form template extension id | required: true - name: functionSpiConfiguration | type: FunctionSpiConfiguration | description: Service plugin configuration for the function. - name: configuration | type: object | description: Function SPI configuration dev center component payload. Return type: CreateFunctionBuilderlessProductionResponse - name: functionBuilderlessProduction | type: FunctionBuilderlessProduction | description: The created function builderless production. - name: id | type: string | description: Function builderless production GUID. This is the same as the associated function's GUID. - name: appId | type: string | description: App GUID of the business solution that created the function type the function builderless production is based on. - name: formValues | type: Map | description: Form values used to create the function. Retrieve the required form values by calling the Form Schema API's [List Forms](https://dev.wix.com/docs/api-reference/crm/forms/form-schemas/list-forms.md) method, specifying the following parameters: - `namespace`: `wix.function_template.form` - `formIds`: An array that contains the function template's `formTemplateExtensionId` - `kind`: `EXTENSION` - ONE-OF: - name: nullValue | type: | description: - name: numberValue | type: number | description: - name: stringValue | type: string | description: - name: boolValue | type: boolean | description: - name: structValue | type: object | description: - name: listValue | type: ListValue | description: - name: values | type: array | description: - name: function | type: Function | description: Function created from the function builderless production. - name: id | type: string | description: Function GUID. - name: createdDate | type: string | description: Date and time the function was created. - name: functionExtensionId | type: string | description: The function's app extension GUID. - name: functionName | type: string | description: Function name. - name: activationStatus | type: ActivationStatus | description: Activation status - enum: - ACTIVE: Function is activated. - INACTIVE: Function is deactivated. - DRAFT: Function is saved but has never been activated. - name: appId | type: string | description: GUID of the app that defines the function. - name: functionExtensionName | type: string | description: The function's app extension name. - name: functionTemplateExtensionId | type: string | description: Function template extension id - name: formTemplateExtensionId | type: string | description: Form template extension id - name: updatedDate | type: string | description: Date and time the function was last updated. - name: revision | type: string | description: Revision number that increases with every update. - name: functionSpiConfiguration | type: FunctionSpiConfiguration | description: Service plugin configuration for the function. - name: id | type: string | description: SpiConfiguration GUID. - name: revision | type: string | description: SpiConfiguration revision. - name: createdDate | type: string | description: Date and time the SpiConfiguration was created. - name: updatedDate | type: string | description: Date and time the SpiConfiguration was last updated. - name: functionId | type: string | description: Function GUID - name: configuration | type: object | description: Function SPI configuration dev center component payload. - name: automationIds | type: array | description: Automations created from the function builderless production. ``` ### Examples ### Create Function Builderless Production ```curl curl -X POST \ https://www.wixapis.com/functions/v1/function-builderless-productions \ -H 'Authorization: ' \ -H 'Content-Type: application/json' \ -d '{ "functionBuilderlessProduction": { "appId": "d49080e4-7b60-4dd4-b18a-f7ba7856bf27", "function": { "functionTemplateExtensionId": "545d1812-601f-4867-9f62-32a077e7d3f0", "formTemplateExtensionId": "5db3dbf9-6f02-442d-9eb8-4276461648e9", }, "formValues": { "config.description": "This is service plugin" } } }' ``` --- ## JavaScript SDK ### Schema ``` Method: wixClientAdmin.functions.FunctionBuilderlessProductions.createFunctionBuilderlessProduction(functionBuilderlessProduction) Description: Creates a builderless 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. Once created, the function is ready to be activated. Learn more about [function creation](https://dev.wix.com/docs/api-reference/business-management/functions/about-function-creation-and-activation.md#quick-creation-and-configuration). You can only create a function production from a function template that has a `formTemplateExtensionId`. Use the `formTemplateExtensionId` to retrieve the required form values by calling the Form Schema API's [List Forms](https://dev.wix.com/docs/api-reference/crm/forms/form-schemas/list-forms.md) method, specifying the following parameters: - `namespace`: `wix.function_template.form` - `formIds`: An array that contains the function template's `formTemplateExtensionId` - `kind`: `EXTENSION` # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present. Required parameters: functionBuilderlessProduction, functionBuilderlessProduction.appId, functionBuilderlessProduction.function.functionTemplateExtensionId, functionBuilderlessProduction.function.formTemplateExtensionId Method parameters: param name: functionBuilderlessProduction | type: FunctionBuilderlessProduction | description: A function builderless production defines a function and its related entities. | required: true - name: appId | type: string | description: App GUID of the business solution that created the function type the function builderless production is based on. | required: true - name: formValues | type: Map | description: Form values used to create the function. Retrieve the required form values by calling the Form Schema API's [List Forms](https://dev.wix.com/docs/api-reference/crm/forms/form-schemas/list-forms.md) method, specifying the following parameters: - `namespace`: `wix.function_template.form` - `formIds`: An array that contains the function template's `formTemplateExtensionId` - `kind`: `EXTENSION` - ONE-OF: - name: nullValue | type: | description: - name: numberValue | type: number | description: - name: stringValue | type: string | description: - name: boolValue | type: boolean | description: - name: structValue | type: object | description: - name: listValue | type: ListValue | description: - name: values | type: array | description: - name: function | type: Function | description: Function created from the function builderless production. - name: functionTemplateExtensionId | type: string | description: Function template extension id | required: true - name: formTemplateExtensionId | type: string | description: Form template extension id | required: true - name: functionSpiConfiguration | type: FunctionSpiConfiguration | description: Service plugin configuration for the function. - name: configuration | type: object | description: Function SPI configuration dev center component payload. Return type: PROMISE - name: _id | type: string | description: Function builderless production GUID. This is the same as the associated function's GUID. - name: appId | type: string | description: App GUID of the business solution that created the function type the function builderless production is based on. - name: formValues | type: Map | description: Form values used to create the function. Retrieve the required form values by calling the Form Schema API's [List Forms](https://dev.wix.com/docs/api-reference/crm/forms/form-schemas/list-forms.md) method, specifying the following parameters: - `namespace`: `wix.function_template.form` - `formIds`: An array that contains the function template's `formTemplateExtensionId` - `kind`: `EXTENSION` - ONE-OF: - name: nullValue | type: | description: - name: numberValue | type: number | description: - name: stringValue | type: string | description: - name: boolValue | type: boolean | description: - name: structValue | type: object | description: - name: listValue | type: ListValue | description: - name: values | type: array | description: - name: function | type: Function | description: Function created from the function builderless production. - name: _id | type: string | description: Function GUID. - name: _createdDate | type: Date | description: Date and time the function was created. - name: functionExtensionId | type: string | description: The function's app extension GUID. - name: functionName | type: string | description: Function name. - name: activationStatus | type: ActivationStatus | description: Activation status - enum: - ACTIVE: Function is activated. - INACTIVE: Function is deactivated. - DRAFT: Function is saved but has never been activated. - name: appId | type: string | description: GUID of the app that defines the function. - name: functionExtensionName | type: string | description: The function's app extension name. - name: functionTemplateExtensionId | type: string | description: Function template extension id - name: formTemplateExtensionId | type: string | description: Form template extension id - name: _updatedDate | type: Date | description: Date and time the function was last updated. - name: revision | type: string | description: Revision number that increases with every update. - name: functionSpiConfiguration | type: FunctionSpiConfiguration | description: Service plugin configuration for the function. - name: _id | type: string | description: SpiConfiguration GUID. - name: revision | type: string | description: SpiConfiguration revision. - name: _createdDate | type: Date | description: Date and time the SpiConfiguration was created. - name: _updatedDate | type: Date | description: Date and time the SpiConfiguration was last updated. - name: functionId | type: string | description: Function GUID - name: configuration | type: object | description: Function SPI configuration dev center component payload. - name: automationIds | type: array | description: Automations created from the function builderless production. ``` ### Examples ### createFunctionBuilderlessProduction ```javascript import { functionBuilderlessProductions } from '@wix/functions'; async function createFunctionBuilderlessProduction(functionBuilderlessProduction) { const response = await functionBuilderlessProductions.createFunctionBuilderlessProduction(functionBuilderlessProduction); }; ``` ### createFunctionBuilderlessProduction (with elevated permissions) ```javascript import { functionBuilderlessProductions } from '@wix/functions'; import { auth } from '@wix/essentials'; async function myCreateFunctionBuilderlessProductionMethod(functionBuilderlessProduction) { const elevatedCreateFunctionBuilderlessProduction = auth.elevate(functionBuilderlessProductions.createFunctionBuilderlessProduction); const response = await elevatedCreateFunctionBuilderlessProduction(functionBuilderlessProduction); } ``` ### createFunctionBuilderlessProduction (self-hosted) Self-hosted SDK calls require you to [create a client](https://dev.wix.com/docs/sdk/articles/work-with-the-sdk/about-the-wix-client.md). ```javascript import { createClient } from '@wix/sdk'; import { functionBuilderlessProductions } from '@wix/functions'; // Import the auth strategy for the relevant access type // Import the relevant host module if needed const myWixClient = createClient ({ modules: { functionBuilderlessProductions }, // Include the auth strategy and host as relevant }); async function createFunctionBuilderlessProduction(functionBuilderlessProduction) { const response = await myWixClient.functionBuilderlessProductions.createFunctionBuilderlessProduction(functionBuilderlessProduction); }; ``` ---