DID THIS ARTICLE SOLVE YOUR ISSUE?
Let us know so we can improve!
Let us know so we can improve!
Use code snippets to get Enhanced Web Chat deployment details in your custom Lightning web components.
To get the language code for your client, use the following snippet in your custom component.
1const language = this.configuration.language;To get the Terms and Conditions settings for your client, use the following snippet in your custom component.
1if (this.configuration.termsAndConditions.isTermsAndConditionsEnabled) {
2 const isTermsAndConditionsRequired = this.configuration.termsAndConditions
3 .isTermsAndConditionsRequired;
4 const termsAndConditionsLabel = this.configuration.termsAndConditions.label;
5}To get the customized labels in Embedded Service deployment setup in the language configured on the client, use the following snippet in your custom component. This example shows how to get the customized label for End Conversation Header text.
1const endConversationLabelObj =
2 this.configuration.customLabels.filter(
3 (label) =>
4 label.sectionName === "EmbeddedMessagingChatHeader" &&
5 label.labelName === "CloseConversation",
6 )[0] || {};
7const endConversationLabel = endConversationLabelObj.labelValue || "End Conversation";