Skip to main content

Agentforce Custom Actions with Heroku

Learning Objectives

After completing this unit, you’ll be able to:

  • Explain how Heroku AppLink enables Agentforce Custom Actions.
  • Identify compelling use cases for Heroku-powered agents.
  • Understand the technical implementation approach for agent extensions.

Supercharge Agentforce with Heroku

Agentforce Custom Actions represent one of the most exciting applications of Heroku AppLink. By deploying specialized services on Heroku, you can extend Agentforce capabilities far beyond what's possible with native Salesforce functionality alone.

The Power of Extension

While Agentforce excels at understanding user intent and managing conversational flow, some tasks require specialized compute power, external APIs, or advanced libraries. This is where Heroku AppLink creates magic—seamlessly bridging Agentforce's intelligence with Heroku's computational flexibility. Let's explore examples of how organizations can extend Agentforce with Heroku-powered custom actions.

Travel and Hospitality: Coral Cloud Resorts

Guests want personalized experiences that go beyond standard booking and inquiry responses. Here we can build a Coral Cloud Memory Collage Agent that creates personalized visual summaries combining guest activities, photos, and sentiment quotes. This enables the type of agent engagement shown.

Customer: "Can you help me summarize my amazing holiday?"
    ↓
Agent: "Give me a one-line quote that describes how you feel about your experiences?"
    ↓
Customer: "I would summarize my experience by saying 'Oh my goodness those sunsets!'"
    ↓
Agent: Calls Heroku Collage Service

Here is an example of a personalized guest collage generated by the Heroku service, combining guest activities, photos, and sentiment quotes.

A customer review showing three tropical vacation photos and positive customer sentiment saying, “Oh my goodness those sunsets!”

Process Flow

The diagram below shows how the agent request flows through a custom collage service deployed on Heroku, which connects to guest activity data and the Postgres database, processes the information through Java image processing, and returns a custom collage ready for download.

A diagram showing the processing used to generate the previously described customer review.

In another variation of this, a user might ask the agent to, "Send a postcard of the beach with my picture on it." This would result in the following processing.

  • Retrieves guest's uploaded photos
  • Combines with resort location imagery
  • Generates personalized postcard design
  • Integrates with an external service to upload the picture and send the photograph

Automotive: Finance Agreement Calculator

Car dealership agents need to provide instant, competitive finance estimates that consider complex pricing rules, customer credit profiles, and generate professional documentation. Here we can build a Koa Cars Finance Agent that performs real-time credit assessments, applies complex pricing rules, and generates professional PDF agreements. This enables the type of agent engagement shown below:

Customer: Finance estimate request
    ↓
Agent: "What's your contact email?"
    ↓
Customer: "johnsmith@codey.com"
    ↓
Agent: "Which car model interests you?"
    ↓
Customer: "I'm interested in the Zig M3 car"
    ↓
Agent: Calls Heroku Finance Service

AgentBuilder conversation showing a real-time finance calculation for the car mentioned above.

The following PDF was also generated and attached to the Contact for future reference.

A professional PDF finance agreement that was automatically generated and attached to the customer’s contact record.

Process Flow

The diagram below illustrates how the agent request triggers a custom finance service deployed on Heroku, which calls external credit assessment APIs and pricing databases, performs interest rate calculations, and generates both a PDF finance agreement and contact record.

A diagram showing the processing used to converse with the customer, generate the auto-quote and pdf, that was attached to the customer’s contact record.

Advanced Capabilities:

  • Complex Interest Calculations: Multitier interest rate rules based on credit score and loan terms
  • Real-time Credit Assessment: Integration with credit bureaus for instant approval decisions
  • Dynamic Pricing: Vehicle-specific pricing with dealer incentives and regional adjustments
  • Professional Documentation: Auto-generated PDF finance agreements with legal compliance
  • CRM Integration: Automatic creation of Contact records and attachment of finance documents
  • PDF Generation: Dynamically generated PDF content attached to the Contact record

Travel: Carbon Footprint Calculator

Travelers want to understand and offset the environmental impact of their journeys. Here we can build an Astro Airlines Carbon Calculator Agent that integrates with environmental data APIs (ICAO, Google Flights, IATA CO₂ Data), analyzes flight information, and calculates precise emissions per route, traveler, aircraft type, and distance. This enables the type of agent engagement shown below:

Customer: "I want to travel from SFO to LAX"
    ↓
Agent: Lists available flights for the user to choose
    ↓
Customer: "What is the total carbon footprint for flight 1?"
    ↓
Agent: Calls Heroku Carbon Engine

Agent Builder showing the real-time carbon footprint calculation for the selected flight.

Process Flow

The next diagram demonstrates how the agent request activates a custom carbon calculation engine deployed on Heroku, which integrates with multiple environmental APIs (ICAO Calculator, Google Flights API, and IATA CO₂ Data) to perform comprehensive analysis and generate a detailed carbon footprint report.

A diagram showing the processing used to choose a flight, and determine the total carbon footprint, and share it with the customer.

Advanced Processing Capabilities

  • Aircraft Type Analysis: Identification and efficiency ratings for specific aircraft models
  • Route Optimization: Distance calculations and alternative routing considerations
  • Passenger Load Factors: Accurate per-passenger emissions based on typical occupancy
  • Real-time Data Integration: Live access to multiple environmental data sources
  • Comparative Analysis: Alternative transportation options and their environmental impact
  • Offset Recommendations: Integration with carbon offset marketplace for immediate action

Retail: Intelligent Shipping Optimization

Customers want fast, cost-effective shipping with real-time options. Here we can build a Trailblazer Outfitters Shipping Agent that retrieves product specifications, calls multiple carrier APIs simultaneously, and provides intelligent recommendations based on cost, timeline, and customer preferences. This enables the type of agent engagement as shown in the following.

Customer: "I am looking for warm clothes."
    ↓
Agent: Responds with a list of clothing options
    ↓
Customer: "Can you recommend shipping options for item 1 so that I receive it within a week for under $50?"
    ↓
Agent: Calls Heroku Logistics Service

[alt text: The AgentBuilder preview window showing real-time shipping options and recommendations based on customer requirements.]

Process Flow

The diagram below shows how the agent request engages a custom logistics service deployed on Heroku, which simultaneously queries multiple carrier APIs (FedEx, UPS, USPS, DHL), performs cost comparison and optimization analysis, and delivers personalized shipping options back to the customer.

A diagram showing the processing used to analyze logistics options and provide the type of service the customer requested.

Advanced Features

  • Dynamic Pricing: Real-time carrier rate comparison across multiple providers
  • Delivery Prediction: AI-powered estimated delivery windows with accuracy tracking
  • Customer-Specific Filtering: Matches options to budget and timeline requirements
  • Route Optimization: Consideration of weather, traffic patterns, and seasonal variations
  • Sustainability Options: Eco-friendly shipping alternatives with carbon footprint data
  • In-Memory Processing: Fast collation and analysis of shipping data for instant recommendations

Enterprise Security: Intelligent Security Operations

Security teams need AI-powered assistance for threat analysis and incident response. Here we can build a Security Operations AI Agent that uses Heroku AI services, performs vector similarity searches across security knowledge bases, and provides contextual investigation procedures. This enables the type of agent engagement as follows.

Security Analyst: "Analyze this suspicious login pattern and recommend investigation steps"
    ↓
Agent: Calls Heroku AI Service

Process Flow

The diagram below illustrates how the security analyst's request flows through a custom AI service deployed on Heroku, which connects to Claude API integration, security knowledge bases, and Slack integration to perform vector search and AI analysis, returning actionable steps and recommendations.

A diagram showing the processing used to analyze the suspicious login pattern and select the correct services to return actionable recommendations.

Sophisticated Processing:

  • Heroku AI: Uses Heroku Managed Inference for intelligent security analysis
  • Vector Similarity Search: Finds relevant security knowledge from 200+ policy documents
  • AI-Powered Analysis: Uses advanced AI models for contextual security guidance
  • Automated Investigation: Generates step-by-step investigation procedures
  • Slack Integration: Seamless workflow integration for security teams

Advanced Analytics: Computational Acceleration

Financial analysts need complex calculations that exceed Salesforce computational limits. Here we can build a Financial Analytics Agent that performs unlimited processing time calculations, uses advanced mathematical libraries (NumPy, SciPy), and generates rich visualizations for executive reporting. This enables the type of agent engagement shown.

Financial Analyst: "Calculate NPV and IRR for this 10-year investment scenario with quarterly cash flows"
    ↓
Agent: Calls Heroku Analytics Engine

Process Flow

The diagram below shows how the analyst's request triggers a custom analytics engine deployed on Heroku, which accesses market data APIs and financial databases, performs complex NPV/IRR calculations using advanced mathematical libraries, and generates comprehensive financial analysis reports.

A diagram showing the processing used to select services, perform complex calculations and generate financial analysis reports.

Advanced Capabilities

  • Unlimited Processing Time: No governor limit constraints
  • Advanced Mathematics: Use NumPy, SciPy, and pandas libraries
  • Derivative Calculations: Optimize using calculus for faster sensitivity analysis
  • Rich Visualizations: Generate charts and graphs for executive reporting

Development Benefits

Building Agentforce Custom Actions with Heroku AppLink provides several key advantages.

Developer Productivity

  • SDK Templates: Prebuilt patterns for common operations
  • Automatic Integration: No manual authentication or connection setup
  • Rich Libraries: Access to entire ecosystem of programming languages and frameworks
  • Rapid Deployment: From code to production in minutes

Enterprise Security

  • Inherited Permissions: Automatic Salesforce user context preservation
  • Secure Credentials: External API keys safely stored in Heroku
  • Audit Compliance: Full logging and tracking of all operations
  • Data Governance: Respects all Salesforce sharing and field-level security

Unlimited Scale

  • No Governor Limits: Process complex operations without timeouts
  • Elastic Compute: Scale up during peak usage, down during quiet periods
  • Concurrent Processing: Handle multiple agent conversations simultaneously
  • Global Deployment: Deploy across multiple regions for optimal performance

Resources

Teilen Sie Ihr Trailhead-Feedback über die Salesforce-Hilfe.

Wir würden uns sehr freuen, von Ihren Erfahrungen mit Trailhead zu hören: Sie können jetzt jederzeit über die Salesforce-Hilfe auf das neue Feedback-Formular zugreifen.

Weitere Infos Weiter zu "Feedback teilen"