Overriding AI component settings

You can programmatically override component settings before you start a component. You can do this if you created your own UI button before you use the openChat() function. If instead you use one of our starter button components, then you can use the expert setting in the Button section to add a "custom button click javascript". Here you can paste your settings overrides and this javascript will execute before opening the AI component.

Txt.componentSettingOverrides = [
  {path: 'stepper.steps[0].contactPage.contactCard1Label.value', value: 'My custom label'}
] 

The best way to get the path of a setting is to download the settings file of your AI component. You can do that by going to the AI configuration and open the component editor for your AI component. Then in the editor in the Other section click on the "download settings" button. This will give you a settings file in json format. The paths you can override correspondent with the format of this file.