Contact Us

January 31, 2024

May 15, 2026 9:06 am

Launching Agentforce Conversation on Record Page Load in Salesforce

Share with

Understanding the Challenge

Teams have tried using the Agentforce Conversation Client API but encountered errors, such as “No Module // lightning:accapi”. Others have attempted to invoke embedded services via LWC but were unsuccessful.

The lack of a standard API to interact with the sidebar has been a significant hurdle. However, with the Summer release, a new ACC API has been introduced, allowing for more flexibility.

Solution Overview

The ACC API provides a way to create an LWC that can be embedded on a record page to auto-open the Agentforce conversation. This solution requires using the ACC SDK, which is documented on the Salesforce Developer website.

Implementing the Solution

To implement this solution, you will need to create an LWC and use the ACC API to embed the Agentforce conversation on the record page. You can find more information on how to do this in the Salesforce documentation.

accApiExample.js

import { LightningElement, api } from 'lwc';
import { ACC } from '@salesforce/acc';

export default class AccApiExample extends LightningElement {
  @api recordId;

  connectedCallback() {
    // Initialize the ACC API
    const acc = new ACC({
      recordId: this.recordId,
      // Other configuration options
    });

    // Embed the Agentforce conversation on the record page
    acc.embed();
  }
}

Best Practices and Next Steps

When implementing this solution, keep in mind the following best practices and next steps:

Checklist

  • Use the ACC API to embed the Agentforce conversation on the record page
  • Configure the ACC API with the correct record ID and other options
  • Test the implementation to ensure it works as expected
  • Consider using React on Salesforce for more complex use cases
  • Keep in mind the limitations of the ACC API and plan accordingly

Frequently Asked Questions

Can I use the ACC API to embed the Agentforce conversation on an external site?

Yes, you can use the ACC API to embed the Agentforce conversation on an external site, but you will need to use Lightning Out 2.0 with an Iframe.

Can I use the ACC API with LWC or React?

Yes, you can use the ACC API with both LWC and React. However, React on Salesforce is recommended for more complex use cases.

What are the limitations of the ACC API?

The ACC API has some limitations, such as not being able to bring external agents into the Org-wide sidebar. You should plan accordingly and consider using other solutions for more complex use cases.

Can I customize the Agentforce conversation embedded on the record page?

Yes, you can customize the Agentforce conversation embedded on the record page using the ACC API. You can configure the API with different options to change the behavior and appearance of the conversation.

Genetrix Technology · Salesforce Marketing Cloud Partner

Need help shipping this in production?

Genetrix builds and untangles Salesforce Marketing Cloud and Agentforce setups for teams that want it done right the first time. If anything in this post sounds familiar, talk to us before it ships.

Get in Touch with Genetrix →

Blogs for the

Business-Savvy!​

Let’s Connect

A 30 min no cost strategy session
with cloud support expert

Let’s Connect

A 30 min no cost strategy session
with cloud support expert