Contact Us 1-800-596-4880

Einstein AI Connector 1.0 Reference

Einstein AI Connector provides access to the Salesforce Einstein Trust Layer through the Models APIs.

Configurations


Config

Default configuration

Parameters

Name Type Description Default Value Required

Name

String

Name for this configuration. Connectors reference the configuration with this name.

x

Connection

Connection types to provide to this configuration.

x

Name

String

ID used to reference this configuration.

x

Expiration Policy

Configures the minimum amount of time that a dynamic configuration instance can remain idle before Mule considers it eligible for expiration.

Connection Types

Connection
Parameters
Name Type Description Default Value Required

Reconnection

When the application is deployed, a connectivity test is performed on all connectors. If set to true, deployment fails if the test doesn’t pass after exhausting the associated reconnection strategy.

Client Id

String

The OAuth public client ID as registered with the service provider.

x

Client Secret

String

The OAuth client secret that corresponds to the client ID.

x

Token Url

String

The service provider’s token endpoint URL.

https://{salesforceorg}/services/oauth2/token/

Scopes

String

The OAuth scopes to request during the OAuth dance. If not provided, it defaults the scopes in the annotation.

Object Store

String

A reference to the object store to use to store each resource owner ID’s data. If not specified, Mule runtime automatically provisions the default one.

AGENT Define Prompt Template

<ms-einstein-ai:agent-define-prompt-template>

Use the Agent define prompt template operation to use specific prompt templates. The prompt template language is a simple way to define and compose AI functions using plain text. You can use it to create natural language prompts, generate responses, extract information, invoke other prompts, or perform any other task that can be expressed with text.

Parameters

Name Type Description Default Value Required

Configuration

String

Name of the configuration to use.

x

Template

String

Prompt template for the operation.

#[payload]

Instructions

String

Instructions for the LLM, outlining the goals of the task.

x

Dataset

String

Dataset for the LLM to evaluate using the provided template and instructions.

x

Output Mime Type

String

MIME type of the payload this operation outputs.

Output Encoding

String

Encoding of the payload this operation outputs.

Config Ref

ConfigurationProvider

Name of the configuration to use to execute this component.

x

Streaming Strategy

Configures how Mule processes streams. Repeatable streams are the default behavior.

Model API Name

String

Name of the API model that interacts with the LLM.

sfdc_ai__DefaultOpenAIGPT35Turbo

Probability

Number

Probability of the model API staying accurate.

0.8

Locale

String

Localization information, which can include the default locale, input locale(s), and expected output locale(s).

en_US

Target Variable

String

Name of the variable that stores the operation’s output.

Target Value

String

Expression that evaluates the operation’s output. The expression outcome is stored in the target variable.

#[payload]

Error Mappings

Array of Error Mapping

Set of error mappings.

Reconnection Strategy

Retry strategy in case of connectivity errors.

Output

Type

Any

Attributes Type

For Configurations

Throws

  • MS-EINSTEIN-AI:CHAT_FAILURE

  • MS-EINSTEIN-AI:CONNECTIVITY

  • MS-EINSTEIN-AI:RETRY_EXHAUSTED

CHAT Answer Prompt

<ms-einstein-ai:chat-answer-prompt>

The Chat answer prompt operation sends a prompt request to the configured LLM. It uses a plain text prompt as input and responds with a plain text answer.

Parameters

Name Type Description Default Value Required

Configuration

String

Name of the configuration to use.

x

Prompt

String

Plain text prompt to send to the LLM.

#[payload]

Output Mime Type

String

MIME type of the payload this operation outputs.

Output Encoding

String

Encoding of the payload this operation outputs.

Config Ref

ConfigurationProvider

Name of the configuration to use to execute this component.

x

Streaming Strategy

Configures how Mule processes streams. Repeatable streams are the default behavior.

Model API Name

String

Name of the API model that interacts with the LLM.

sfdc_ai__DefaultOpenAIGPT35Turbo

Probability

Number

Probability of the model API staying accurate.

0.8

Locale

String

Localization information, which can include the default locale, input locale(s), and expected output locale(s).

en_US

Target Variable

String

Name of the variable that stores the operation’s output.

Target Value

String

Expression that evaluates the operation’s output. The expression outcome is stored in the target variable.

#[payload]

Error Mappings

Array of Error Mapping

Set of error mappings.

Reconnection Strategy

Retry strategy in case of connectivity errors.

Output

Type

Any

Attributes Type

For Configurations

Throws

  • MS-EINSTEIN-AI:CHAT_FAILURE

  • MS-EINSTEIN-AI:CONNECTIVITY

  • MS-EINSTEIN-AI:RETRY_EXHAUSTED

CHAT Answer Prompt With Memory

<ms-einstein-ai:chat-answer-prompt-with-memory>

The Chat answer prompt with memory operation provides memory of the conversation history for a multi-user chat operation.

Parameters

Name Type Description Default Value Required

Configuration

String

Name of the configuration to use.

x

Prompt

String

Plain text prompt to send to the LLM.

#[payload]

Memory Path

String

Path to the in-memory database for storing the conversation history.

x

Memory Name

String

Name of the conversation. For multi-user support, enter the unique user ID.

x

Keep Last Messages

Number

Maximum number of messages to remember for the conversation defined in Memory name.

x

Output Mime Type

String

MIME type of the payload this operation outputs.

Output Encoding

String

Encoding of the payload this operation outputs.

Config Ref

ConfigurationProvider

Name of the configuration to use to execute this component.

x

Streaming Strategy

Configures how Mule processes streams. Repeatable streams are the default behavior.

Model API Name

String

Name of the API model that interacts with the LLM.

sfdc_ai__DefaultOpenAIGPT35Turbo

Probability

Number

Probability of the model API staying accurate.

0.8

Locale

String

Localization information, which can include the default locale, input locale(s), and expected output locale(s).

en_US

Target Variable

String

Name of the variable that stores the operation’s output.

Target Value

String

Expression that evaluates the operation’s output. The expression outcome is stored in the target variable.

#[payload]

Error Mappings

Array of Error Mapping

Set of error mappings.

Reconnection Strategy

Retry strategy in case of connectivity errors.

Output

Type

Any

Attributes Type

For Configurations

Throws

  • MS-EINSTEIN-AI:CHAT_FAILURE

  • MS-EINSTEIN-AI:CONNECTIVITY

  • MS-EINSTEIN-AI:RETRY_EXHAUSTED

CHAT Generate From Messages

<ms-einstein-ai:chat-generate-from-messages>

The Chat generate from messages operation is a prompt request operation with provided messages to the configured LLM. It uses a plain text prompt as input and responds with a plain text answer.

Parameters

Name Type Description Default Value Required

Configuration

String

Name of the configuration to use.

x

Messages

String

#[payload]

Output Mime Type

String

MIME type this operation outputs.

Output Encoding

String

Encoding of the payload this operation outputs.

Config Ref

ConfigurationProvider

Name of the configuration to use to execute this component.

x

Streaming Strategy

Configures how Mule processes streams. Repeatable streams are the default behavior.

Model API Name

String

Name of the API model that interacts with the LLM.

sfdc_ai__DefaultOpenAIGPT35Turbo

Probability

Number

Probability of the model API staying accurate.

0.8

Locale

String

Localization information, which can include the default locale, input locale(s), and expected output locale(s).

en_US

Target Variable

String

Name of the variable that stores the operation’s output.

Target Value

String

Expression that evaluates the operation’s output. The expression outcome is stored in the target variable.

#[payload]

Error Mappings

Array of Error Mapping

Set of error mappings.

Reconnection Strategy

Retry strategy in case of connectivity errors.

Output

Type

Any

Attributes Type

For Configurations

Throws

  • MS-EINSTEIN-AI:CHAT_FAILURE

  • MS-EINSTEIN-AI:CONNECTIVITY

  • MS-EINSTEIN-AI:RETRY_EXHAUSTED

EMBEDDING Adhoc File Query

<ms-einstein-ai:embedding-adhoc-file-query>

Parameters

Name Type Description Default Value Required

Configuration

String

Name of the configuration to use.

x

Prompt

String

Plain text prompt to send to the LLM.

#[payload]

Input Stream

Any

x

Output Mime Type

String

MIME type of the payload that this operation outputs.

Output Encoding

String

Encoding of the payload that this operation outputs.

Config Ref

ConfigurationProvider

Name of the configuration to use to execute this component.

x

Streaming Strategy

Configures how Mule processes streams. Repeatable streams are the default behavior.

Model API Name

String

Name of the API model that interacts with the LLM.

sfdc_ai__DefaultOpenAITextEmbeddingAda_002

File Type

String

Type of the document to ingest into the embedding store:

  • Text

  • PDF

  • CSV

  • URL

PDF

Option Type

String

How to split the document prior to ingestion into the embedding or vector database.

FULL

Option Type

String

FULL

Target Variable

String

Name of the variable that stores the operation’s output.

Target Value

String

Expression that evaluates the operation’s output. The expression outcome is stored in the target variable.

#[payload]

Error Mappings

Array of Error Mapping

Set of error mappings

Reconnection Strategy

Retry strategy in case of connectivity errors.

Output

Type

Any

For Configurations

Throws

  • MS-EINSTEIN-AI:CONNECTIVITY

  • MS-EINSTEIN-AI:EMBEDDING_OPERATIONS_FAILURE

  • MS-EINSTEIN-AI:RAG_FAILURE

  • MS-EINSTEIN-AI:RETRY_EXHAUSTED

  • MS-EINSTEIN-AI:TOOLS_OPERATION_FAILURE

EMBEDDING Generate From File

<ms-einstein-ai:embedding-generate-from-file>

Parameters

Name Type Description Default Value Required

Configuration

String

Name of the configuration to use.

x

Input Stream

Any

#[payload]

Output Mime Type

String

The MIME type of the payload that this operation outputs.

Output Encoding

String

Encoding of the payload that this operation outputs.

Config Ref

ConfigurationProvider

Name of the configuration to use to execute this component.

x

Streaming Strategy

Configures how Mule processes streams. Repeatable streams are the default behavior.

Model API Name

String

sfdc_ai__DefaultOpenAITextEmbeddingAda_002

File Type

String

PDF

Option Type

String

FULL

Target Variable

String

Name of the variable that stores the operation’s output.

Target Value

String

Expression that evaluates the operation’s output. The expression outcome is stored in the target variable.

#[payload]

Error Mappings

Array of Error Mapping

Set of error mappings

Reconnection Strategy

Retry strategy in case of connectivity errors.

Output

Type

Any

For Configurations

Throws

  • MS-EINSTEIN-AI:CONNECTIVITY

  • MS-EINSTEIN-AI:EMBEDDING_OPERATIONS_FAILURE

  • MS-EINSTEIN-AI:RAG_FAILURE

  • MS-EINSTEIN-AI:RETRY_EXHAUSTED

  • MS-EINSTEIN-AI:TOOLS_OPERATION_FAILURE

EMBEDDING Generate From Text

<ms-einstein-ai:embedding-generate-from-text>

Parameters

Name Type Description Default Value Required

Configuration

String

Name of the configuration to use.

x

Text

String

#[payload]

Output Mime Type

String

MIME type of the payload that this operation outputs.

Output Encoding

String

Encoding of the payload that this operation outputs.

Config Ref

ConfigurationProvider

Name of the configuration to use to execute this component.

x

Streaming Strategy

Configures how Mule processes streams. Repeatable streams are the default behavior.

Model API Name

String

sfdc_ai__DefaultOpenAITextEmbeddingAda_002

Target Variable

String

Name of the variable that stores the operation’s output.

Target Value

String

Expression that evaluates the operation’s output. The expression outcome is stored in the target variable.

#[payload]

Error Mappings

Array of Error Mapping

Set of error mappings

Reconnection Strategy

A retry strategy in case of connectivity errors

Output

Type

Any

Attributes Type

For Configurations

Throws

  • MS-EINSTEIN-AI:CONNECTIVITY

  • MS-EINSTEIN-AI:EMBEDDING_OPERATIONS_FAILURE

  • MS-EINSTEIN-AI:RAG_FAILURE

  • MS-EINSTEIN-AI:RETRY_EXHAUSTED

  • MS-EINSTEIN-AI:TOOLS_OPERATION_FAILURE

RAG Adhoc Load Document

<ms-einstein-ai:rag-adhoc-load-document>

Parameters

Name Type Description Default Value Required

Configuration

String

Name of the configuration to use.

x

Prompt

String

Plain text prompt to send to the LLM.

#[payload]

File Path

String

Full file path for the document to ingest into the embedding store. Ensure the file path is accessible.

x

Output Mime Type

String

MIME type of the payload that this operation outputs.

Output Encoding

String

Encoding of the payload that this operation outputs.

Config Ref

ConfigurationProvider

Name of the configuration to use to execute this component.

x

Streaming Strategy

Configures how Mule processes streams. Repeatable streams are the default behavior.

Embedding Name

String

sfdc_ai__DefaultOpenAITextEmbeddingAda_002

File Type

String

Type of the document to ingest into the embedding store:

  • Text

  • PDF

  • CSV

  • URL

PDF

Option Type

String

How to split the document prior to ingestion into the embedding or vector database.

FULL

Model API Name

String

Name of the API model that interacts with the LLM.

sfdc_ai__DefaultOpenAIGPT35Turbo

Probability

Number

Probability of the model API staying accurate.

0.8

Locale

String

Localization information, which can include the default locale, input locale(s), and expected output locale(s).

en_US

Target Variable

String

Name of the variable that stores the operation’s output.

Target Value

String

Expression that evaluates the operation’s output. The expression outcome is stored in the target variable.

#[payload]

Error Mappings

Array of Error Mapping

Set of error mappings.

Reconnection Strategy

Retry strategy in case of connectivity errors.

Output

Type

Any

Attributes Type

For Configurations

Throws

  • MS-EINSTEIN-AI:CONNECTIVITY

  • MS-EINSTEIN-AI:EMBEDDING_OPERATIONS_FAILURE

  • MS-EINSTEIN-AI:RAG_FAILURE

  • MS-EINSTEIN-AI:RETRY_EXHAUSTED

  • MS-EINSTEIN-AI:TOOLS_OPERATION_FAILURE

Tools Use Ai Service

<ms-einstein-ai:tools-use-ai-service>

Parameters

Name Type Description Default Value Required

Configuration

String

Name of the configuration to use.

x

Prompt

String

Plain text prompt to send to the LLM.

#[payload]

Input Stream

Any

x

Output Mime Type

String

MIME type of the payload that this operation outputs.

Output Encoding

String

Encoding of the payload that this operation outputs.

Config Ref

ConfigurationProvider

Name of the configuration to use to execute this component.

x

Streaming Strategy

Configures how Mule processes streams. Repeatable streams are the default behavior.

Model API Name

String

Name of the API model that interacts with the LLM.

sfdc_ai__DefaultOpenAIGPT35Turbo

Probability

Number

Probability of the model API staying accurate.

0.8

Locale

String

Localization information, which can include the default locale, input locale(s), and expected output locale(s).

en_US

Target Variable

String

Name of the variable that stores the operation’s output.

Target Value

String

Expression that evaluates the operation’s output. The expression outcome is stored in the target variable.

#[payload]

Error Mappings

Array of Error Mapping

Set of error mappings

Reconnection Strategy

Retry strategy in case of connectivity errors.

Output

Type

Binary

Attributes Type

For Configurations

Throws

  • MS-EINSTEIN-AI:CONNECTIVITY

  • MS-EINSTEIN-AI:EMBEDDING_OPERATIONS_FAILURE

  • MS-EINSTEIN-AI:RAG_FAILURE

  • MS-EINSTEIN-AI:RETRY_EXHAUSTED

  • MS-EINSTEIN-AI:TOOLS_OPERATION_FAILURE

Unauthorize

<ms-einstein-ai:unauthorize>

Deletes all the access token information of a given resource owner ID so that it’s impossible to execute any operation for that user without repeating the OAuth dance.

Parameters

Name Type Description Default Value Required

Configuration

String

Name of the configuration to use.

x

Config Ref

ConfigurationProvider

Name of the configuration to use to execute this component.

x

For Configurations

Types

Reconnection

Configures a reconnection strategy for an operation.

Field Type Description Default Value Required

Fails Deployment

Boolean

When the application is deployed, a connectivity test is performed on all connectors. If set to true, deployment fails if the test doesn’t pass after exhausting the associated reconnection strategy.

Reconnection Strategy

Reconnection strategy to use.

Reconnect

Configures a standard reconnection strategy, which specifies how often to reconnect and how many reconnection attempts the connector source or operation can make.

Field Type Description Default Value Required

Frequency

Number

How often to attempt to reconnect, in milliseconds.

Blocking

Boolean

If false, the reconnection strategy runs in a separate, non-blocking thread.

Count

Number

How many reconnection attempts the Mule app can make.

Reconnect Forever

Configures a forever reconnection strategy by which the connector source or operation attempts to reconnect at a specified frequency for as long as the Mule app runs.

Field Type Description Default Value Required

Frequency

Number

How often to attempt to reconnect, in milliseconds.

Blocking

Boolean

If false, the reconnection strategy runs in a separate, non-blocking thread.

Pooling Profile

Field Type Description Default Value Required

Max Active

Number

Controls the maximum number of Mule components that can be borrowed from a session at one time. When set to a negative value, there is no limit to the number of components that may be active at one time. When maxActive is exceeded, the pool is said to be exhausted.

Max Idle

Number

Controls the maximum number of Mule components that can sit idle in the pool at any time. When set to a negative value, there is no limit to the number of Mule components that may be idle at one time.

Max Wait

Number

Specifies the number of milliseconds to wait for a pooled component to become available when the pool is exhausted and the exhaustedAction is set to WHEN_EXHAUSTED_WAIT.

Min Eviction Millis

Number

Determines the minimum amount of time an object may sit idle in the pool before it is eligible for eviction. When non-positive, no objects will be evicted from the pool due to idle time alone.

Eviction Check Interval Millis

Number

Specifies the number of milliseconds between runs of the object evictor. When non-positive, no object evictor is executed.

Exhausted Action

Enumeration, one of:

  • WHEN_EXHAUSTED_GROW

  • WHEN_EXHAUSTED_WAIT

  • WHEN_EXHAUSTED_FAIL

Specifies the behavior of the Mule component pool when the pool is exhausted. Possible values are: "WHEN_EXHAUSTED_FAIL", which will throw a NoSuchElementException, "WHEN_EXHAUSTED_WAIT", which will block by invoking Object.wait(long) until a new or idle object is available, or WHEN_EXHAUSTED_GROW, which will create a new Mule instance and return it, essentially making maxActive meaningless. If a positive maxWait value is supplied, it will block for at most that many milliseconds, after which a NoSuchElementException will be thrown. If maxThreadWait is a negative value, it will block indefinitely.

Initialisation Policy

Enumeration, one of:

  • INITIALISE_NONE

  • INITIALISE_ONE

  • INITIALISE_ALL

Determines how components in a pool should be initialized. The possible values are: INITIALISE_NONE (will not load any components into the pool on startup), INITIALISE_ONE (will load one initial component into the pool on startup), or INITIALISE_ALL (will load all components in the pool on startup)

Disabled

Boolean

Whether pooling should be disabled

Expiration Policy

Configures an expiration policy strategy.

Field Type Description Default Value Required

Max Idle Time

Number

Configures the maximum amount of time that a dynamic configuration instance can remain idle before Mule considers it eligible for expiration.

Time Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

Time unit for the Max Idle Time field.

Einstein Response Attributes

Field Type Description Default Value Required

Content Quality

Generation Id

String

Generation Parameters

Response Id

String

Response Parameters

Content Quality

Content moderation details for generated content, including its safety and quality scores.

Field Type Description Default Value Required

Scan Toxicity

Scans content for toxicity.

Scan Toxicity

Represents safety and toxicity data.

Field Type Description Default Value Required

Categories

Array of Categories

Is Detected

Boolean

Indicates whether a scan detected any toxic content. When the isDetected field is true, it indicates a high level of confidence that the content contains toxic language. When the isDetected field is false, it doesn’t necessarily mean there isn’t toxicity, but rather, that the model didn’t detect toxicity in the content.

Categories

The array of toxicity categories.

Field Type Description Default Value Required

Category Name

String

Name of the category.

Score

String

A toxicity score value from 0 to 1. A higher score means the response is more likely to be toxic.

Generation Parameters

Field Type Description Default Value Required

Finish Reason

String

Index

Number

Logprobs

Any

Refusal

Any

Response Parameters

Field Type Description Default Value Required

Model

String

Object

String

System Finger Print

String

Token Usage

Token Usage

Field Type Description Default Value Required

Completion Token Details

Input Count

Number

Number of tokens the LLM receives from the prompt.

Output Count

Number

Number of tokens the LLM generates in response to the input tokens.

Prompt Token Details

Total Count

Number

Completion Tokens Details

Requesting a large number of generated tokens completions can cause increased latencies.

Field Type Description Default Value Required

Accepted Prediction Tokens

Number

Number of accepted prediction tokens.

Audio Tokens

Number

Number of audio tokens completions.

Reasoning Tokens

Number

Number of tokens for reasoning and outputs.

Rejected Prediction Tokens

Number

Number of prediction tokens the LLM generated that were later discarded because they were deemed incorrect or not useful within the context.

Prompt Tokens Details

Field Type Description Default Value Required

Audio Tokens

Number

Number of audio tokens in the prompt.

Cached Tokens

Number

Number of cached tokens in the prompt.

Repeatable In-Memory Stream

Configures the in-memory streaming strategy by which the request fails if the data exceeds the MAX buffer size. Always run performance tests to find the optimal buffer size for your specific use case.

Field Type Description Default Value Required

Initial Buffer Size

Number

Initial amount of memory to allocate to the data stream. If the streamed data exceeds this value, the buffer expands by Buffer Size Increment, with an upper limit of Max Buffer Size.

Buffer Size Increment

Number

This is by how much the buffer size expands if it exceeds its initial size. Setting a value of zero or lower means that the buffer should not expand, meaning that a STREAM_MAXIMUM_SIZE_EXCEEDED error is raised when the buffer gets full.

Max Buffer Size

Number

Maximum size of the buffer. If the buffer size exceeds this value, Mule raises a STREAM_MAXIMUM_SIZE_EXCEEDED error. A value of less than or equal to 0 means no limit.

Buffer Unit

Enumeration, one of:

  • BYTE

  • KB

  • MB

  • GB

Unit for the Initial Buffer Size, Buffer Size Increment, and Max Buffer Size fields.

Repeatable File Store Stream

Configures the repeatable file-store streaming strategy by which Mule keeps a portion of the stream content in memory. If the stream content is larger than the configured buffer size, Mule backs up the buffer’s content to disk and then clears the memory.

Field Type Description Default Value Required

In Memory Size

Number

Maximum amount of memory that the stream can use for data. If the amount of memory exceeds this value, Mule buffers the content to disk. To optimize performance:

  • Configure a larger buffer size to avoid the number of times Mule needs to write the buffer on disk. This increases performance, but it also limits the number of concurrent requests your application can process, because it requires additional memory.

  • Configure a smaller buffer size to decrease memory load at the expense of response time.

Buffer Unit

Enumeration, one of:

  • BYTE

  • KB

  • MB

  • GB

Unit for the In Memory Size field.

Error Mapping

Field Type Description Default Value Required

Source

Enumeration, one of:

  • ANY

  • REDELIVERY_EXHAUSTED

  • TRANSFORMATION

  • EXPRESSION

  • SECURITY

  • CLIENT_SECURITY

  • SERVER_SECURITY

  • ROUTING

  • CONNECTIVITY

  • RETRY_EXHAUSTED

  • TIMEOUT

Target

String

x

View on GitHub