Skip Navigation
Show nav
Heroku Dev Center Dev Center
  • Get Started
  • Documentation
  • Changelog
  • Search
Heroku Dev Center Dev Center
  • Get Started
    • Node.js
    • Ruby on Rails
    • Ruby
    • Python
    • Java
    • PHP
    • Go
    • Scala
    • Clojure
    • .NET
  • Documentation
  • Changelog
  • More
    Additional Resources
    • Home
    • Elements
    • Products
    • Pricing
    • Careers
    • Help
    • Status
    • Events
    • Podcasts
    • Compliance Center
    Heroku Blog

    Heroku Blog

    Find out what's new with Heroku on our blog.

    Visit Blog
  • Log in or Sign up
View categories

Categories

  • Heroku Architecture
    • Compute (Dynos)
      • Dyno Management
      • Dyno Concepts
      • Dyno Behavior
      • Dyno Reference
      • Dyno Troubleshooting
    • Stacks (operating system images)
    • Networking & DNS
    • Platform Policies
    • Buildpacks
    • Platform Principles
  • Developer Tools
    • Command Line
    • Heroku VS Code Extension
  • Deployment
    • Deploying with Git
    • Deploying with Docker
    • Deployment Integrations
  • Continuous Delivery & Integration (Heroku Flow)
    • Continuous Integration
  • Language Support
    • Node.js
      • Node.js Behavior in Heroku
      • Troubleshooting Node.js Apps
      • Working with Node.js
    • Ruby
      • Rails Support
      • Working with Bundler
      • Working with Ruby
      • Ruby Behavior in Heroku
      • Troubleshooting Ruby Apps
    • Python
      • Working with Python
      • Background Jobs in Python
      • Python Behavior in Heroku
      • Working with Django
    • Java
      • Java Behavior in Heroku
      • Working with Java
      • Working with Maven
      • Working with Spring Boot
      • Troubleshooting Java Apps
    • PHP
      • Working with PHP
      • PHP Behavior in Heroku
    • Go
      • Go Dependency Management
    • Scala
    • Clojure
    • .NET
      • Working with .NET
  • Databases & Data Management
    • Heroku Postgres
      • Postgres Basics
      • Postgres Getting Started
      • Postgres Performance
      • Postgres Data Transfer & Preservation
      • Postgres Availability
      • Postgres Special Topics
      • Migrating to Heroku Postgres
    • Heroku Key-Value Store
    • Apache Kafka on Heroku
    • Other Data Stores
  • AI
    • Vector Database
    • Model Context Protocol
    • Working with AI
    • Heroku Inference
      • Inference Essentials
      • AI Models
      • Inference API
      • Heroku Inference Quick Start Guides
  • Monitoring & Metrics
    • Logging
  • App Performance
  • Add-ons
    • All Add-ons
  • Collaboration
  • Security
    • App Security
    • Identities & Authentication
      • Single Sign-on (SSO)
    • Private Spaces
      • Infrastructure Networking
    • Compliance
  • Heroku Enterprise
    • Enterprise Accounts
    • Enterprise Teams
  • Patterns & Best Practices
  • Extending Heroku
    • Platform API
    • App Webhooks
    • Heroku Labs
    • Building Add-ons
      • Add-on Development Tasks
      • Add-on APIs
      • Add-on Guidelines & Requirements
    • Building CLI Plugins
    • Developing Buildpacks
    • Dev Center
  • Accounts & Billing
  • Troubleshooting & Support
  • Integrating with Salesforce
    • Heroku AppLink
      • Getting Started with Heroku AppLink
      • Working wtih Heroku AppLink
      • Heroku AppLink Reference
    • Heroku Connect (Salesforce sync)
      • Heroku Connect Administration
      • Heroku Connect Reference
      • Heroku Connect Troubleshooting
    • Other Salesforce Integrations
  • Integrating with Salesforce
  • Heroku AppLink
  • Heroku AppLink Reference
  • Configuring OpenAPI Specification for Heroku AppLink

Configuring OpenAPI Specification for Heroku AppLink

Last updated July 14, 2025

Table of Contents

  • Enable Agentforce Topics and Actions
  • Customize Heroku App Settings
  • Additional Reading

With Heroku AppLink, you can publish your Heroku app’s OpenAPI spec to Salesforce and generate actions. This article describes how to configure your OpenAPI spec to enable specific actions such as enabling Agentforce actions and define permission sets in Salesforce.

Enable Agentforce Topics and Actions

An agent topic contains actions an Agentforce agent can do.

To enable topics for an action, you must define the topic with the following annotations. If you have one topic defined, you must have at least one action defined as well. See SF Topic and Action Enablement for more information.

Extension Description
x-sfdc/agent/topic/classificationDescription Required. Describes what the topic does.
x-sfdc/agent/topic/scope Required. Sets the boundaries of the topic.
x-sfdc/agent/topic/instructions Required. Sets the guidelines that tell your agent how to handle conversations in the context of the topic.
x-sfdc/agent/topic/name Required. Sets the API name of the topic. It’s recommended to use snake case, starting with a letter, and containing alphanumeric characters, spaces, and underscores.

To designate API operations as Agentforce agent actions, you must annotate at least one operation with the x-sfdc/agent/action/publishAsAgentAction parameter set to true. Agent actions require a schema that specifies the requisite metadata for their creation. This annotation activates the API for agent topics and actions.

Extension Description
x-sfdc/agent/action/publishAsAgentAction Required. true enables the operation as an action.
x-sfdc/agent/action/isUserInput Required if publishAsAgentAction is enabled. true surfaces the field for further user input.
x-sfdc/agent/action/isDisplayable Required if publishAsAgentAction is enabled. true makes the field displayable to the user.
x-sfdc/privacy/isPii Optional. If publishAsAgentAction is enabled, and this attribute is true, PII service is enabled for queries sent under that operation.

Here’s an example of an OpenAPI spec that enables agent actions and topics:

openapi: 3.1.0
info:
 title: Test API
 version: '1.0'
x-sfdc:
  agent:
    topic:
      classificationDescription: This API allows agents to book, modify, and cancel hotel reservations, as well as apply loyalty upgrades.
      scope: Your job is to assist customers in booking hotel rooms based on their preferences, loyalty status, and availability. You should also be able to recommend upgrades if the customer qualifies.
      instructions:
        - If the customer asks to create a reservation, check for a check-in date, checkout date, roomType, or any special requests.
        - If the preferred room type is unavailable, suggest alternative options with similar amenities.
paths:
 /thing/{id}:
   parameters:
     - name: id
       in: path
       required: true
       description: AI-friendly description
       schema:
      type: string
       x-sfdc:
         agent:
           action:
      isUserInput: true
   get:
     x-sfdc:
       agent:
         action:
           publishAsAgentAction: true
     operationId: get-a-thing
     description: AI-friendly description
     responses:
       '200':

Customize Heroku App Settings

Optionally, you can define the connected app or the permission sets in Salesforce to elevate your user’s permission from the default user mode to user-plus mode.

Assign the specified permission set, along with the app’s standard permission set, to the users who need elevated permissions while the app is running. When the SDK is initialized, it combines the user’s Salesforce permissions with the permissions from this set, applying them to DML operations.

Extension Description
x-sfdc/heroku/authorization/connectedApp Optional. Sets the name of the connected app to use. If none specified, we mint a user token required for the user mode.

Note: This extension is required if you set x-sfdc/heroku/authorization/permissionSet.
x-sfdc/heroku/authorization/permissionSet Optional. Sets session-based permission sets to use to elevate the user permission.

Here’s an example of an OpenAPI spec that specifies a connected app and permission set to use:

openapi: 3.0.0
info:
  ...
paths:
  /accounts:
    get:
      x-sfdc:
        heroku:
          authorization:
            connectedApp: MyConnectedApp
            permissionSet: MyPermSet

Additional Reading

  • Getting Started with Heroku AppLink
  • Working with Heroku AppLink
  • Invoking Heroku AppLink Apps

Keep reading

  • Heroku AppLink Reference

Feedback

Log in to submit feedback.

Heroku AppLink Logging and Common Errors Heroku AppLink API

Information & Support

  • Getting Started
  • Documentation
  • Changelog
  • Compliance Center
  • Training & Education
  • Blog
  • Support Channels
  • Status

Language Reference

  • Node.js
  • Ruby
  • Java
  • PHP
  • Python
  • Go
  • Scala
  • Clojure
  • .NET

Other Resources

  • Careers
  • Elements
  • Products
  • Pricing
  • RSS
    • Dev Center Articles
    • Dev Center Changelog
    • Heroku Blog
    • Heroku News Blog
    • Heroku Engineering Blog
  • Twitter
    • Dev Center Articles
    • Dev Center Changelog
    • Heroku
    • Heroku Status
  • Github
  • LinkedIn
  • © 2025 Salesforce, Inc. All rights reserved. Various trademarks held by their respective owners. Salesforce Tower, 415 Mission Street, 3rd Floor, San Francisco, CA 94105, United States
  • heroku.com
  • Legal
  • Terms of Service
  • Privacy Information
  • Responsible Disclosure
  • Trust
  • Contact
  • Cookie Preferences
  • Your Privacy Choices