Artificial Intelligence / Developers

Enhance Salesforce AI Agents With Real-Time Data, APIs, and Automation

By Andrew Fawcett & Vivek Viswanathan

Branded content with Heroku

A super team needs more than just one hero that does everything well – it requires a combination of powers, skills, and communication that makes the whole greater than the sum of its parts. 

Salesforce Agentforce is an incredible way to use your organization’s data to answer real, timely questions. But just like Superman works with the Justice League, Agentforce works even better with Heroku.

Heroku Is the Perfect Agentforce Addition

Agentforce can answer questions about everything that you have access to in your Salesforce environment. But what if the information, processing power, or scalability you need is beyond the reach of traditional ways to extend platform features – even with tools like Agentforce?

Heroku integrations allow you to tap into elastic compute and additional programming languages when customizing Agentforce, giving you the flexibility to work in the way your team needs to. For example, Agentforce could use a Heroku integration to retrieve flight schedules, find data that is in the wrong format, or data in the right format but in a different place. Heroku can do computationally expensive tasks like calculation, LLM queries, machine learning, and database manipulation. That level of enhancement makes Agentforce even more powerful.

Heroku integrations give Salesforce developers the power, reach, and capacity of the whole team at their fingertips and in a context they’re comfortable with.

What Is Heroku?

Heroku is the AI Platform as a Service (PaaS) for deploying, managing, and scaling applications.

Heroku takes all the infrastructure upgrades, 24/7 ops, and security off your plate so that you can stay focused on building great data-driven and AI-enabled applications. 

It can be configured to connect data stores, run commands and programs, and integrate different parts of your IT organization. Heroku is configured by your platform or DevOps teams, and then your Salesforce developers can collaborate with their Heroku experts to design the ideal Agentforce experience.

What Can Heroku Do?

Heroku enhances the Agentforce experience by connecting it to all the data you need to create great flows, all while reading through and reconfiguring data. It can also use machine learning and LLMs to predict and create tailored responses that users are satisfied with.
Furthermore it can calculate and compute quickly so that your automations run at a super high speed. Finally, it can do data conversions, query APIs, and assemble data points, offering a way to build all those integrations and make them available to Agentforce.

How Audata Uses Agentforce To Scale Up and Meet Demand

The Audata Promo app helps brands manage contests, automate prize fulfillment, and collect audience data. The brands that use it are globally distributed, and Audata prides itself on exceptional service. 

To support their customers, Audata required an AI agent who could respond around the clock and used Agentforce to provide the first-touch contact and solve ordinary problems. By using Heroku to access the documentation and common troubleshooting steps, the agent can find the relevant information needed and use it to respond to the customer.

Audata anticipates its service agent will ultimately handle up to 60% of customer inquiries. It also expects a 25% reduction in time to close cases created by the agent due to the agent handling much of the preliminary questioning and fact-finding. The agent is also configured so that if a conversation indicates a serious problem, it can activate the escalation sequence and get help from on-call humans.

How Heroku and Salesforce Work Together

Here are some examples of how Heroku significantly enhances the Agentforce experience:

  • Calculates Loan agreements.
  • Adds agents to web and mobile experiences.
  • Use a Heroku Agent Action combined with an API to make it possible to request a custom badge from the agent.
  • Combine several Heroku Agent Actions together to create a customized photocollage that brings together customer booking data, externally-stored images, and a customer quote into a memorable image.

In each of these cases, we’ll use the same general flow. From the Agentforce chat, a customer asks a question.

This is where the Agentforce Action starts. This action is pre-defined and then calls the Heroku AppLink. 

The Heroku AppLink then uses an API to interact with the Heroku Compute Services. This is where everything is processed to deliver the answer to the Agentforce Action. But in order to answer the question, it’s going to take lots of data. Heroku AppLinks can be created for almost any data source and stored in any location.

The data that the Heroku Compute Service can use to answer questions restricts both access to the data itself (through permissions and access controls), and what kind of answers Agentforce is allowed to provide. 

For example, PII (personally identifiable information) is usually stored in ways that restrict access. But if your agent is retrieving unstructured data, a credit card number might accidentally appear. To mitigate this, you can set the Agentforce client to refuse to return anything in the format of a credit card number.

Once the data is gathered and provided to Heroku Compute Services, information is returned to Agentforce via the Heroku AppLink connection.

Here’s a full look at the entire cycle:

Calculating Loan Agreements

Buying a car is not just a matter of picking which car and trim you want. If financing is required, that also requires other considerations – how long is the loan, how much is the down payment, what is the monthly maximum payment? It’s a kind of calculation most people don’t do very often. Fortunately, with the aid of a Salesforce agent and Heroku, a buyer can tell Koa Cars, for example, what they want to spend and what kind of car suits them.

This Agentforce Agent Action evaluates real-time car valuations from industry sources, assesses user credit status via finance APIs, and optimizes business margins while ensuring competitiveness. By leveraging Heroku’s scalable processing power, Agentforce-powered agents can make real-time financing decisions, delivering personalized finance offers within Salesforce. It also offers to produce a PDF copy for the customer requesting the loan quote and attaches it to the customer contact in Salesforce, for future reference.

In this example, the right pane reflects the conversation a buyer might have, the center pane shows the instructions and actions that are driving responses, and the left pane shows more details about what Agentforce is doing with the actions.

After a conversation with the agent, the buyer will see a result like this in their chat:

And the official PDF that is attached to the customer contact in Salesforce should look like this:

The diagram below shows you how all the parts of Agentforce and Heroku work together to return the answer to the buyer. The financing depends on the buyer’s down payment, credit rating, and the price of the car that they choose. The Salesforce developer can assemble all that information by selecting pre-configured Agent Actions that use both Heroku and Salesforce information and queries.

This automation can also run through the Agent API so that it is available for web or mobile apps, and can be branded to match the app it is running in. This gives buyers a seamless and trustworthy experience.

To see how this code works, visit our example repository or enjoy the video below!

Adding Agents to Consumer Experience

The next example is a solar company called Luminaire. It provides solar power cells to residential customers and helps them manage their experience. One of the exciting Agentforce Actions we’ll show is the ability to provide customized answers for questions that the user hasn’t asked yet. 

Luminaire has used the Agentforce Agent API to build out a customer website that provides personalized insights and self-service. 

When a customer logs in to their Luminaire Solar account, the Agentforce Actions has already started working. As the page loads, the Agentforce agent API uses Heroku to link to data systems using an Agentforce Action. 

The action determines the amount of cloud cover predicted for the next week by querying a weather service API and compares it to historical information about how much energy the user’s solar cells have produced in similar conditions. 

The customer page now has a customized estimation of power generation for the next week and a prompt that encourages customers to discuss performance. If there is a problem that requires a service ticket, the Agentforce chat will seamlessly open a ticket form in Salesforce Service Cloud.

This customized experience and self-service opportunity is supported by the combination of the Agentforce agent API and Heroku Postgres, and it all looks to the customer like Luminaire is helping them personally and intuitively.

For the Luminaire website builder, the flow looks like this:

image.png

The Luminaire Solar Agent is powered by the Agentforce API Agent Action, which can call on either the Heroku App for forecast and usage information or the Service Cloud Agent.

Use an Agentforce Agent to Create a Unique Photo Collage

This example uses the Coral Cloud demo and extends it with the demonstration video above and a sample code, diving deeper into how Heroku enhances Agentforce agents’ capabilities. Vacationing guests can use Agentforce to browse and book unique experiences. 

With Heroku, the agent can even generate personalized adventure collages for each guest, including a personalized quote and specific pictures, showcasing how custom code on Heroku enables dynamic digital media creation directly within the Agentforce platform.

This demonstration has a conversational element, where the Agentforce agent asks the vacationer a question to identify them and retrieve the experiences they booked, and prompts them to enter a sentence describing their time at Coral Cloud. 

Photographs representing their booked experiences are then retrieved and manipulated to represent their unique vacation, and the quote is overlaid across the photos. The collage represents the combination of booking information, customer-entered sentiments, and remotely-stored images, along with an image layout element.

Use an Agentforce Agent to Create a Custom Badge

For an appetizer of Agentforce exploration, configure a Heroku integration to generate a badge. The full tutorial is available on GitHub for Java and Python. It includes all the steps for creating a full request flow, including authentication, API connections, creating and defining an Agentforce action, and connecting it to a Heroku integration. By the end, you will be able to ask Agentforce to generate your own badge, as shown below:

Now that you’ve seen some use cases highlighting the integration of Agentforce and Heroku, we hope that you’re excited to use it in your own!

Final Thoughts

Agentforce is a powerful interface for your team and your customers to interact with Salesforce. Heroku integrations work with that power to make it deeper, richer, and more scalable. 

The Authors

Andrew Fawcett

Andrew is VP of Developer Relations for Heroku at Salesforce, with over 25 years of experience in enterprise application development and product leadership. A passionate advocate for developers, Andrew has held senior roles spanning engineering, architecture, and product management.

Vivek Viswanathan

Vivek is a Director of Product Management at Salesforce with over 20 years of experience spanning cloud infrastructure, SaaS, big data, security, and AI/ML. A recognized leader in 0–1 product innovation and cross-functional strategy, he has played a pivotal role in launching key Salesforce products like Salesforce Functions and the Eagle Eyes AppExchange tool.

Leave a Reply