Integrations

Salesforce

Step 1: Set Up Your LemChat Chatbot

To integrate your LemChat AI chatbot into your Salesforce application, begin by logging into your LemChat account. If you haven't already created an account, you can sign up for a free account. After signing in, you can configure your bot within the LemChat platform by uploading relevant data sources, such as files, text snippets, websites, or question-and-answer pairs, which the bot can use to build its knowledge base.

Here is a step-by-step guide for setting up and deploying your LemChat chatbot.

Step 2: Generate and Copy Your LemChat Chatbot Embed Code

1. Every chatbot you create on LemChat has a unique embed code you can use to embed it on your website. Once you've set up your chatbot on LemChat, navigate to your Dashboard page, and select the specific bot you wish to integrate with your Salesforce application.

2. On the chatbot preview page, locate and click on the "Embed" tab.

3. Next, a new page will appear displaying the iframe code snippet for embedding your chatbot. Copy this code by clicking the "Copy Script" button.

Step 3: Integration Options for Salesforce

Yes, you can add an iframe script to a Salesforce website! The ability to embed your LemChat chatbot depends on how your Salesforce website is built and hosted. Here are the main integration approaches:

✅ When iframe integration is possible:

If your Salesforce website uses Experience Cloud, Salesforce Sites (Visualforce), or LWR Sites, you can embed the LemChat iframe script without needing a native Salesforce app.

1. Salesforce Experience Cloud (formerly Community Cloud)

This is the most common use case for embedding 3rd-party widgets like chatbots. You can embed the LemChat iframe script using:

  • Lightning Components or Aura Components
  • Insert the script into the HTML editor in a CMS page
  • Add it via Custom Theme Layouts

2. Salesforce Sites (Visualforce-based)

If your site uses Visualforce pages, you can directly add the iframe code into the page:

<apex:page>
  <h1>Welcome!</h1>
  <iframe src="https://lemchat.com/chatbot-iframe/YOUR_CHATBOT_ID"
    width="350" height="500"></iframe>
</apex:page>

3. LWR Sites (Lightning Web Runtime)

These are newer, fast sites in Experience Cloud. You can add custom Lightning Web Components (LWC) that load the LemChat iframe — though you might need CSP adjustments.

Salesforce Platform Considerations

🔒 Content Security Policy (CSP)

Salesforce has Content Security Policy settings that might block external scripts or iframes. You may need to:

  • Whitelist the iframe domain in CSP Trusted Sites
  • Enable Locker Service compatibility if using Lightning Web Components

❌ When you need a native Salesforce app:

  • If it needs deep integration with Salesforce data (Leads, Cases, Users)
  • If it must appear as a native Lightning component in Salesforce UI
  • If it's meant for internal users, not a public website

Final Answer: You can embed the LemChat iframe script into a Salesforce-hosted website, especially if it's an Experience Cloud site or a Visualforce page. You do not need it to be a native Salesforce app, unless deeper Salesforce CRM integration is required.