Salesforce Connect Adapter

The Omnata Salesforce Connect Adapter is a custom adapter for Salesforce which allows tables and views from a Snowflake account to be accessed as External Objects.

Whenever an External Object is accessed, the adapter creates a SQL query, executes the query in Snowflake via a REST API call, and translates the result back into Salesforce data types.

Overall considerations

Salesforce Connect provides a very powerful and comprehensive integration mechanism for external datasets into Salesforce. However, External Objects do not offer identical functionality to regular Objects and Custom Objects.

To understand the differences, the following document outlines all of the considerations when using Salesforce Connect: https://help.salesforce.com/articleView?id=platform_connect_considerations.htm

Architecture

The below diagram outlines how the Salesforce Connect adapter fits between Salesforce and your Snowflake data.

Architecture

Use Cases

Example use cases are:

  • Displaying a list of related records on a Salesforce object page
  • Displaying the field values of individual records
  • Creating reports using standard Salesforce reporting functionality
  • Incorporating data from Snowflake into Salesforce Flows
  • Incorporating data from Snowflake into Einstein chatbot reponses

Supported Data Types

Per the documentation, the following data types are supported by Salesforce Connect:

Salesforce Data type Description
BOOLEAN_TYPE Boolean
DATETIME_TYPE Date/time
EXTERNAL_LOOKUP_TYPE External lookup relationship
INDIRECT_LOOKUP_TYPE Indirect lookup relationship
LOOKUP_TYPE Lookup relationship
NUMBER_TYPE Number
STRING_LONG_TYPE Long text area
STRING_SHORT_TYPE Text area
URL_TYPE URL



The following table describes the current mapping between Snowflake data types and Salesforce.

Snowflake Corresponding Salesforce type
NUMBER NUMBER_TYPE if the precision is < 18, otherwise STRING_SHORT_TYPE
FLOAT Floating point numbers are not supported by Apex, but the adapter converts them to STRING_SHORT_TYPE to allow them to be displayed.

For proper treatment as a number, the Snowflake type NUMBER should be used instead.
VARCHAR STRING_SHORT_TYPE if the max length is <255, otherwise STRING_LONG_TYPE
BINARY Not supported
BOOLEAN STRING_SHORT_TYPE. Although Salesforce has a Boolean data type, it does not permit null values. So a text type is used, with '0', '1' representing False and True.
DATE Dates are not supported by Salesforce Connect, but the adapter converts to DATETIME_TYPE (at midnight) for convenience.

This makes them usable but potentially misleading.
TIMESTAMP DATETIME_TYPE
TIME Not supported
VARIANT Not supported
OBJECT Not supported
ARRAY Not supported