Skip Navigation
Show nav
Dev Center
  • Get Started
  • Documentation
  • Changelog
  • Search
  • 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 inorSign up
Hide categories

Categories

  • Heroku Architecture
    • Compute (Dynos)
      • Dyno Management
      • Dyno Concepts
      • Dyno Behavior
      • Dyno Reference
      • Dyno Troubleshooting
    • Stacks (operating system images)
    • Networking & DNS
    • Platform Policies
    • 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
      • Troubleshooting Node.js Apps
      • Working with Node.js
      • Node.js Behavior in Heroku
    • 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
      • PHP Behavior in Heroku
      • Working with PHP
    • 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
    • Working with AI
    • Heroku Inference
      • AI Models
      • Inference Essentials
      • Inference API
      • Quick Start Guides
    • Model Context Protocol
  • 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
    • Heroku Connect (Salesforce sync)
      • Heroku Connect Administration
      • Heroku Connect Reference
      • Heroku Connect Troubleshooting
  • 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 Enterprise
  • Heroku Connect (Salesforce sync)
  • Heroku External Objects

Heroku External Objects

English — 日本語に切り替える

Last updated November 12, 2024

Table of Contents

  • Service Authentication
  • Resource Configuration
  • Rate Limits
  • Logging
  • Supported Data Types
  • Limitations

Heroku External Objects is available as part of Heroku Connect. It provides an oData wrapper for a Heroku Postgres database that has been configured for use with Heroku Connect. This feature allows other web services to retrieve data from within the specified Heroku Postgres database using RESTful endpoints generated by the wrapper.

Used in tandem with Salesforce Connect, the feature permits data in a Heroku Postgres database to be represented in a Salesforce deployment, where it can be viewed (including within Apex and Visualforce pages), searched, and related to other objects. It can’t be used in standard reports as the data is only available by reference.

Service Authentication

External Objects service endpoints are protected by basic authentication. After the service is enabled, credentials can be viewed, reset, and revoked from the External Objects settings page.

Your new and old credentials are accepted for a 10-minute period after you reset your credentials. Update the credentials in your consuming services, such as your Salesforce org, within this timeframe to avoid downtime.

Resource Configuration

When the External Objects service is active for a connection, a list of available tables and views appears in the External Objects settings page. Tables and views across all schemas within the associated connection’s database are available, including those schema not actively managed by Heroku Connect as part of the synchronization service. Any of these tables or views can be enabled or disabled as a resource in the External Objects service by selecting the corresponding checkbox in the settings page.

To be enabled as an External Objects resource, tables must contain a primary key column. Views must have a column named id.

Rate Limits

The External Objects service is rate-limited at 20,000 requests per hour for the shield, enterprise, or danketsu paid Connect plans; rate limits can be increased on request. For the demo plan, the limit is 1,000 requests per hour.

If you have multiple instances of Heroku Connect, each Connect instance has its own, separate External Objects rate limit.

Attempting to access services after this limit has been reached results in a 429 Too Many Requests error. The response message also contains information about when to expect to be able to make another API request. Rate limit throttles reset at the top of each hour.

{"message":"Request was throttled. Expected available in 1000.0 seconds."}

Logging

Administrative changes made to configuration such as credential reset and revocation, and database object inclusion and exclusion are logged as part of Heroku Connect’s Audit Messages.

Heroku External Objects produces logs of its request and ratelimit activity, which you can access from your log drain (see also, Heroku Connect Application Logging). It generates one message to capture the ratelimit that has been used and the total ratelimit for the service, which would look like:

2020-02-12T19:13:07+00:00 app[herokuexternalobjects]: addon_id=82b1c244-592d-4165-99e7-89a270459752 object_type=sync object_id=55cae68a-0628-4497-bbcd-b32cf3b7c5cf state=IDLE request_id=3d4917bc-d255-2c69-4e3d-fa4f8a2a733f method=GET path=/odata/v4/fefbdf7b43794182af6cb7c1fc04fbf9/schema$lead at=ratelimit ip=127.0.0.1 ratelimit_used=38 ratelimit=22000 user_agent=python-requests/2.11.1 level=info

Heroku External Objects also generates a log message for the response it provides to the caller:

2020-02-12T19:13:07+00:00 app[herokuexternalobjects]: addon_id=82b1c244-592d-4165-99e7-89a270459752 object_type=sync object_id=55cae68a-0628-4497-bbcd-b32cf3b7c5cf state=IDLE request_id=3d4917bc-d255-2c69-4e3d-fa4f8a2a733f method=GET path=/odata/v4/fefbdf7b43794182af6cb7c1fc04fbf9/schema$lead at=response ip=127.0.0.1 service=82.94556713104248ms status=200 user_agent=python-requests/2.11.1 level=info

These logs can be correlated by the request_id.

Supported Data Types

Heroku External Objects supports the following PostgreSQL data types:

  • bigint
  • boolean
  • bytea
  • character / character varying
  • date
  • double precision
  • integer
  • numeric
  • real
  • smallint
  • text
  • time (see the following note)
  • timestamp
  • uuid

If you enable a table or view that has an unsupported data type, the unsupported field isn’t included in the results.

Salesforce Connect doesn’t support the TimeOfDay OData type, which corresponds to the time data type in PostgreSQL. Heroku External Objects can expose time fields, but they’re ignored when using Salesforce Connect to create external object definitions.

Limitations

Generated Identity Defaults for Primary Key

PostgreSQL added support for an alternative to using SERIAL or BIGSERIAL by creating a primary key column with GENERATED BY DEFAULT AS IDENTITY or GENERATED ALWAYS AS IDENTITY. These defaults aren’t supported by Heroku External Objects and cause the creation of new records to fail. Retrieving, updating, and deleting works.

Case-Insensitive Search

Searches in Salesforce for data in External Objects are done in a case-sensitive manner. Case-insensitive searching isn’t supported by Heroku External Objects.

Batch Apex

Using Batch Apex in Salesforce to query Heroku External Objects isn’t supported.

External Change Data Capture

Heroku External Objects doesn’t support the External Change Data Capture feature in Salesforce Connect.

Free-Text Search Expression

Heroku External Objects doesn’t support Free-Text Search Expression search queries from Salesforce Connect.

Global Search

Query results appear under External Results when using Salesforce’s Global Search.

Query Time Limit

Queries generated by Heroku External Objects must complete in 20 seconds or less, otherwise Heroku External Objects returns a 530 response to Salesforce Connect.

Compress Requests

Enabling the Compress Requests option for an External Data Source in Salesforce isn’t supported.

Estimated odata.count Value

Counting the rows in a Postgres table is slow and can be intense for a database. As a result, when returning paginated results for a query, Heroku External Objects returns 50 records at a time and returns one more than the number of records to indicate that there are more results.

Tables Without Columns Are Unsupported

While PostgreSQL allows users to create a table without a column, it’s not compliant with the SQL specification and semantically ambiguous in the context of Heroku External Objects. As a result, Heroku External Objects doesn’t support (or display) tables that don’t have columns.

Composite Primary Keys Are Unsupported

Heroku External Objects doesn’t support composite primary keys. Instead of a composite primary key, create a column that stores the concatenated values of two or more source columns and set it as the primary key.

Partitioned Tables Are Unsupported

Heroku External Objects doesn’t support partitioned tables. In some cases, you can work around this limitation by creating a view over the parent table and selecting the view to be enabled in Heroku External Objects.

Keep reading

  • Heroku Connect (Salesforce sync)

Feedback

Log in to submit feedback.

Writing Data to Salesforce with Heroku Connect Heroku External Objects with Salesforce Connect

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