Use the React Native SDK settings and actions to customize the behavior of your bot.
For the React Native SDK, AdaEmbedView takes various props that you can use to customize the behavior of your chatbot.
cluster?: string;
Specifies the Kubernetes cluster your AI Agent runs on.
Set this only if your Agent is hosted on a non-default cluster (e.g., us2, maple, eu, att).
If the Agent is on the default us cluster, leave this unset.
greeting?: string;
Use this prop to customize the greeting that new chatters see. This is useful for setting view-specific greetings across your app. The greeting should correspond to the ID of the Answer you would like to use, which you can find in the URL of the corresponding Answer in the dashboard.
Example

This setting is only applicable if you’re using a scripted bot.
handle: string;
The handle for your bot. This is a required field.
language?: string;
Takes in a language code to programmatically set the bot language. You must first turn languages on in your Ada dashboard.
Language codes use the ISO 639-1 language format.
metaFields?: object;
Use metaFields to pass information about a chatter to Ada. This can be useful for tracking information about your customers, as well as personalizing their experience. For example, you may wish to track the phone_number and name for conversation attribution. (See Variables for more information.)
Once set, you can access this information:
To change these values after bot setup, use the setMetaFields action.
sensitiveMetaFields?: object;
Use sensitiveMetaFields to pass sensitive meta information about a chatter to Ada. This works like metafields, but provides an added layer of security.
Once set, you can access this information:
To change these values after bot setup, use the setSensitiveMetaFields action.
thirdPartyCookiesEnabled?: boolean;
Set the thirdPartyCookies prop to enable third-party cookies in AdaEmbedView. This feature is only available in Android. The default value is false.
zdChatterAuthCallback?(callback: (token: string) => void): void;
Use the zdChatterAuthCallback to request a JWT token from your API, then pass it to Ada. This creates shared trust between Ada and Zendesk, and in turn allows for verifiable chatter identity.
zdChatterAuthCallback is available only for Zendesk Chat. It is not available for Zendesk Messaging.
endConversationCallback?(callback: (event?: { [key]: string | object }) => void): void;
Use endConversationCallback to specify a callback function to be called when a chatter ends a conversation. The callback will receive an event object containing conversation metadata.
Call actions directly from the AdaEmbedView ref. This allows you to modify Ada chat without using state/props to trigger a re-render of the entire subtree.
Deletes the chatter used to fetch conversation logs for a chatter from storage. When a user opens a new chat window, a new chatter is generated.
Creates a new chatter and refreshes the Chat window. reset can take an optional object allowing language, metaFields, and greeting to be changed for the new chatter.
setLanguage(languageCode: string)
Changes the language in chat programmatically. Use this action, rather than the language setting, to change the chat language without clearing the chat history. Language codes must use a lowercase, two-letter code, in ISO 639-1 language format. For example, en, fr, ca, ar, and so on.
Before using setLanguage:
You must turn languages on in your Ada dashboard.
The chat window must be opened at least once.
Used to set metaFields for a chatter after instantiation. This is useful if you need to update user data after Ada chat has already launched.
Used to set sensitiveMetaFields for a chatter after instantiation. This is useful if you need to update user data after Ada chat has already launched.
this.adaEmbedView.triggerAnswer()
Triggers an answer in chat. Include the Answer ID, which you can find in the URL of the corresponding Answer in the dashboard.
Example

The chat window must be opened at least once before this method can be used.
This action is only applicable if you’re using a scripted bot.