> 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 # CreateChatSettings # Package: forms # Namespace: ChatSettingsService # Method link: https://dev.wix.com/docs/api-reference/crm/forms/chat-settings/create-chat-settings.md ## Permission Scopes: Manage Intake Form (PII): SCOPE.INTAKE-FORM.MANAGE_LIMITED ## Introduction Creates a chat settings entity. The settings specified in a chat settings entity apply to the form with the same ID as the chat settings entity. Each form can have exactly one set of chat settings. --- ## REST API ### Schema ``` Method: createChatSettings Description: Creates a chat settings entity. The settings specified in a chat settings entity apply to the form with the same GUID as the chat settings entity. Each form can have exactly one set of chat settings. URL: https://www.wixapis.com/forms/ai/v1/chat-settings Method: POST # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present. Required parameters: chatSettings, chatSettings.id Method parameters: param name: chatSettings | type: ChatSettings | required: true - name: id | type: string | description: The GUID of the chat settings. The chat settings specified in this object apply to the form with a matching GUID. | required: true - name: greetingMessage | type: string | description: Custom greeting message displayed when a visitor opens the AI chat. - name: chatEnabled | type: boolean | description: Whether AI chat is enabled for this form. Default: `true` - name: summaryMessage | type: string | description: Message that summarizes the contents of the form. Appears after the greeting message. - name: extendedFields | type: ExtendedFields | description: Extended fields. - name: namespaces | type: object | description: Extended field data. Each key corresponds to the namespace of the app that created the extended fields. The value of each key is structured according to the schema defined when the extended fields were configured. You can only access fields for which you have the appropriate permissions. Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields.md). - name: manualSummary | type: boolean | description: Whether the summary message is manually set or AI-generated. When `false` the summary message is automatically generated by AI when the chat settings are saved. When `true`, the summary message can be manually set and won't be overwritten by AI. Default: `false` - name: personality | type: Personality | description: Personality of the AI when interacting with visitors. Defines the communication style of the AI chat responses. - enum: PROFESSIONAL, FRIENDLY, PLAYFUL, DIRECT Return type: CreateChatSettingsResponse - name: chatSettings | type: ChatSettings | description: Created chat settings. - name: id | type: string | description: The GUID of the chat settings. The chat settings specified in this object apply to the form with a matching GUID. - name: greetingMessage | type: string | description: Custom greeting message displayed when a visitor opens the AI chat. - name: chatEnabled | type: boolean | description: Whether AI chat is enabled for this form. Default: `true` - name: revision | type: string | description: Revision number, which increments by 1 each time the chat settings are updated. To prevent conflicting changes, the current revision must be passed when updating the chat settings. - name: createdDate | type: string | description: Date and time the chat settings were created. - name: updatedDate | type: string | description: Date and time the chat settings were last updated. - name: summaryMessage | type: string | description: Message that summarizes the contents of the form. Appears after the greeting message. - name: extendedFields | type: ExtendedFields | description: Extended fields. - name: namespaces | type: object | description: Extended field data. Each key corresponds to the namespace of the app that created the extended fields. The value of each key is structured according to the schema defined when the extended fields were configured. You can only access fields for which you have the appropriate permissions. Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields.md). - name: manualSummary | type: boolean | description: Whether the summary message is manually set or AI-generated. When `false` the summary message is automatically generated by AI when the chat settings are saved. When `true`, the summary message can be manually set and won't be overwritten by AI. Default: `false` - name: personality | type: Personality | description: Personality of the AI when interacting with visitors. Defines the communication style of the AI chat responses. - enum: PROFESSIONAL, FRIENDLY, PLAYFUL, DIRECT ``` --- ## JavaScript SDK ### Schema ``` Method: wixClientAdmin.forms.ChatSettingsService.createChatSettings(chatSettings) Description: Creates a chat settings entity. The settings specified in a chat settings entity apply to the form with the same GUID as the chat settings entity. Each form can have exactly one set of chat settings. # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present. Required parameters: chatSettings, chatSettings._id Method parameters: param name: chatSettings | type: ChatSettings | required: true - name: _id | type: string | description: The GUID of the chat settings. The chat settings specified in this object apply to the form with a matching GUID. | required: true - name: greetingMessage | type: string | description: Custom greeting message displayed when a visitor opens the AI chat. - name: chatEnabled | type: boolean | description: Whether AI chat is enabled for this form. Default: `true` - name: summaryMessage | type: string | description: Message that summarizes the contents of the form. Appears after the greeting message. - name: extendedFields | type: ExtendedFields | description: Extended fields. - name: namespaces | type: object | description: Extended field data. Each key corresponds to the namespace of the app that created the extended fields. The value of each key is structured according to the schema defined when the extended fields were configured. You can only access fields for which you have the appropriate permissions. Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields.md). - name: manualSummary | type: boolean | description: Whether the summary message is manually set or AI-generated. When `false` the summary message is automatically generated by AI when the chat settings are saved. When `true`, the summary message can be manually set and won't be overwritten by AI. Default: `false` - name: personality | type: Personality | description: Personality of the AI when interacting with visitors. Defines the communication style of the AI chat responses. - enum: PROFESSIONAL, FRIENDLY, PLAYFUL, DIRECT Return type: PROMISE - name: _id | type: string | description: The GUID of the chat settings. The chat settings specified in this object apply to the form with a matching GUID. - name: greetingMessage | type: string | description: Custom greeting message displayed when a visitor opens the AI chat. - name: chatEnabled | type: boolean | description: Whether AI chat is enabled for this form. Default: `true` - name: revision | type: string | description: Revision number, which increments by 1 each time the chat settings are updated. To prevent conflicting changes, the current revision must be passed when updating the chat settings. - name: _createdDate | type: Date | description: Date and time the chat settings were created. - name: _updatedDate | type: Date | description: Date and time the chat settings were last updated. - name: summaryMessage | type: string | description: Message that summarizes the contents of the form. Appears after the greeting message. - name: extendedFields | type: ExtendedFields | description: Extended fields. - name: namespaces | type: object | description: Extended field data. Each key corresponds to the namespace of the app that created the extended fields. The value of each key is structured according to the schema defined when the extended fields were configured. You can only access fields for which you have the appropriate permissions. Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields.md). - name: manualSummary | type: boolean | description: Whether the summary message is manually set or AI-generated. When `false` the summary message is automatically generated by AI when the chat settings are saved. When `true`, the summary message can be manually set and won't be overwritten by AI. Default: `false` - name: personality | type: Personality | description: Personality of the AI when interacting with visitors. Defines the communication style of the AI chat responses. - enum: PROFESSIONAL, FRIENDLY, PLAYFUL, DIRECT ``` ### Examples ### createChatSettings ```javascript import { chatSettings } from '@wix/forms'; async function createChatSettings(chatSettings) { const response = await chatSettings.createChatSettings(chatSettings); }; ``` ### createChatSettings (with elevated permissions) ```javascript import { chatSettings } from '@wix/forms'; import { auth } from '@wix/essentials'; async function myCreateChatSettingsMethod(chatSettings) { const elevatedCreateChatSettings = auth.elevate(chatSettings.createChatSettings); const response = await elevatedCreateChatSettings(chatSettings); } ``` ### createChatSettings (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 { chatSettings } from '@wix/forms'; // Import the auth strategy for the relevant access type // Import the relevant host module if needed const myWixClient = createClient ({ modules: { chatSettings }, // Include the auth strategy and host as relevant }); async function createChatSettings(chatSettings) { const response = await myWixClient.chatSettings.createChatSettings(chatSettings); }; ``` ---