> 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 # UpdateChatSettings # Package: forms # Namespace: ChatSettingsService # Method link: https://dev.wix.com/docs/api-reference/crm/forms/chat-settings/update-chat-settings.md ## Permission Scopes: Manage Challenges: SCOPE.CHALLENGES.MANAGE ## Introduction Updates a chat settings entity. Changes take effect immediately for new interactive form sessions. --- ## REST API ### Schema ``` Method: updateChatSettings Description: Updates a chat settings entity. Changes take effect immediately for new interactive form sessions. URL: https://www.wixapis.com/forms/ai/v1/chat-settings/{chatSettings.id} Method: PATCH # 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: UpdateChatSettingsResponse - name: chatSettings | type: ChatSettings | description: Updated 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.updateChatSettings(_id, chatSettings) Description: Updates a chat settings entity. Changes take effect immediately for new interactive form sessions. # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present. Required parameters: chatSettings, _id Method parameters: param 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 param name: chatSettings | type: UpdateChatSettings | 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 ### updateChatSettings ```javascript import { chatSettings } from '@wix/forms'; async function updateChatSettings(_id,chatSettings) { const response = await chatSettings.updateChatSettings(_id,chatSettings); }; ``` ### updateChatSettings (with elevated permissions) ```javascript import { chatSettings } from '@wix/forms'; import { auth } from '@wix/essentials'; async function myUpdateChatSettingsMethod(_id,chatSettings) { const elevatedUpdateChatSettings = auth.elevate(chatSettings.updateChatSettings); const response = await elevatedUpdateChatSettings(_id,chatSettings); } ``` ### updateChatSettings (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 updateChatSettings(_id,chatSettings) { const response = await myWixClient.chatSettings.updateChatSettings(_id,chatSettings); }; ``` ---