> To build or manage a Wix site with an AI agent, follow https://www.wix.com/headless/skill.md
> It builds a new Wix site or puts your own site online, from a prompt, and keeps changing it afterwards. The pages are code in any web technology, and Wix runs the backend.
> It works through the Wix plugin (the Wix MCP and the Wix skills), the Wix CLI or no Wix login, and puts the site live on Wix hosting or on another host.
> Business features include a store, bookings, events and tickets, a restaurant, a blog, forms, members and many more.
> Read the Wix skills online at https://www.wix.com/skills
> 
> 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`).
> - If a reference page seems to be missing its schema (parameters, return types, or type definitions), append `?schema=true` to its `.md` URL (e.g. `https://dev.wix.com/docs/contexts/contexts/stores/category-info/use-category-info-context.md?schema=true`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

# Resource: Function Productions

# Type: Production Object

# Link: https://dev.wix.com/docs/api-reference/business-management/functions/function-productions/production-object.md

## Description: A function production defines a function and its related entities.

## Schema:

```json
 Type: Production Object | type: FunctionProduction
 Description: A function production defines a function and its related entities.
       - name: id  | type: string | description: Function production ID. This is the same as the created function's ID.
           - name: value  | type: string | description: 
       - name: appId  | type: string | description: App ID of the business solution that created the function type the function production is based on.
       - name: type  | type: string | description: Type that the function is created from.
           enum: BLANK, TEMPLATE
       - name: functionSpiConfiguration  | type: FunctionSpiConfiguration | description: Service plugin configuration for the function.
           - name: id  | type: string | description: SpiConfiguration ID.
           - name: revision  | type: string | description: SpiConfiguration revision.
               - name: value  | type: string | description: 
           - name: createdDate  | type: string | description: Date and time the SpiConfiguration was created.
               - name: seconds  | type: string | description: 
               - name: nanos  | type: number | description: 
           - name: updatedDate  | type: string | description: Date and time the SpiConfiguration was last updated.
           - name: functionId  | type: string | description: Function ID
           - name: configuration  | type: Struct | description: Function SPI configuration dev center component payload.
               - name: fields  | type: object | description: 
       - name: function  | type: Function | description: Function created from the function production.
           - name: id  | type: string | description: Function ID.
           - name: revision  | type: string | description: Revision number, which increments by 1 each time the function is updated. To prevent conflicting changes, the current revision must be passed when updating the function.  Ignored when creating a function.
           - name: createdDate  | type: string | description: Date and time the function was created.
           - name: updatedDate  | type: string | description: Date and time the function was last updated.
           - name: functionExtensionId  | type: string | description: The function's app extension ID.
           - name: functionName  | type: string | description: Function name.
           - name: activationStatus  | type: string | description: Activation status
               enum: ACTIVE, INACTIVE, DRAFT
           - name: appId  | type: string | description: ID 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: functionMethods  | type: Array<FunctionMethod> | description: Function methods created from the function production.
           - name: id  | type: string | description: Function method ID.
           - name: revision  | type: string | description: Function method revision.
           - name: createdDate  | type: string | description: Date and time the function method was created.
           - name: updatedDate  | type: string | description: Date and time the function method was last updated.
           - name: automationId  | type: string | description: ID of the automation to link to the function.
           - name: functionId  | type: string | description: ID of the function that this method links to an automation.
           - name: methodName  | type: string | description: Display name for the function method.
       - name: automations  | type: Array<Automation> | description: Automations created from the function production.
           - name: id  | type: string | description: Automation ID.
           - name: revision  | type: string | description: Revision number. This increments by 1 whenever the automation is updated. Specify the current revision number whenever updating an existing automation.
           - name: createdBy  | type: AuditInfo | description: Who created the automation.
               - ONE-OF:
                   - name: userId  | type: string | description: [User ID](https://dev.wix.com/docs/build-apps/get-started/overview/glossary.md#user-id).
                   - name: appId  | type: string | description: [App ID](https://dev.wix.com/docs/build-apps/get-started/overview/glossary.md#app-id).  You can find the app ID on the [Home page](https://manage.wix.com/app-selector?title=Select+an+App&primaryButtonText=Select+Site&actionUrl=https%3A%2F%2Fdev.wix.com%2Fapps%2F%7BappId%7D%home) in the app's dashboard.
           - name: createdDate  | type: string | description: When the automation was created.
           - name: updatedBy  | type: AuditInfo | description: Who last updated the automation.
           - name: updatedDate  | type: string | description: When the automation was last updated.
           - name: name  | type: string | description: Automation name as displayed on the user's site.
           - name: description  | type: string | description: Automation description.
           - name: configuration  | type: AutomationConfiguration | description: Automation configuration.
               - name: status  | type: string | description: Status of the automation on the site.
               - name: trigger  | type: Trigger | description: Trigger configuration.
               - name: rootActionIds  | type: Array<string> | description: Root action IDs. A root action is the first action that runs after the trigger occurs. Root actions run in parallel.  > **Note**: You can currently only specify 1 root action.
               - name: actions  | type: object | description: Actions the automation can execute, as `key:value` pairs. For the key, specify the action ID. The value must be an object structured as described below.
           - name: origin  | type: string | description: How the automation was added to the user's site.
               enum: USER, APPLICATION, PREINSTALLED
           - name: settings  | type: AutomationSettings | description: Automation settings. Applied only for pre-installed and application automations. Not applied to User origin automations
               - name: hidden  | type: boolean | description: Whether the automation is hidden from users.  Default: `false`
               - name: readonly  | type: boolean | description: Whether the automation is read-only.  When `true`, site owners can't modify the automation or any of its actions. When `false`, users can configure specific actions as skippable or read-only using `settings.actionSettings`.  Default: `false`.  > **Note**: Setting `readOnly` to `true` overrides `settings.actionSettings`.
               - name: disableDelete  | type: boolean | description: Whether to disable the option to delete the automation from the site.  Default: `false`.
               - name: disableStatusChange  | type: boolean | description: Whether to disable the option to change the automation's `configuration.status`.  Default: `false`.
               - name: actionSettings  | type: ActionSettings | description: Automation action settings.
           - name: draftInfo  | type: DraftInfo | description: Draft details. Returned only when the automation is a draft.
               - name: originalAutomationId  | type: string | description: ID of the automation that the draft is based on.  Empty when the draft isn't based on an existing automation.
           - name: archived  | type: boolean | description: Whether the automation is archived.  To archive an automation, set this to `true`. To restore an archived automation, set this to `false`.
           - name: autoArchivePolicy  | type: AutoArchivePolicy | description: Auto archive policy
               - name: archiveDate  | type: string | description: Date when to archive the automation If this date in the past, nothing will happen (automation will not go into archived state) If this date in the future, on this date the automation will be updated with archived = true and configuration.status = INACTIVE After this date the automation may be unarchived and archived again, this date will have no influence
           - ONE-OF:
               - name: applicationInfo  | type: ApplicationOrigin | description: When the origin of the automation is `APPLICATION`, the details of the app that created it.
                   - name: appId  | type: string | description: [App ID](https://dev.wix.com/docs/build-apps/get-started/overview/glossary.md#app-id).  You can find the app ID on the [Home page](https://manage.wix.com/app-selector?title=Select+an+App&primaryButtonText=Select+Site&actionUrl=https%3A%2F%2Fdev.wix.com%2Fapps%2F%7BappId%7D%home) in the app's dashboard.
               - name: preinstalledInfo  | type: PreinstalledOrigin | description: When the origin of the automation is `PREINSTALLED`, the details of the preinstalled automation.
                   - name: appId  | type: string | description: ID of the app that added the [preinstalled automation](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/backend-extensions/automations/pre-installed-automations/about-pre-installed-automations.md).
                   - name: override  | type: boolean | description: Whether the automation is an override.  When a user modifies the preinstalled automation installed on their site, a site-specific version of the automation is created that overrides the automation that was originally installed. This override automation is assigned a **new** automation ID — it does not reuse the ID of the original preinstalled automation.  > **Note**: Once an override exists, [Get Automation](https://dev.wix.com/docs/api-reference/business-management/automations/automations/automations-v2/get-automation.md) on the *original* preinstalled automation's ID returns `404 Not Found`. Use [Query Automations](https://dev.wix.com/docs/api-reference/business-management/automations/automations/automations-v2/query-automations.md) (for example, by `configuration.trigger.triggerKey`) to find the current automation, or retrieve `automationId` from the activation log. > > An override automation can no longer be updated by the app that originally installed it. > > To revert to the original preinstalled version, the user must delete the override by calling the Delete Automation method. Calling Delete Automation on an override automation removes the override and restores the preinstalled automation that was previously installed, once again accessible via its original ID.  Default: `false`.
               - name: templateInfo  | type: TemplateOrigin | description: When the origin of the automation is `TEMPLATE`, the details of the template automation.
                   - name: appId  | type: string | description: ID of the app that added the template automation.
       - name: createdDate  | type: string | description: Date and time the function production was created.
       - name: updatedDate  | type: string | description: Date and time the function production was last updated.
       - ONE-OF:
           - name: blankOptions  | type: BlankOptions | description: Options for creating a function from a function type.
               - name: functionExtensionId  | type: string | description: ID of the function type that the function was created from.
           - name: templateOptions  | type: TemplateOptions | description: Options for creating a function from a function template.
               - name: functionTemplateExtensionId  | type: string | description: ID of the function template that the function was created from.

```