{"id":39506499,"url":"https://github.com/shunkosa/einstein-bots-ui-recipe","last_synced_at":"2026-01-18T05:56:27.539Z","repository":{"id":44580911,"uuid":"198986903","full_name":"shunkosa/einstein-bots-ui-recipe","owner":"shunkosa","description":"🤖 Provides rich user interface by LWC lightningsnapin-base-chat-message base component in Salesforce Einstein Bots and Embedded Service for Web.","archived":false,"fork":false,"pushed_at":"2022-02-07T07:25:23.000Z","size":794,"stargazers_count":53,"open_issues_count":7,"forks_count":31,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-05-01T16:45:37.357Z","etag":null,"topics":["lightning-web-components","salesforce","service-cloud"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shunkosa.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-07-26T09:19:33.000Z","updated_at":"2024-04-29T16:39:20.000Z","dependencies_parsed_at":"2022-09-08T04:51:56.901Z","dependency_job_id":null,"html_url":"https://github.com/shunkosa/einstein-bots-ui-recipe","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/shunkosa/einstein-bots-ui-recipe","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shunkosa%2Feinstein-bots-ui-recipe","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shunkosa%2Feinstein-bots-ui-recipe/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shunkosa%2Feinstein-bots-ui-recipe/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shunkosa%2Feinstein-bots-ui-recipe/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shunkosa","download_url":"https://codeload.github.com/shunkosa/einstein-bots-ui-recipe/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shunkosa%2Feinstein-bots-ui-recipe/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28531854,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-18T00:39:45.795Z","status":"online","status_checked_at":"2026-01-18T02:00:07.578Z","response_time":98,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["lightning-web-components","salesforce","service-cloud"],"created_at":"2026-01-18T05:56:26.841Z","updated_at":"2026-01-18T05:56:27.530Z","avatar_url":"https://github.com/shunkosa.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Einstein Bots UI Recipe\nProvides rich user interface by LWC `lightningsnapin-base-chat-message` base component in Salesforce Einstein Bot and Embedded Service for Web.\n\n![](img/screenshots.jpg)\n\n## How to use\nDeploy `chatMessage` lightning web component to the org and select it as custom component in embedded service setting.\n\n\u003ckbd\u003e\u003cimg src=\"img/embeddedservice_setting.png\"\u003e\u003c/kbd\u003e\n\nIf a message in Einstein Bot starts with\n* `RICH_TEXT:\u003cRICH_TEXT_CONTENT_INCLUDING_SUPPORTED_HTML_TAGS\u003e`, shows the message in rich text format.\n* `YOUTUBE:\u003cYOUTUBE_VIDEO_ID\u003e`, shows the youtube video in chat window.\n* `IMAGE:\u003cIMAGE_URL\u003e`, shows the image.\n* `NAVIGATE:\u003cTARGET_URL\u003e` opens the url with a new browser window (tab).\n* `URL:\u003cTARGET_URL\u003e` shows the OGP info.\n* `PLAIN_TEXT:\u003cMESSAGE\u003e` or no prefix, shows the message in plain text format.\n\n## Example\n\u003cimg src=\"img/message_examples.png\" width=\"600\"\u003e\n\n## Notice\n* Custom attributes cannot be passed from Einstein Bots to lightning web component. So in this repository, using prefix rule to decide the type of content.\n\n### URL Content\n* [OpenGraph.io](https://www.opengraph.io/) is used to fetch OGP data. Make sure to create your api key and to add the CSP setting.\n* Notice that text truncation used in this component is [not supported in Internet Explorer](https://developer.mozilla.org/en-US/docs/Web/CSS/-webkit-line-clamp).\n\n### Rich Text Content\n* To avoid unnecessary spacing, HTML tags should be expressed without line break in a dialog message.\n* URL in bot message is automatically converted to string contains `\u003ca\u003e` tag. For example, if a bot message is `https://www.google.com`, in custom component, `messageContent.value` will be `\u003ca href=\"https//www.google.com\"\u003ehttps://www.google.com\u003c/a\u003e`. This is Salesforce embedded behavior. So `extractOriginalUrl` method returns the original url without `\u003ca\u003e` tag.\n\n### Component style\n* Standard CSS selector is not applied to custom message component. Be careful for the layout skew.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshunkosa%2Feinstein-bots-ui-recipe","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshunkosa%2Feinstein-bots-ui-recipe","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshunkosa%2Feinstein-bots-ui-recipe/lists"}