Skip to content

heroku-examples/heroku-agentforce-tutorial-java

Repository files navigation

Creating Agentforce Custom Actions with Heroku - Java

This tutorial explains how to deploy a Heroku application written in Java that can be used to build an Agentforce custom action, extending the capabilities of any Agentforce agent with the power of Heroku's fully managed, elastic compute services.

Deploying to Heroku

You can deploy this application to your Heroku account using the button below or manually via the CLI.

Deploy

To proceed with a CLI deployment, install the Heroku CLI and log in with your Heroku account (or sign up). Then, execute the following CLI commands:

git clone -b https://github.com/heroku-examples/heroku-agentforce-tutorial-java
cd heroku-agentforce-tutorial-java
heroku create myagentaction
heroku addons:create heroku-applink
heroku buildpacks:set heroku/heroku-applink-service-mesh
heroku buildpacks:set heroku/java
git push heroku main

Once this has been deployed, refer to the instructions in configuring Heroku-based actions in your Salesforce organization.

Running and Testing Locally

Although you cannot integrate this app with Agentforce until you deploy it, you can still develop and test your action’s inputs and outputs locally, using the built-in Swagger UI. Once you are satisfied with your changes, refer to the deployment and configuration steps above.

mvn clean install
mvn spring-boot:run

Once the application is running, navigate to the URL below, and click the Try it Out button.

http://localhost:8080/swagger-ui/index.html

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages