# mulesoft Einstein AI Connector - Full Documentation --- product: Einstein AI Connector version: 1.0 --- # Configuring Agent Operations for Einstein AI Connector 1.0 > For the full documentation index, see: https://docs.mulesoft.com/llms.txt ## Configure the Agent Define Prompt Template Operation Use the **Agent define prompt template** operation to define specific prompt templates for use when integrating with the LLM of your choice. This allows you to create natural language prompts that generate responses, extract information, invoke other prompts, or perform any text-based task. 1. Select the operation on the Anypoint Code Builder or Studio canvas. 2. In the **General** properties tab for the operation, enter these values: - **Template** Enter the prompt template for the operation. - **Instructions** Provide the instructions for the LLM, outlining the goals of the task. - **Dataset** Specify the dataset for the LLM to evaluate using the provided template and instructions. 3. In **Additional properties**, enter these values: - **Model name** Select the model name. The default is `OpenAI GPT 3.5 Turbo`. - **Probability** Enter the probability of the model staying accurate. The default is `0.8`. **Locale** Enter the localization information, which can include the default locale, input locale(s), and expected output locale(s). The default is `en_US`. This is the XML for this operation: ```xml ``` ### Output Configuration This operation responds with a JSON payload containing the main LLM response. Additionally, attributes such as token usage are included as part of the metadata (attributes) but not within the main payload. This additional metadata is particularly useful to track token usage across applications and manage costs associated with LLM adoption. This is an example response: ```json { "response": "{\n \"type\": \"positive\",\n \"response\": \"Thank you for your positive feedback on the training last week. We are glad to hear that you had a great experience. Have a nice day!\"\n}" } ``` The operation also returns attributes that aren’t within the main JSON payload, which include information about token usage, for example: ```json { "tokenUsage": { "outputCount": 9, "totalCount": 18, "inputCount": 9 }, "additionalAttributes": {} } ``` - `tokenUsage` Token usage metadata returned as attributes - `outputCount` Number of tokens used to generate the output - `totalCount` Total number of tokens used for input and output - `inputCount` Number of tokens used to process the input ## See Also - [Using Anypoint Code Builder to Configure a Connector](https://docs.mulesoft.com/connectors/introduction/intro-config-use-acb) - [Using Studio to Configure a Connector](https://docs.mulesoft.com/connectors/introduction/intro-config-use-studio) - [Einstein AI Connector Reference](https://docs.mulesoft.com/einstein-ai-connector/1.0/einstein-ai-connector-reference) - [Einstein AI - Additional Configuration Information](https://docs.mulesoft.com/einstein-ai-connector/1.0/einstein-ai-additional-config) - [Salesforce Help](https://help.salesforce.com) --- product: Einstein AI Connector version: 1.1 --- # Configuring Agent Operations for Einstein AI Connector 1.1 > For the full documentation index, see: https://docs.mulesoft.com/llms.txt ## Configure the Agent Define Prompt Template Operation Use the **Agent define prompt template** operation to define specific prompt templates for use when integrating with the LLM of your choice. This allows you to create natural language prompts that generate responses, extract information, invoke other prompts, or perform any text-based task. 1. Select the operation on the Anypoint Code Builder or Studio canvas. 2. In the **General** properties tab for the operation, enter these values: - **Template** Enter the prompt template for the operation. - **Instructions** Provide the instructions for the LLM, outlining the goals of the task. - **Dataset** Specify the dataset for the LLM to evaluate using the provided template and instructions. 3. In **Additional properties**, enter these values: - **Model name** Select the model name. The default is `OpenAI GPT 3.5 Turbo`. - **Probability** Enter the probability of the model staying accurate. The default is `0.8`. **Locale** Enter the localization information, which can include the default locale, input locale(s), and expected output locale(s). The default is `en_US`. This is the XML for this operation: ```xml ``` ### Output Configuration This operation responds with a JSON payload containing the main LLM response. Additionally, attributes such as token usage are included as part of the metadata (attributes) but not within the main payload. This additional metadata is particularly useful to track token usage across applications and manage costs associated with LLM adoption. This is an example response: ```json { "response": "{\n \"type\": \"positive\",\n \"response\": \"Thank you for your positive feedback on the training last week. We are glad to hear that you had a great experience. Have a nice day!\"\n}" } ``` The operation also returns attributes that aren’t within the main JSON payload, which include information about token usage, for example: ```json { "tokenUsage": { "outputCount": 9, "totalCount": 18, "inputCount": 9 }, "additionalAttributes": {} } ``` - `tokenUsage` Token usage metadata returned as attributes - `outputCount` Number of tokens used to generate the output - `totalCount` Total number of tokens used for input and output - `inputCount` Number of tokens used to process the input ## See Also - [Using Anypoint Code Builder to Configure a Connector](https://docs.mulesoft.com/connectors/introduction/intro-config-use-acb) - [Using Studio to Configure a Connector](https://docs.mulesoft.com/connectors/introduction/intro-config-use-studio) - [Einstein AI Connector Reference](https://docs.mulesoft.com/einstein-ai-connector/1.1/einstein-ai-connector-reference) - [Einstein AI - Additional Configuration Information](https://docs.mulesoft.com/einstein-ai-connector/1.1/einstein-ai-additional-config) - [Salesforce Help](https://help.salesforce.com) --- product: Einstein AI Connector version: 1.2 --- # Configuring Agent Operations for Einstein AI Connector 1.2 > For the full documentation index, see: https://docs.mulesoft.com/llms.txt ## Configure the Agent Define Prompt Template Operation Use the **Agent define prompt template** operation to define specific prompt templates for use when integrating with the LLM of your choice. This allows you to create natural language prompts that generate responses, extract information, invoke other prompts, or perform any text-based task. 1. Select the operation on the Anypoint Code Builder or Studio canvas. 2. In the **General** properties tab for the operation, enter these values: - **Template** Enter the prompt template for the operation. - **Instructions** Provide the instructions for the LLM, outlining the goals of the task. - **Dataset** Specify the dataset for the LLM to evaluate using the provided template and instructions. 3. In **Additional properties**, enter these values: - **Model name** Select the model name. The default is `OpenAI GPT 3.5 Turbo`. - **Probability** Enter the probability of the model staying accurate. The default is `0.8`. **Locale** Enter the localization information, which can include the default locale, input locale(s), and expected output locale(s). The default is `en_US`. This is the XML for this operation: ```xml ``` ### Output Configuration This operation responds with a JSON payload containing the main LLM response. Additionally, attributes such as token usage are included as part of the metadata (attributes) but not within the main payload. This additional metadata is particularly useful to track token usage across applications and manage costs associated with LLM adoption. This is an example response: ```json { "response": "{\n \"type\": \"positive\",\n \"response\": \"Thank you for your positive feedback on the training last week. We are glad to hear that you had a great experience. Have a nice day!\"\n}" } ``` The operation also returns attributes that aren’t within the main JSON payload, which include information about token usage, for example: ```json { "tokenUsage": { "outputCount": 9, "totalCount": 18, "inputCount": 9 }, "additionalAttributes": {} } ``` - `tokenUsage` Token usage metadata returned as attributes - `outputCount` Number of tokens used to generate the output - `totalCount` Total number of tokens used for input and output - `inputCount` Number of tokens used to process the input ## See Also - [Using Anypoint Code Builder to Configure a Connector](https://docs.mulesoft.com/connectors/introduction/intro-config-use-acb) - [Using Studio to Configure a Connector](https://docs.mulesoft.com/connectors/introduction/intro-config-use-studio) - [Einstein AI Connector Reference](https://docs.mulesoft.com/einstein-ai-connector/1.2/einstein-ai-connector-reference) - [Einstein AI - Additional Configuration Information](https://docs.mulesoft.com/einstein-ai-connector/1.2/einstein-ai-additional-config) - [Salesforce Help](https://help.salesforce.com) --- product: Einstein AI Connector version: 2.0 is-latest-version: true --- # Configuring Agent Operations for Einstein AI Connector 2.0 > For the full documentation index, see: https://docs.mulesoft.com/llms.txt ## Configure the Agent Define Prompt Template Operation Use the **Agent define prompt template** operation to define specific prompt templates for use when integrating with the LLM of your choice. This allows you to create natural language prompts that generate responses, extract information, invoke other prompts, or perform any text-based task. 1. Select the operation on the Anypoint Code Builder or Studio canvas. 2. In the **General** properties tab for the operation, enter these values: - **Template** Enter the prompt template for the operation. - **Instructions** Provide the instructions for the LLM, outlining the goals of the task. - **Dataset** Specify the dataset for the LLM to evaluate using the provided template and instructions. 3. In **Additional properties**, enter these values: - **Model name** Select the model name. The default is `OpenAI GPT 3.5 Turbo`. - **Probability** Enter the probability of the model staying accurate. The default is `0.8`. **Locale** Enter the localization information, which can include the default locale, input locale(s), and expected output locale(s). The default is `en_US`. This is the XML for this operation: ```xml #[payload.template] #[payload.instructions] #[payload.dataset] ``` ### Output Configuration This operation responds with a JSON payload containing the main LLM response. Additionally, attributes such as token usage are included as part of the metadata (attributes) but not within the main payload. This additional metadata is particularly useful to track token usage across applications and manage costs associated with LLM adoption. This is an example response: ```json { "response": "{\n \"type\": \"positive\",\n \"response\": \"Thank you for your positive feedback on the training last week. We are glad to hear that you had a great experience. Have a nice day!\"\n}" } ``` The operation also returns attributes that aren’t within the main JSON payload, which include information about token usage, for example: ```json { "tokenUsage": { "outputCount": 9, "totalCount": 18, "inputCount": 9 }, "additionalAttributes": {} } ``` - `tokenUsage` Token usage metadata returned as attributes - `outputCount` Number of tokens used to generate the output - `totalCount` Total number of tokens used for input and output - `inputCount` Number of tokens used to process the input ## See Also - [Using Anypoint Code Builder to Configure a Connector](https://docs.mulesoft.com/connectors/introduction/intro-config-use-acb) - [Using Studio to Configure a Connector](https://docs.mulesoft.com/connectors/introduction/intro-config-use-studio) - [Einstein AI Connector Reference](https://docs.mulesoft.com/einstein-ai-connector/latest/einstein-ai-connector-reference) - [Einstein AI - Additional Configuration Information](https://docs.mulesoft.com/einstein-ai-connector/latest/einstein-ai-additional-config) - [Salesforce Help](https://help.salesforce.com) --- product: Einstein AI Connector version: 1.0 --- # Configuring Chat Operations for Einstein AI Connector 1.0 > For the full documentation index, see: https://docs.mulesoft.com/llms.txt ## Configure the Chat Answer Prompt Operation The **Chat answer prompt** operation sends a request to the configured LLM. This operation uses a plain text prompt as input and responds with a plain text answer. 1. Select the operation on the Anypoint Code Builder or Studio canvas. 2. In the **General** properties tab for the operation, enter plain text for the **Prompt**. 3. In **Additional properties**, enter these values: - **Model name** Select the model name. The default is `OpenAI GPT 3.5 Turbo`. - **Probability** Enter the probability of the model staying accurate. The default is `0.8`. **Locale** Enter the localization information, which can include the default locale, input locale(s), and expected output locale(s). The default is `en_US`. This is the XML configuration for this operation: ```xml ``` ## Configure the Chat Generate from Messages Operation The **Chat generate from messages** operation is a prompt request operation to the configured LLM, with provided messages. This operation accepts multiple messages and uses a plain text prompt as input. The operation responds with a plain text answer. 1. Select the operation on the Anypoint Code Builder or Studio canvas. 2. In the **General** properties tab for the operation, enter plain text for the **Messages**. 3. In **Additional properties**, enter these values: - **Model name** Select the model name. The default is `OpenAI GPT 3.5 Turbo`. - **Probability** Enter the probability of the model staying accurate. The default is `0.8`. **Locale** Enter the localization information, which can include the default locale, input locale(s), and expected output locale(s). The default is `en_US`. This is the configuration XML for this operation: ```xml ``` ## Configure the Chat Answer Prompt With Memory Operation This operation is deprecated. The **Chat answer prompt with memory** operation retains conversation history for a multi-user chat operation. 1. Select the operation on the Anypoint Code Builder or Studio canvas. 2. In the **General** properties tab for the operation, enter these values: - **Prompt** Contains the prompt for the operation. - **Memory Path** Path to the in-memory database for storing the conversation history. You can also use a DataWeave expression for this field, for example: `#["/Users/john.wick/Desktop/mac-demo/db/" ++ payload.memoryName].` - **Memory name** Name of the conversation. For multi-user support, enter the unique user ID. - **Keep last messages** Maximum number of messages to remember for the conversation defined in **Memory name**. 3. In **Additional properties**, enter these values: - **Model name** Select the model name. The default is `OpenAI GPT 3.5 Turbo`. - **Probability** Enter the probability of the model staying accurate. The default is `0.8`. **Locale** Enter the localization information, which can include the default locale, input locale(s), and expected output locale(s). The default is `en_US`. This is the XML configuration for this operation: ```xml ``` ## See Also - [Using Anypoint Code Builder to Configure a Connector](https://docs.mulesoft.com/connectors/introduction/intro-config-use-acb) - [Einstein AI Connector Overview](https://docs.mulesoft.com/einstein-ai-connector/1.0/) - [Einstein AI Connector Reference](https://docs.mulesoft.com/einstein-ai-connector/1.0/einstein-ai-connector-reference) - [Salesforce Help](https://help.salesforce.com) --- product: Einstein AI Connector version: 1.1 --- # Configuring Chat Operations for Einstein AI Connector 1.1 > For the full documentation index, see: https://docs.mulesoft.com/llms.txt ## Configure the Chat Answer Prompt Operation The **Chat answer prompt** operation sends a request to the configured LLM. This operation uses a plain text prompt as input and responds with a plain text answer. 1. Select the operation on the Anypoint Code Builder or Studio canvas. 2. In the **General** properties tab for the operation, enter plain text for the **Prompt**. 3. In **Additional properties**, enter these values: - **Model name** Select the model name. The default is `OpenAI GPT 3.5 Turbo`. - **Probability** Enter the probability of the model staying accurate. The default is `0.8`. **Locale** Enter the localization information, which can include the default locale, input locale(s), and expected output locale(s). The default is `en_US`. This is the XML configuration for this operation: ```xml ``` ## Configure the Chat Generate from Messages Operation The **Chat generate from messages** operation is a prompt request operation to the configured LLM, with provided messages. This operation accepts multiple messages and uses a plain text prompt as input. The operation responds with a plain text answer. 1. Select the operation on the Anypoint Code Builder or Studio canvas. 2. In the **General** properties tab for the operation, enter plain text for the **Messages**. 3. In **Additional properties**, enter these values: - **Model name** Select the model name. The default is `OpenAI GPT 3.5 Turbo`. - **Probability** Enter the probability of the model staying accurate. The default is `0.8`. **Locale** Enter the localization information, which can include the default locale, input locale(s), and expected output locale(s). The default is `en_US`. This is the configuration XML for this operation: ```xml ``` ## See Also - [Using Anypoint Code Builder to Configure a Connector](https://docs.mulesoft.com/connectors/introduction/intro-config-use-acb) - [Einstein AI Connector Overview](https://docs.mulesoft.com/einstein-ai-connector/1.1/) - [Einstein AI Connector Reference](https://docs.mulesoft.com/einstein-ai-connector/1.1/einstein-ai-connector-reference) - [Salesforce Help](https://help.salesforce.com) --- product: Einstein AI Connector version: 1.2 --- # Configuring Chat Operations for Einstein AI Connector 1.2 > For the full documentation index, see: https://docs.mulesoft.com/llms.txt ## Configure the Chat Answer Prompt Operation The **Chat answer prompt** operation sends a request to the configured LLM. This operation uses a plain text prompt as input and responds with a plain text answer. 1. Select the operation on the Anypoint Code Builder or Studio canvas. 2. In the **General** properties tab for the operation, enter plain text for the **Prompt**. 3. In **Additional properties**, enter these values: - **Model name** Select the model name. The default is `OpenAI GPT 3.5 Turbo`. - **Probability** Enter the probability of the model staying accurate. The default is `0.8`. **Locale** Enter the localization information, which can include the default locale, input locale(s), and expected output locale(s). The default is `en_US`. This is the XML configuration for this operation: ```xml ``` ## Configure the Chat Generate from Messages Operation The **Chat generate from messages** operation is a prompt request operation to the configured LLM, with provided messages. This operation accepts multiple messages and uses a plain text prompt as input. The operation responds with a plain text answer. 1. Select the operation on the Anypoint Code Builder or Studio canvas. 2. In the **General** properties tab for the operation, enter plain text for the **Messages**. 3. In **Additional properties**, enter these values: - **Model name** Select the model name. The default is `OpenAI GPT 3.5 Turbo`. - **Probability** Enter the probability of the model staying accurate. The default is `0.8`. **Locale** Enter the localization information, which can include the default locale, input locale(s), and expected output locale(s). The default is `en_US`. This is the configuration XML for this operation: ```xml ``` ## See Also - [Using Anypoint Code Builder to Configure a Connector](https://docs.mulesoft.com/connectors/introduction/intro-config-use-acb) - [Einstein AI Connector Overview](https://docs.mulesoft.com/einstein-ai-connector/1.2/) - [Einstein AI Connector Reference](https://docs.mulesoft.com/einstein-ai-connector/1.2/einstein-ai-connector-reference) - [Salesforce Help](https://help.salesforce.com) --- product: Einstein AI Connector version: 2.0 is-latest-version: true --- # Configuring Chat Operations for Einstein AI Connector 2.0 > For the full documentation index, see: https://docs.mulesoft.com/llms.txt ## Configure the Chat Answer Prompt Operation The **Chat answer prompt** operation sends a request to the configured LLM. This operation uses a plain text prompt as input and responds with a plain text answer. 1. Select the operation on the Anypoint Code Builder or Studio canvas. 2. In the **General** properties tab for the operation, enter plain text for the **Prompt**. 3. In **Additional properties**, enter these values: - **Model name** Select the model name. The default is `OpenAI GPT 3.5 Turbo`. - **Probability** Enter the probability of the model staying accurate. The default is `0.8`. **Locale** Enter the localization information, which can include the default locale, input locale(s), and expected output locale(s). The default is `en_US`. This is the XML configuration for this operation: ```xml #[payload.prompt] ``` ## Configure the Chat Generate from Messages Operation The **Chat generate from messages** operation is a prompt request operation to the configured LLM, with provided messages. This operation accepts multiple messages and uses a plain text prompt as input. The operation responds with a plain text answer. 1. Select the operation on the Anypoint Code Builder or Studio canvas. 2. In the **General** properties tab for the operation, enter plain text for the **Messages**. 3. In **Additional properties**, enter these values: - **Model name** Select the model name. The default is `OpenAI GPT 3.5 Turbo`. - **Probability** Enter the probability of the model staying accurate. The default is `0.8`. **Locale** Enter the localization information, which can include the default locale, input locale(s), and expected output locale(s). The default is `en_US`. This is the configuration XML for this operation: ```xml #[payload.messages] ``` ## See Also - [Using Anypoint Code Builder to Configure a Connector](https://docs.mulesoft.com/connectors/introduction/intro-config-use-acb) - [Einstein AI Connector Overview](https://docs.mulesoft.com/einstein-ai-connector/latest/) - [Einstein AI Connector Reference](https://docs.mulesoft.com/einstein-ai-connector/latest/einstein-ai-connector-reference) - [Salesforce Help](https://help.salesforce.com) --- product: Einstein AI Connector version: 1.0 --- # Configuring Embedding Operations for Einstein AI Connector 1.0 > For the full documentation index, see: https://docs.mulesoft.com/llms.txt ## Configure the Adhoc File Query Operation The **Embedding Adhoc File Query** operation takes a document and ingests it into the vector database along with its query. The output of this operation is a set of scores with the complete content of the document that’s the most likely answer to the query. The vector database is used to identify the numeric representation of the content before creating the likely score. 1. Select the operation on the Anypoint Code Builder or Studio canvas. 2. In the **General** properties tab for the operation, enter these values: - **Prompt** Plain text for the prompt to send to the LLM - **File path** Full file path for the document to ingest into the embedding store. Ensure the file path is accessible. You can also use a DataWeave expression for this field, for example: ```dataweave mule.home ++ "/apps/" ++ app.name ++ "/customer-service.pdf" ``` 3. In **Additional Properties**, select: - **Model name** Name of the API model that interacts with the LLM. - **File type** - **Text** Any type of text files (JSON, XML, txt, CSV, and so on) - **PDF** System-generated PDF files - **CSV** CSV file with comma-separated values - **URL** A single URL. - **Option type** How to split the document prior to ingestion into the vector database ## Configure the Generate From File Operation The **Embedding generate from file** operation takes a document and ingests it into the vector database. The output of this operation is a numeric representation of the content. 1. Select the operation on the Anypoint Code Builder or Studio canvas. 2. In the **General** properties tab for the operation, enter these values: - **File path** Full file path for the document to ingest into the embedding store. Ensure the file path is accessible. You can also use a DataWeave expression for this field, for example: ```dataweave mule.home ++ "/apps/" ++ app.name ++ "/customer-service.pdf" ``` 3. In **Additional Properties**, select: - **Model name** Name of the API model that interacts with the LLM. - **File type** - **Text** Any type of text files (JSON, XML, txt, CSV, and so on) - **PDF** System-generated PDF files - **CSV** CSV file with comma-separated values - **URL** A single URL. - **Option type** How to split the document prior to ingestion into the vector database ### How Data is Parsed Data from files are parsed in a way that changes the format of the generated embeddings slightly (the content itself isn’t changed): - Spaces are removed from the beginning and end of file content, for example: Before parsing: ```txt " Para 1 Para 2 " ``` After parsing: ```txt "Para 1 Para 2" ``` - Extra lines between paragraphs are removed, for example: Before parsing: ```txt " Para 1 Para2 " ``` After parsing: ```txt "Para 1 Para 2" ``` - The connector provides filtering logic that removes some characters from the generated embedding, for example, non-breaking spaces (<0xa0>). These characters are removed to drive more accurate embeddings:
CharacterHex CodeDecimal CodeNameDescription

\u0000

0x00

0

Null (NULL)

Marks the end of a string in C-like languages

\u0001

0x01

1

Start of Heading (SOH)

Used to mark the beginning of a heading in data streams

\u0007

0x07

7

Bell (BEL)

Triggers a beep or alert sound

\u0008

0x08

8

Backspace (BS)

Moves the cursor one position backward

\u0009

0x09

9

Horizontal Tab (TAB)

Inserts a tab space

\u000A

0x0A

10

Line Feed (LF)

Moves to a new line (Unix newline)

\u000D

0x0D

13

Carriage Return (CR)

Returns to the beginning of a new line

\u001B

0x1B

27

Escape (ESC)

Used to introduce escape sequences for control

\u001F

0x1F

31

Unit Separator (US)

Separates units of information

## Configure the Generate From Text Operation The **Embedding generate from text** operation takes text and ingests it into the vector database. The output of this operation is a numeric representation of the content. 1. Select the operation on the Anypoint Code Builder or Studio canvas. 2. In the **General** properties tab for the operation, enter these values: - **Text** Text to ingest into the vector database 3. In **Additional Properties**, select: - **Model name** Name of the API model that interacts with the LLM ## See Also - [Using Anypoint Code Builder to Configure a Connector](https://docs.mulesoft.com/connectors/introduction/intro-config-use-acb) - [Using Studio to Configure a Connector](https://docs.mulesoft.com/connectors/introduction/intro-config-use-studio) - [Einstein AI Connector Overview](https://docs.mulesoft.com/einstein-ai-connector/1.0/) - [Einstein AI Connector Reference](https://docs.mulesoft.com/einstein-ai-connector/1.0/einstein-ai-connector-reference) - [Salesforce Help](https://help.salesforce.com) --- product: Einstein AI Connector version: 1.1 --- # Configuring Embedding Operations for Einstein AI Connector 1.1 > For the full documentation index, see: https://docs.mulesoft.com/llms.txt ## Configure the Adhoc File Query Operation The **Embedding Adhoc File Query** operation takes a document and ingests it into the vector database along with its query. The output of this operation is a set of scores with the complete content of the document that’s the most likely answer to the query. The vector database is used to identify the numeric representation of the content before creating the likely score. 1. Select the operation on the Anypoint Code Builder or Studio canvas. 2. In the **General** properties tab for the operation, enter these values: - **Prompt** Plain text for the prompt to send to the LLM - **File path** Full file path for the document to ingest into the embedding store. Ensure the file path is accessible. You can also use a DataWeave expression for this field, for example: ```dataweave mule.home ++ "/apps/" ++ app.name ++ "/customer-service.pdf" ``` 3. In **Additional Properties**, select: - **Model name** Name of the API model that interacts with the LLM. - **File type** - **Text** Any type of text files (JSON, XML, txt, CSV, and so on) - **PDF** System-generated PDF files - **CSV** CSV file with comma-separated values - **URL** A single URL. - **Option type** How to split the document prior to ingestion into the vector database ## Configure the Generate From File Operation The **Embedding generate from file** operation takes a document and ingests it into the vector database. The output of this operation is a numeric representation of the content. 1. Select the operation on the Anypoint Code Builder or Studio canvas. 2. In the **General** properties tab for the operation, enter these values: - **File path** Full file path for the document to ingest into the embedding store. Ensure the file path is accessible. You can also use a DataWeave expression for this field, for example: ```dataweave mule.home ++ "/apps/" ++ app.name ++ "/customer-service.pdf" ``` 3. In **Additional Properties**, select: - **Model name** Name of the API model that interacts with the LLM. - **File type** - **Text** Any type of text files (JSON, XML, txt, CSV, and so on) - **PDF** System-generated PDF files - **CSV** CSV file with comma-separated values - **URL** A single URL. - **Option type** How to split the document prior to ingestion into the vector database ### How Data is Parsed Data from files are parsed in a way that changes the format of the generated embeddings slightly (the content itself isn’t changed): - Spaces are removed from the beginning and end of file content, for example: Before parsing: ```txt " Para 1 Para 2 " ``` After parsing: ```txt "Para 1 Para 2" ``` - Extra lines between paragraphs are removed, for example: Before parsing: ```txt " Para 1 Para2 " ``` After parsing: ```txt "Para 1 Para 2" ``` - The connector provides filtering logic that removes some characters from the generated embedding, for example, non-breaking spaces (<0xa0>). These characters are removed to drive more accurate embeddings:
CharacterHex CodeDecimal CodeNameDescription

\u0000

0x00

0

Null (NULL)

Marks the end of a string in C-like languages

\u0001

0x01

1

Start of Heading (SOH)

Used to mark the beginning of a heading in data streams

\u0007

0x07

7

Bell (BEL)

Triggers a beep or alert sound

\u0008

0x08

8

Backspace (BS)

Moves the cursor one position backward

\u0009

0x09

9

Horizontal Tab (TAB)

Inserts a tab space

\u000A

0x0A

10

Line Feed (LF)

Moves to a new line (Unix newline)

\u000D

0x0D

13

Carriage Return (CR)

Returns to the beginning of a new line

\u001B

0x1B

27

Escape (ESC)

Used to introduce escape sequences for control

\u001F

0x1F

31

Unit Separator (US)

Separates units of information

## Configure the Generate From Text Operation The **Embedding generate from text** operation takes text and ingests it into the vector database. The output of this operation is a numeric representation of the content. 1. Select the operation on the Anypoint Code Builder or Studio canvas. 2. In the **General** properties tab for the operation, enter these values: - **Text** Text to ingest into the vector database 3. In **Additional Properties**, select: - **Model name** Name of the API model that interacts with the LLM ## See Also - [Using Anypoint Code Builder to Configure a Connector](https://docs.mulesoft.com/connectors/introduction/intro-config-use-acb) - [Using Studio to Configure a Connector](https://docs.mulesoft.com/connectors/introduction/intro-config-use-studio) - [Einstein AI Connector Overview](https://docs.mulesoft.com/einstein-ai-connector/1.1/) - [Einstein AI Connector Reference](https://docs.mulesoft.com/einstein-ai-connector/1.1/einstein-ai-connector-reference) - [Salesforce Help](https://help.salesforce.com) --- product: Einstein AI Connector version: 1.2 --- # Configuring Embedding Operations for Einstein AI Connector 1.2 > For the full documentation index, see: https://docs.mulesoft.com/llms.txt ## Configure the Adhoc File Query Operation The **Embedding Adhoc File Query** operation takes a document and ingests it into the vector database along with its query. The output of this operation is a set of scores with the complete content of the document that’s the most likely answer to the query. The vector database is used to identify the numeric representation of the content before creating the likely score. 1. Select the operation on the Anypoint Code Builder or Studio canvas. 2. In the **General** properties tab for the operation, enter these values: - **Prompt** Plain text for the prompt to send to the LLM - **File path** Full file path for the document to ingest into the embedding store. Ensure the file path is accessible. You can also use a DataWeave expression for this field, for example: ```dataweave mule.home ++ "/apps/" ++ app.name ++ "/customer-service.pdf" ``` 3. In **Additional Properties**, select: - **Model name** Name of the API model that interacts with the LLM. - **File type** - **Text** Any type of text files (JSON, XML, txt, CSV, and so on) - **PDF** System-generated PDF files - **CSV** CSV file with comma-separated values - **URL** A single URL. - **Option type** How to split the document prior to ingestion into the vector database ## Configure the Generate From File Operation The **Embedding generate from file** operation takes a document and ingests it into the vector database. The output of this operation is a numeric representation of the content. 1. Select the operation on the Anypoint Code Builder or Studio canvas. 2. In the **General** properties tab for the operation, enter these values: - **File path** Full file path for the document to ingest into the embedding store. Ensure the file path is accessible. You can also use a DataWeave expression for this field, for example: ```dataweave mule.home ++ "/apps/" ++ app.name ++ "/customer-service.pdf" ``` 3. In **Additional Properties**, select: - **Model name** Name of the API model that interacts with the LLM. - **File type** - **Text** Any type of text files (JSON, XML, txt, CSV, and so on) - **PDF** System-generated PDF files - **CSV** CSV file with comma-separated values - **URL** A single URL. - **Option type** How to split the document prior to ingestion into the vector database ### How Data is Parsed Data from files are parsed in a way that changes the format of the generated embeddings slightly (the content itself isn’t changed): - Spaces are removed from the beginning and end of file content, for example: Before parsing: ```txt " Para 1 Para 2 " ``` After parsing: ```txt "Para 1 Para 2" ``` - Extra lines between paragraphs are removed, for example: Before parsing: ```txt " Para 1 Para2 " ``` After parsing: ```txt "Para 1 Para 2" ``` - The connector provides filtering logic that removes some characters from the generated embedding, for example, non-breaking spaces (<0xa0>). These characters are removed to drive more accurate embeddings:
CharacterHex CodeDecimal CodeNameDescription

\u0000

0x00

0

Null (NULL)

Marks the end of a string in C-like languages

\u0001

0x01

1

Start of Heading (SOH)

Used to mark the beginning of a heading in data streams

\u0007

0x07

7

Bell (BEL)

Triggers a beep or alert sound

\u0008

0x08

8

Backspace (BS)

Moves the cursor one position backward

\u0009

0x09

9

Horizontal Tab (TAB)

Inserts a tab space

\u000A

0x0A

10

Line Feed (LF)

Moves to a new line (Unix newline)

\u000D

0x0D

13

Carriage Return (CR)

Returns to the beginning of a new line

\u001B

0x1B

27

Escape (ESC)

Used to introduce escape sequences for control

\u001F

0x1F

31

Unit Separator (US)

Separates units of information

## Configure the Generate From Text Operation The **Embedding generate from text** operation takes text and ingests it into the vector database. The output of this operation is a numeric representation of the content. 1. Select the operation on the Anypoint Code Builder or Studio canvas. 2. In the **General** properties tab for the operation, enter these values: - **Text** Text to ingest into the vector database 3. In **Additional Properties**, select: - **Model name** Name of the API model that interacts with the LLM ## See Also - [Using Anypoint Code Builder to Configure a Connector](https://docs.mulesoft.com/connectors/introduction/intro-config-use-acb) - [Using Studio to Configure a Connector](https://docs.mulesoft.com/connectors/introduction/intro-config-use-studio) - [Einstein AI Connector Overview](https://docs.mulesoft.com/einstein-ai-connector/1.2/) - [Einstein AI Connector Reference](https://docs.mulesoft.com/einstein-ai-connector/1.2/einstein-ai-connector-reference) - [Salesforce Help](https://help.salesforce.com) --- product: Einstein AI Connector version: 2.0 is-latest-version: true --- # Configuring Embedding Operations for Einstein AI Connector 2.0 > For the full documentation index, see: https://docs.mulesoft.com/llms.txt ## Configure the Adhoc File Query Operation The **Embedding Adhoc File Query** operation takes a document and ingests it into the vector database along with its query. The output of this operation is a set of scores with the complete content of the document that’s the most likely answer to the query. The vector database is used to identify the numeric representation of the content before creating the likely score. 1. Select the operation on the Anypoint Code Builder or Studio canvas. 2. In the **General** properties tab for the operation, enter these values: - **Prompt** Plain text prompt to send to the LLM. This field is required. - **Input Stream** Document content to ingest into the embedding store. 3. In **Additional properties**, select: - **Model API Name** Name of the API model that interacts with the LLM. - **File Type** Type of document to ingest. Values are **PDF**, **TEXT**, and **CSV**. - **Option Type** How to split the document before embedding. Values are **FULL** and **PARAGRAPH**. ## Configure the Generate From File Operation The **Embedding generate from file** operation takes a document and ingests it into the vector database. The output of this operation is a numeric representation of the content. 1. Select the operation on the Anypoint Code Builder or Studio canvas. 2. In the **General** properties tab for the operation, enter these values: - **Input Stream** Document content to ingest into the vector database. This field defaults to `#[payload]`. 3. In **Additional properties**, select: - **Model API Name** Name of the API model that interacts with the LLM. - **File Type** Type of document to ingest. Values are **PDF**, **TEXT**, and **CSV**. - **Option Type** How to split the document before embedding. Values are **FULL** and **PARAGRAPH**. ### How Data is Parsed Data from files are parsed in a way that changes the format of the generated embeddings slightly (the content itself isn’t changed): - Spaces are removed from the beginning and end of file content, for example: Before parsing: ```txt " Para 1 Para 2 " ``` After parsing: ```txt "Para 1 Para 2" ``` - Extra lines between paragraphs are removed, for example: Before parsing: ```txt " Para 1 Para2 " ``` After parsing: ```txt "Para 1 Para 2" ``` - The connector provides filtering logic that removes some characters from the generated embedding, for example, non-breaking spaces (<0xa0>). These characters are removed to drive more accurate embeddings:
CharacterHex CodeDecimal CodeNameDescription

\u0000

0x00

0

Null (NULL)

Marks the end of a string in C-like languages

\u0001

0x01

1

Start of Heading (SOH)

Used to mark the beginning of a heading in data streams

\u0007

0x07

7

Bell (BEL)

Triggers a beep or alert sound

\u0008

0x08

8

Backspace (BS)

Moves the cursor one position backward

\u0009

0x09

9

Horizontal Tab (TAB)

Inserts a tab space

\u000A

0x0A

10

Line Feed (LF)

Moves to a new line (Unix newline)

\u000D

0x0D

13

Carriage Return (CR)

Returns to the beginning of a new line

\u001B

0x1B

27

Escape (ESC)

Used to introduce escape sequences for control

\u001F

0x1F

31

Unit Separator (US)

Separates units of information

## Configure the Generate From Text Operation The **Embedding generate from text** operation takes text and ingests it into the vector database. The output of this operation is a numeric representation of the content. 1. Select the operation on the Anypoint Code Builder or Studio canvas. 2. In the **General** properties tab for the operation, enter these values: - **Text** Text to ingest into the vector database 3. In **Additional Properties**, select: - **Model API Name** Name of the API model that interacts with the LLM. ## See Also - [Using Anypoint Code Builder to Configure a Connector](https://docs.mulesoft.com/connectors/introduction/intro-config-use-acb) - [Using Studio to Configure a Connector](https://docs.mulesoft.com/connectors/introduction/intro-config-use-studio) - [Einstein AI Connector Overview](https://docs.mulesoft.com/einstein-ai-connector/latest/) - [Einstein AI Connector Reference](https://docs.mulesoft.com/einstein-ai-connector/latest/einstein-ai-connector-reference) - [Salesforce Help](https://help.salesforce.com) --- product: Einstein AI Connector version: 1.0 --- # Configuring RAG Operations for Einstein AI Connector 1.0 > For the full documentation index, see: https://docs.mulesoft.com/llms.txt Retrieval-Augmented Generation (RAG) is a technique for enhancing AI-generated outputs by retrieving relevant content, and using it to augment AI prompts with additional context. By grounding LLMs with this additional information, they can provide more accurate and reliable responses. ## Configure the RAG Adhoc Load Document Operation The **RAG adhoc load document** operation retrieves information based on a plain text prompt from an in-memory embedding store. To configure the **RAG adhoc load document** operation: 1. Select the operation on the Anypoint Code Builder or Studio canvas. 2. In the **General** properties tab for the operation, enter these values: - **Prompt** The prompt to send to the LLM and the embedding store to respond to. - **File Path** Contains the full file path for the document to ingest into the embedding store. Ensure the file path is accessible. You can also use a DataWeave expression for this field, for example: `mule.home "/apps/" app.name ++ "/customer-service.pdf"` 3. In **Additional properties**, select the values for: - **Embedding name** - **File type** Type of document to ingest into the embedding store: - **Text** - **PDF** - **CSV** - URL A single URL pointing to web content to ingest. - **Option type** How to split the document prior to ingestion into the vector database - **Model name** Name of the API model that interacts with the LLM. - **Probability** Probability of the model API staying accurate - **Locale** Localization information, which can include the default locale, input locale(s), and expected output locales This is the XML configuration for this operation: ```xml ``` ## See Also - [Using Anypoint Code Builder to Configure a Connector](https://docs.mulesoft.com/connectors/introduction/intro-config-use-acb) - [Using Studio to Configure a Connector](https://docs.mulesoft.com/connectors/introduction/intro-config-use-studio) - [Einstein AI Connector Overview](https://docs.mulesoft.com/einstein-ai-connector/1.0/) - [Einstein AI Connector Reference](https://docs.mulesoft.com/einstein-ai-connector/1.0/einstein-ai-connector-reference) - [Salesforce Help](https://help.salesforce.com) --- product: Einstein AI Connector version: 1.1 --- # Configuring RAG Operations for Einstein AI Connector 1.1 > For the full documentation index, see: https://docs.mulesoft.com/llms.txt Retrieval-Augmented Generation (RAG) is a technique for enhancing AI-generated outputs by retrieving relevant content, and using it to augment AI prompts with additional context. By grounding LLMs with this additional information, they can provide more accurate and reliable responses. ## Configure the RAG Adhoc Load Document Operation The **RAG adhoc load document** operation retrieves information based on a plain text prompt from an in-memory embedding store. To configure the **RAG adhoc load document** operation: 1. Select the operation on the Anypoint Code Builder or Studio canvas. 2. In the **General** properties tab for the operation, enter these values: - **Prompt** The prompt to send to the LLM and the embedding store to respond to. - **File Path** Contains the full file path for the document to ingest into the embedding store. Ensure the file path is accessible. You can also use a DataWeave expression for this field, for example: `mule.home "/apps/" app.name ++ "/customer-service.pdf"` 3. In **Additional properties**, select the values for: - **Embedding name** - **File type** Type of document to ingest into the embedding store: - **Text** - **PDF** - **CSV** - URL A single URL pointing to web content to ingest. - **Option type** How to split the document prior to ingestion into the vector database - **Model name** Name of the API model that interacts with the LLM. - **Probability** Probability of the model API staying accurate - **Locale** Localization information, which can include the default locale, input locale(s), and expected output locales This is the XML configuration for this operation: ```xml ``` ## See Also - [Using Anypoint Code Builder to Configure a Connector](https://docs.mulesoft.com/connectors/introduction/intro-config-use-acb) - [Using Studio to Configure a Connector](https://docs.mulesoft.com/connectors/introduction/intro-config-use-studio) - [Einstein AI Connector Overview](https://docs.mulesoft.com/einstein-ai-connector/1.1/) - [Einstein AI Connector Reference](https://docs.mulesoft.com/einstein-ai-connector/1.1/einstein-ai-connector-reference) - [Salesforce Help](https://help.salesforce.com) --- product: Einstein AI Connector version: 1.2 --- # Configuring RAG Operations for Einstein AI Connector 1.2 > For the full documentation index, see: https://docs.mulesoft.com/llms.txt Retrieval-Augmented Generation (RAG) is a technique for enhancing AI-generated outputs by retrieving relevant content, and using it to augment AI prompts with additional context. By grounding LLMs with this additional information, they can provide more accurate and reliable responses. ## Configure the RAG Adhoc Load Document Operation The **RAG adhoc load document** operation retrieves information based on a plain text prompt from an in-memory embedding store. To configure the **RAG adhoc load document** operation: 1. Select the operation on the Anypoint Code Builder or Studio canvas. 2. In the **General** properties tab for the operation, enter these values: - **Prompt** The prompt to send to the LLM and the embedding store to respond to. - **File Path** Contains the full file path for the document to ingest into the embedding store. Ensure the file path is accessible. You can also use a DataWeave expression for this field, for example: `mule.home "/apps/" app.name ++ "/customer-service.pdf"` 3. In **Additional properties**, select the values for: - **Embedding name** - **File type** Type of document to ingest into the embedding store: - **Text** - **PDF** - **CSV** - URL A single URL pointing to web content to ingest. - **Option type** How to split the document prior to ingestion into the vector database - **Model name** Name of the API model that interacts with the LLM. - **Probability** Probability of the model API staying accurate - **Locale** Localization information, which can include the default locale, input locale(s), and expected output locales This is the XML configuration for this operation: ```xml ``` ## See Also - [Using Anypoint Code Builder to Configure a Connector](https://docs.mulesoft.com/connectors/introduction/intro-config-use-acb) - [Using Studio to Configure a Connector](https://docs.mulesoft.com/connectors/introduction/intro-config-use-studio) - [Einstein AI Connector Overview](https://docs.mulesoft.com/einstein-ai-connector/1.2/) - [Einstein AI Connector Reference](https://docs.mulesoft.com/einstein-ai-connector/1.2/einstein-ai-connector-reference) - [Salesforce Help](https://help.salesforce.com) --- product: Einstein AI Connector version: 2.0 is-latest-version: true --- # Configuring RAG Operations for Einstein AI Connector 2.0 > For the full documentation index, see: https://docs.mulesoft.com/llms.txt Retrieval-Augmented Generation (RAG) is a technique for enhancing AI-generated outputs by retrieving relevant content, and using it to augment AI prompts with additional context. By grounding LLMs with this additional information, they can provide more accurate and reliable responses. ## Configure the RAG Adhoc Load Document Operation The **RAG adhoc load document** operation retrieves information based on a plain text prompt from an in-memory embedding store. To configure the **RAG adhoc load document** operation: 1. Select the operation on the Anypoint Code Builder or Studio canvas. 2. In the **General** properties tab for the operation, enter these values: - **Prompt** The prompt to send to the LLM and the embedding store to respond to. This field is required. - **Input Stream** Document content to ingest into the embedding store. 3. In **Additional properties**, select the values for: - **Embedding Name** - **File Type** Type of document to ingest. Values are **PDF**, **TEXT**, and **CSV**. - **Option Type** How to split the document before embedding. Values are **FULL** and **PARAGRAPH**. - **Model API Name** Name of the API model that interacts with the LLM. - **Probability** Probability of the model API staying accurate - **Locale** Localization information, which can include the default locale, input locale(s), and expected output locales This is the XML configuration for this operation: ```xml #[payload.prompt] #[payload] ``` ## See Also - [Using Anypoint Code Builder to Configure a Connector](https://docs.mulesoft.com/connectors/introduction/intro-config-use-acb) - [Using Studio to Configure a Connector](https://docs.mulesoft.com/connectors/introduction/intro-config-use-studio) - [Einstein AI Connector Overview](https://docs.mulesoft.com/einstein-ai-connector/latest/) - [Einstein AI Connector Reference](https://docs.mulesoft.com/einstein-ai-connector/latest/einstein-ai-connector-reference) - [Salesforce Help](https://help.salesforce.com) --- product: Einstein AI Connector version: 1.0 --- # Configuring Tools Operations for Einstein AI Connector 1.0 > For the full documentation index, see: https://docs.mulesoft.com/llms.txt Use the **Tools use AI service** operation to create autonomous agents that can use external tools whenever a prompt can’t be answered directly by the AI model. ## Before You Begin To use Tools operations, you must create a `tools.config.json` file that includes all the necessary API information for the operation to execute APIs successfully, for example: ```json [ { "action": "Execute POST requests for API endpoints.", "url": "http://check-inventory-material.cloudhub.io/mmbe", "name": "Check Inventory", "method": "POST", "headers": "Basic XXX", "example-payload": "{\n \"materialNo\": \"paramValue\"}", "query": [ "Check inventory in SAP", "Check Stock Overview", "Show product availability for MULETEST0", "Check the inventory for MULETEST0", "Check Stock for 400-110" ], "description": "Check inventory details for material in SAP by providing the materialNo as input for paramValue. Please use the materialNo and not materialNumber. This action applies whenever users' intent is 'Stock overview', 'product availability', 'Inventory', 'available stock'. Use the headers to perform the request." }, { "action": "Execute GET requests for API endpoints.", "url": "https://anypoint.mulesoft.com/mocking/api/v1/sources/exchange/assets/612eb739-4266-4f4c-bf2f-29953c153d80/accounts-api/1.0.1/m/accounts", "name": "Show Accounts", "method": "GET", "headers": "", "example-payload": "{}", "query": ["Get all accounts", "Show all accounts from CRM"], "description": "Get all accounts from a CRM. This action applies whenever users' intent is 'CRM accounts', 'customers', 'customer accounts', 'accounts'." }, { "action": "Execute GET requests for API endpoints.", "url": "https://anypoint.mulesoft.com/mocking/api/v1/sources/exchange/assets/7b99cead-a984-497b-9e6c-c16a3b4dcb76/employee-api/1.0.1/m/employees", "name": "Show Employees", "method": "GET", "headers": "", "example-payload": "{}", "query": [ "Get all employee information", "Show employees for the country Switzerland", "How many employees do we have", "Show a list of all employees" ], "description": "Get all information about employees. This action applies whenever users' intent is 'employees', 'workforce'." } ] ``` Each object in the tools array represents a tool that the autonomous agent can use, so it is important to describe each field as accurately as possible. - `action` This field supports the following options: - `Execute GET` requests for API endpoints. - `Execute POST` requests for API endpoints. - `url` The complete URL to the endpoint, including the resource path. - `name` The name of the action in natural language. - `method` The HTTP method for the endpoint. Only POST and GET are supported. - `headers` The HTTP headers required for authorization to the endpoint. Only Basic Auth is supported. - `example-payload` The example payload in JSON format. - `query` Example queries a user might use to invoke this action. - `description` A detailed description of how to use the tool. The description should be comprehensive enough for the LLM to understand its purpose and usage. Ensure that the file path to the `tools.config.json` is accessible to the application at runtime. ## Configure the Tools Use AI Service Operation To configure the **Tools use AI service** operation: 1. Select the operation on the Anypoint Code Builder or Studio canvas. 2. In the **General** properties tab for the operation, enter these values: - **Prompt** The prompt to send to the LLM. - **Input Stream** ### Output Configuration This operation responds with a JSON payload that contains the main LLM response. Additionally, attributes such as token usage and tool usage (boolean value) are included as part of the attributes, but not within the main payload. This is an example response of the JSON payload if the prompt is "What is the capital of Switzerland?": ```json { "response": "The capital of Switzerland is Bern." } ``` If the prompt requires accessing external data through a tool, for example, "Show me the latest account created in Salesforce", the AI model uses the configured tool to fetch the information, resulting in: ```json { "response": "The latest account created in Salesforce is:\n\n- **Name:** MuleTalks\n- **Id:** 0010600002JKf42AAD\n- **Created Date:** 2024-07-10T20:21:36.000Z\n\nIf you have any further questions or need additional assistance, feel free to ask!" } ``` Along with the JSON payload, the operation returns attributes, which include information about token and tool usage, for example: ```json { "tokenUsage": { (1) "outputCount": 9, "totalCount": 18, "inputCount": 9 }, "additionalAttributes": { (2) "toolsUsed": "true" } } ```
1tokenUsage: Provides information on the token usage for the operation:
  • outputCount

    Number of tokens generated in the response

  • totalCount

    Total number of tokens processed for the entire operation, including input and output

  • inputCount

    Number of tokens processed from the input query or document

2additionalAttributes includes the boolean value for toolsUsed:
  • true

    External tools, such as APIs or integrations, were used to gather or generate the response.

  • false

    No external tools were used, and the response was based on internal knowledge only.

## See Also - [Using Anypoint Code Builder to Configure a Connector](https://docs.mulesoft.com/connectors/introduction/intro-config-use-acb) - [Using Studio to Configure a Connector](https://docs.mulesoft.com/connectors/introduction/intro-config-use-studio) - [Einstein AI Connector Overview](https://docs.mulesoft.com/einstein-ai-connector/1.0/) - [Einstein AI Connector Reference](https://docs.mulesoft.com/einstein-ai-connector/1.0/einstein-ai-connector-reference) - [Salesforce Help](https://help.salesforce.com) --- product: Einstein AI Connector version: 1.1 --- # Configuring Tools Operations for Einstein AI Connector 1.1 > For the full documentation index, see: https://docs.mulesoft.com/llms.txt Use the **Tools use AI service** operation to create autonomous agents that can use external tools whenever a prompt can’t be answered directly by the AI model. ## Before You Begin To use Tools operations, you must create a `tools.config.json` file that includes all the necessary API information for the operation to execute APIs successfully, for example: ```json [ { "action": "Execute POST requests for API endpoints.", "url": "http://check-inventory-material.cloudhub.io/mmbe", "name": "Check Inventory", "method": "POST", "headers": "Basic XXX", "example-payload": "{\n \"materialNo\": \"paramValue\"}", "query": [ "Check inventory in SAP", "Check Stock Overview", "Show product availability for MULETEST0", "Check the inventory for MULETEST0", "Check Stock for 400-110" ], "description": "Check inventory details for material in SAP by providing the materialNo as input for paramValue. Please use the materialNo and not materialNumber. This action applies whenever users' intent is 'Stock overview', 'product availability', 'Inventory', 'available stock'. Use the headers to perform the request." }, { "action": "Execute GET requests for API endpoints.", "url": "https://anypoint.mulesoft.com/mocking/api/v1/sources/exchange/assets/612eb739-4266-4f4c-bf2f-29953c153d80/accounts-api/1.0.1/m/accounts", "name": "Show Accounts", "method": "GET", "headers": "", "example-payload": "{}", "query": ["Get all accounts", "Show all accounts from CRM"], "description": "Get all accounts from a CRM. This action applies whenever users' intent is 'CRM accounts', 'customers', 'customer accounts', 'accounts'." }, { "action": "Execute GET requests for API endpoints.", "url": "https://anypoint.mulesoft.com/mocking/api/v1/sources/exchange/assets/7b99cead-a984-497b-9e6c-c16a3b4dcb76/employee-api/1.0.1/m/employees", "name": "Show Employees", "method": "GET", "headers": "", "example-payload": "{}", "query": [ "Get all employee information", "Show employees for the country Switzerland", "How many employees do we have", "Show a list of all employees" ], "description": "Get all information about employees. This action applies whenever users' intent is 'employees', 'workforce'." } ] ``` Each object in the tools array represents a tool that the autonomous agent can use, so it is important to describe each field as accurately as possible. - `action` This field supports the following options: - `Execute GET` requests for API endpoints. - `Execute POST` requests for API endpoints. - `url` The complete URL to the endpoint, including the resource path. - `name` The name of the action in natural language. - `method` The HTTP method for the endpoint. Only POST and GET are supported. - `headers` The HTTP headers required for authorization to the endpoint. Only Basic Auth is supported. - `example-payload` The example payload in JSON format. - `query` Example queries a user might use to invoke this action. - `description` A detailed description of how to use the tool. The description should be comprehensive enough for the LLM to understand its purpose and usage. Ensure that the file path to the `tools.config.json` is accessible to the application at runtime. ## Configure the Tools Use AI Service Operation To configure the **Tools use AI service** operation: 1. Select the operation on the Anypoint Code Builder or Studio canvas. 2. In the **General** properties tab for the operation, enter these values: - **Prompt** The prompt to send to the LLM. - **Input Stream** ### Output Configuration This operation responds with a JSON payload that contains the main LLM response. Additionally, attributes such as token usage and tool usage (boolean value) are included as part of the attributes, but not within the main payload. This is an example response of the JSON payload if the prompt is "What is the capital of Switzerland?": ```json { "response": "The capital of Switzerland is Bern." } ``` If the prompt requires accessing external data through a tool, for example, "Show me the latest account created in Salesforce", the AI model uses the configured tool to fetch the information, resulting in: ```json { "response": "The latest account created in Salesforce is:\n\n- **Name:** MuleTalks\n- **Id:** 0010600002JKf42AAD\n- **Created Date:** 2024-07-10T20:21:36.000Z\n\nIf you have any further questions or need additional assistance, feel free to ask!" } ``` Along with the JSON payload, the operation returns attributes, which include information about token and tool usage, for example: ```json { "tokenUsage": { (1) "outputCount": 9, "totalCount": 18, "inputCount": 9 }, "additionalAttributes": { (2) "toolsUsed": "true" } } ```
1tokenUsage: Provides information on the token usage for the operation:
  • outputCount

    Number of tokens generated in the response

  • totalCount

    Total number of tokens processed for the entire operation, including input and output

  • inputCount

    Number of tokens processed from the input query or document

2additionalAttributes includes the boolean value for toolsUsed:
  • true

    External tools, such as APIs or integrations, were used to gather or generate the response.

  • false

    No external tools were used, and the response was based on internal knowledge only.

## See Also - [Using Anypoint Code Builder to Configure a Connector](https://docs.mulesoft.com/connectors/introduction/intro-config-use-acb) - [Using Studio to Configure a Connector](https://docs.mulesoft.com/connectors/introduction/intro-config-use-studio) - [Einstein AI Connector Overview](https://docs.mulesoft.com/einstein-ai-connector/1.1/) - [Einstein AI Connector Reference](https://docs.mulesoft.com/einstein-ai-connector/1.1/einstein-ai-connector-reference) - [Salesforce Help](https://help.salesforce.com) --- product: Einstein AI Connector version: 1.2 --- # Configuring Tools Operations for Einstein AI Connector 1.2 > For the full documentation index, see: https://docs.mulesoft.com/llms.txt Use the **Tools use AI service** operation to create autonomous agents that can use external tools whenever a prompt can’t be answered directly by the AI model. ## Before You Begin To use Tools operations, you must create a `tools.config.json` file that includes all the necessary API information for the operation to execute APIs successfully, for example: ```json [ { "action": "Execute POST requests for API endpoints.", "url": "http://check-inventory-material.cloudhub.io/mmbe", "name": "Check Inventory", "method": "POST", "headers": "Basic XXX", "example-payload": "{\n \"materialNo\": \"paramValue\"}", "query": [ "Check inventory in SAP", "Check Stock Overview", "Show product availability for MULETEST0", "Check the inventory for MULETEST0", "Check Stock for 400-110" ], "description": "Check inventory details for material in SAP by providing the materialNo as input for paramValue. Please use the materialNo and not materialNumber. This action applies whenever users' intent is 'Stock overview', 'product availability', 'Inventory', 'available stock'. Use the headers to perform the request." }, { "action": "Execute GET requests for API endpoints.", "url": "https://anypoint.mulesoft.com/mocking/api/v1/sources/exchange/assets/612eb739-4266-4f4c-bf2f-29953c153d80/accounts-api/1.0.1/m/accounts", "name": "Show Accounts", "method": "GET", "headers": "", "example-payload": "{}", "query": ["Get all accounts", "Show all accounts from CRM"], "description": "Get all accounts from a CRM. This action applies whenever users' intent is 'CRM accounts', 'customers', 'customer accounts', 'accounts'." }, { "action": "Execute GET requests for API endpoints.", "url": "https://anypoint.mulesoft.com/mocking/api/v1/sources/exchange/assets/7b99cead-a984-497b-9e6c-c16a3b4dcb76/employee-api/1.0.1/m/employees", "name": "Show Employees", "method": "GET", "headers": "", "example-payload": "{}", "query": [ "Get all employee information", "Show employees for the country Switzerland", "How many employees do we have", "Show a list of all employees" ], "description": "Get all information about employees. This action applies whenever users' intent is 'employees', 'workforce'." } ] ``` Each object in the tools array represents a tool that the autonomous agent can use, so it is important to describe each field as accurately as possible. - `action` This field supports the following options: - `Execute GET` requests for API endpoints. - `Execute POST` requests for API endpoints. - `url` The complete URL to the endpoint, including the resource path. - `name` The name of the action in natural language. - `method` The HTTP method for the endpoint. Only POST and GET are supported. - `headers` The HTTP headers required for authorization to the endpoint. Only Basic Auth is supported. - `example-payload` The example payload in JSON format. - `query` Example queries a user might use to invoke this action. - `description` A detailed description of how to use the tool. The description should be comprehensive enough for the LLM to understand its purpose and usage. Ensure that the file path to the `tools.config.json` is accessible to the application at runtime. ## Configure the Tools Use AI Service Operation To configure the **Tools use AI service** operation: 1. Select the operation on the Anypoint Code Builder or Studio canvas. 2. In the **General** properties tab for the operation, enter these values: - **Prompt** The prompt to send to the LLM. - **Input Stream** ### Output Configuration This operation responds with a JSON payload that contains the main LLM response. Additionally, attributes such as token usage and tool usage (boolean value) are included as part of the attributes, but not within the main payload. This is an example response of the JSON payload if the prompt is "What is the capital of Switzerland?": ```json { "response": "The capital of Switzerland is Bern." } ``` If the prompt requires accessing external data through a tool, for example, "Show me the latest account created in Salesforce", the AI model uses the configured tool to fetch the information, resulting in: ```json { "response": "The latest account created in Salesforce is:\n\n- **Name:** MuleTalks\n- **Id:** 0010600002JKf42AAD\n- **Created Date:** 2024-07-10T20:21:36.000Z\n\nIf you have any further questions or need additional assistance, feel free to ask!" } ``` Along with the JSON payload, the operation returns attributes, which include information about token and tool usage, for example: ```json { "tokenUsage": { (1) "outputCount": 9, "totalCount": 18, "inputCount": 9 }, "additionalAttributes": { (2) "toolsUsed": "true" } } ```
1tokenUsage: Provides information on the token usage for the operation:
  • outputCount

    Number of tokens generated in the response

  • totalCount

    Total number of tokens processed for the entire operation, including input and output

  • inputCount

    Number of tokens processed from the input query or document

2additionalAttributes includes the boolean value for toolsUsed:
  • true

    External tools, such as APIs or integrations, were used to gather or generate the response.

  • false

    No external tools were used, and the response was based on internal knowledge only.

## See Also - [Using Anypoint Code Builder to Configure a Connector](https://docs.mulesoft.com/connectors/introduction/intro-config-use-acb) - [Using Studio to Configure a Connector](https://docs.mulesoft.com/connectors/introduction/intro-config-use-studio) - [Einstein AI Connector Overview](https://docs.mulesoft.com/einstein-ai-connector/1.2/) - [Einstein AI Connector Reference](https://docs.mulesoft.com/einstein-ai-connector/1.2/einstein-ai-connector-reference) - [Salesforce Help](https://help.salesforce.com) --- product: Einstein AI Connector version: 2.0 is-latest-version: true --- # Configuring Tools Operations for Einstein AI Connector 2.0 > For the full documentation index, see: https://docs.mulesoft.com/llms.txt Use the **Tools use AI service** operation to create autonomous agents that can use external tools whenever a prompt can’t be answered directly by the AI model. ## Before You Begin To use Tools operations, you must create a `tools.config.json` file that includes all the necessary API information for the operation to execute APIs successfully, for example: ```json [ { "action": "Execute POST requests for API endpoints.", "url": "http://check-inventory-material.cloudhub.io/mmbe", "name": "Check Inventory", "method": "POST", "headers": "Basic XXX", "example-payload": "{\n \"materialNo\": \"paramValue\"}", "query": [ "Check inventory in SAP", "Check Stock Overview", "Show product availability for MULETEST0", "Check the inventory for MULETEST0", "Check Stock for 400-110" ], "description": "Check inventory details for material in SAP by providing the materialNo as input for paramValue. Please use the materialNo and not materialNumber. This action applies whenever users' intent is 'Stock overview', 'product availability', 'Inventory', 'available stock'. Use the headers to perform the request." }, { "action": "Execute GET requests for API endpoints.", "url": "https://anypoint.mulesoft.com/mocking/api/v1/sources/exchange/assets/612eb739-4266-4f4c-bf2f-29953c153d80/accounts-api/1.0.1/m/accounts", "name": "Show Accounts", "method": "GET", "headers": "", "example-payload": "{}", "query": ["Get all accounts", "Show all accounts from CRM"], "description": "Get all accounts from a CRM. This action applies whenever users' intent is 'CRM accounts', 'customers', 'customer accounts', 'accounts'." }, { "action": "Execute GET requests for API endpoints.", "url": "https://anypoint.mulesoft.com/mocking/api/v1/sources/exchange/assets/7b99cead-a984-497b-9e6c-c16a3b4dcb76/employee-api/1.0.1/m/employees", "name": "Show Employees", "method": "GET", "headers": "", "example-payload": "{}", "query": [ "Get all employee information", "Show employees for the country Switzerland", "How many employees do we have", "Show a list of all employees" ], "description": "Get all information about employees. This action applies whenever users' intent is 'employees', 'workforce'." } ] ``` Each object in the tools array represents a tool that the autonomous agent can use, so it is important to describe each field as accurately as possible. - `action` This field supports the following options: - `Execute GET` requests for API endpoints. - `Execute POST` requests for API endpoints. - `url` The complete URL to the endpoint, including the resource path. - `name` The name of the action in natural language. - `method` The HTTP method for the endpoint. Only POST and GET are supported. - `headers` The HTTP headers required for authorization to the endpoint. Only Basic Auth is supported. - `example-payload` The example payload in JSON format. - `query` Example queries a user might use to invoke this action. - `description` A detailed description of how to use the tool. The description should be comprehensive enough for the LLM to understand its purpose and usage. Ensure that the file path to the `tools.config.json` is accessible to the application at runtime. ## Configure the Tools Use AI Service Operation To configure the **Tools use AI service** operation: 1. Select the operation on the Anypoint Code Builder or Studio canvas. 2. In the **General** properties tab for the operation, enter these values: - **Prompt** The prompt to send to the LLM. - **Input Stream** ### Output Configuration This operation responds with a JSON payload that contains the main LLM response. Additionally, attributes such as token usage and tool usage (boolean value) are included as part of the attributes, but not within the main payload. This is an example response of the JSON payload if the prompt is "What is the capital of Switzerland?": ```json { "response": "The capital of Switzerland is Bern." } ``` If the prompt requires accessing external data through a tool, for example, "Show me the latest account created in Salesforce", the AI model uses the configured tool to fetch the information, resulting in: ```json { "response": "The latest account created in Salesforce is:\n\n- **Name:** MuleTalks\n- **Id:** 0010600002JKf42AAD\n- **Created Date:** 2024-07-10T20:21:36.000Z\n\nIf you have any further questions or need additional assistance, feel free to ask!" } ``` Along with the JSON payload, the operation returns attributes, which include information about token and tool usage, for example: ```json { "tokenUsage": { (1) "outputCount": 9, "totalCount": 18, "inputCount": 9 }, "additionalAttributes": { (2) "toolsUsed": "true" } } ```
1tokenUsage: Provides information on the token usage for the operation:
  • outputCount

    Number of tokens generated in the response

  • totalCount

    Total number of tokens processed for the entire operation, including input and output

  • inputCount

    Number of tokens processed from the input query or document

2additionalAttributes includes the boolean value for toolsUsed:
  • true

    External tools, such as APIs or integrations, were used to gather or generate the response.

  • false

    No external tools were used, and the response was based on internal knowledge only.

## See Also - [Using Anypoint Code Builder to Configure a Connector](https://docs.mulesoft.com/connectors/introduction/intro-config-use-acb) - [Using Studio to Configure a Connector](https://docs.mulesoft.com/connectors/introduction/intro-config-use-studio) - [Einstein AI Connector Overview](https://docs.mulesoft.com/einstein-ai-connector/latest/) - [Einstein AI Connector Reference](https://docs.mulesoft.com/einstein-ai-connector/latest/einstein-ai-connector-reference) - [Salesforce Help](https://help.salesforce.com) --- product: Einstein AI Connector version: 1.0 --- # Einstein AI Connector 1.0 > For the full documentation index, see: https://docs.mulesoft.com/llms.txt Anypoint Connector for Einstein AI (Einstein AI Connector) provides connectivity to LLMs via the Salesforce Einstein Trust Layer. Einstein AI Connector offers a range of advanced features that simplify and enhance AI integration in MuleSoft applications. Use this connector to: - Build AI Agents in a low-code environment - Leverage existing investments (APIs, integrations, and templates) as tooling for the AI agents - Manage all Large Language Model (LLM) interactions through the Salesforce Einstein Trust Layer - Generate vector embeddings to power RAG-based architectures For information about compatibility and fixed issues, see the Einstein AI Connector release notes. ## Before You Begin To use this connector, you must be familiar with: - Anypoint Connectors - Mule runtime engine (Mule) - Elements and global elements in a Mule flow - How to create a Mule app using Anypoint Code Builder or Anypoint Studio Before creating an app, you must have: - Java 8 or 17 - Apache Maven - Connected App credentials to connect with your Salesforce org - Anypoint Platform - The latest versions of Anypoint Code Builder or Anypoint Studio To configure the connector, you must create a Connected App in Salesforce. For more information, see [Models API Developer Guide](https://developer.salesforce.com/docs/ai/agentforce/guide/models-api.html). ## Common Use Cases for the Connector These are some common use cases for Einstein AI Connector: - Enhance customer service by providing case summaries, case classifications, large dataset summaries, and more. - Assist sales teams in writing sales emails, summarizing cases for specific accounts, assessing the probability of closing deals, and more. - Support marketing teams in generating product descriptions, creating newsletters, planning social media campaigns, and more. - Generate embeddings of text data to support sentiment analysis and natural language understanding applications. ## Next Step After you complete the prerequisites, you are ready to create an app and configure the connector using [Anypoint Studio](https://docs.mulesoft.com/einstein-ai-connector/1.0/einstein-ai-connector-studio) or [Anypoint Code Builder](https://docs.mulesoft.com/einstein-ai-connector/1.0/einstein-ai-connector-config-acb). ## See Also - [Introduction to Anypoint Connectors](https://docs.mulesoft.com/connectors/introduction/introduction-to-anypoint-connectors) - [Using Anypoint Code Builder to Configure a Connector](https://docs.mulesoft.com/connectors/introduction/intro-config-use-acb) - [Using Studio to Configure a Connector](https://docs.mulesoft.com/connectors/introduction/intro-config-use-studio) - [Einstein AI Connector Reference](https://docs.mulesoft.com/einstein-ai-connector/1.0/einstein-ai-connector-reference) - [Einstein AI Connector - Additional Configuration Information](https://docs.mulesoft.com/einstein-ai-connector/1.0/einstein-ai-additional-config) - [Salesforce Help](https://help.salesforce.com) --- product: Einstein AI Connector version: 1.0 --- # Einstein AI Connector 1.0 - Additional Configuration Information > For the full documentation index, see: https://docs.mulesoft.com/llms.txt Einstein AI Connector supports these operations, which are categorized into: - [Agent](https://docs.mulesoft.com/einstein-ai-connector/1.0/configuring-agent-operations) - [Chat](https://docs.mulesoft.com/einstein-ai-connector/1.0/configuring-chat-operations) - [Embeddings](https://docs.mulesoft.com/einstein-ai-connector/1.0/configuring-embeddings-operations) - [RAG](https://docs.mulesoft.com/einstein-ai-connector/1.0/configuring-rag-operations) - [Tools](https://docs.mulesoft.com/einstein-ai-connector/1.0/configuring-tools-operations) --- product: Einstein AI Connector version: 1.0 --- # Einstein AI Connector 1.0 Reference > For the full documentation index, see: https://docs.mulesoft.com/llms.txt Einstein AI Connector provides access to the Salesforce Einstein Trust Layer through the Models APIs. ## Configurations --- ### Config Default configuration #### Parameters
NameTypeDescriptionDefault ValueRequired

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
NameTypeDescriptionDefault ValueRequired

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.

## Operations - [AGENT Define Prompt Template](#AgentDefinePromptTemplate) - [CHAT Answer Prompt](#ChatAnswerPrompt) - [CHAT Answer Prompt With Memory](#ChatAnswerPromptWithMemory) - [CHAT Generate From Messages](#ChatGenerateFromMessages) - [EMBEDDING Adhoc File Query](#EmbeddingAdhocFileQuery) - [EMBEDDING Generate From File](#EmbeddingGenerateFromFile) - [EMBEDDING Generate From Text](#EmbeddingGenerateFromText) - [RAG Adhoc Load Document](#RagAdhocLoadDocument) - [Tools Use Ai Service](#ToolsUseAiService) - [Unauthorize](#Unauthorize) ## 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
NameTypeDescriptionDefault ValueRequired

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 - [Config](#Config) ### Throws - MS-EINSTEIN-AI:CHAT\_FAILURE - MS-EINSTEIN-AI:CONNECTIVITY - MS-EINSTEIN-AI:RETRY\_EXHAUSTED ## 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
NameTypeDescriptionDefault ValueRequired

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 - [Config](#Config) ### Throws - MS-EINSTEIN-AI:CHAT\_FAILURE - MS-EINSTEIN-AI:CONNECTIVITY - MS-EINSTEIN-AI:RETRY\_EXHAUSTED ## CHAT Answer Prompt With Memory `` DEPRECATED. The **Chat answer prompt with memory** operation provides memory of the conversation history for a multi-user chat operation. ### Parameters
NameTypeDescriptionDefault ValueRequired

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 - [Config](#Config) ### Throws - MS-EINSTEIN-AI:CHAT\_FAILURE - MS-EINSTEIN-AI:CONNECTIVITY - MS-EINSTEIN-AI:RETRY\_EXHAUSTED ## 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
NameTypeDescriptionDefault ValueRequired

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 - [Config](#Config) ### Throws - MS-EINSTEIN-AI:CHAT\_FAILURE - MS-EINSTEIN-AI:CONNECTIVITY - MS-EINSTEIN-AI:RETRY\_EXHAUSTED ## EMBEDDING Adhoc File Query `` ### Parameters
NameTypeDescriptionDefault ValueRequired

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 - [Config](#Config) ### 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 `` ### Parameters
NameTypeDescriptionDefault ValueRequired

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 - [Config](#Config) ### 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 `` ### Parameters
NameTypeDescriptionDefault ValueRequired

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 - [Config](#Config) ### 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 `` ### Parameters
NameTypeDescriptionDefault ValueRequired

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 - [Config](#Config) ### 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 `` ### Parameters
NameTypeDescriptionDefault ValueRequired

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 - [Config](#Config) ### 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 `` 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
NameTypeDescriptionDefault ValueRequired

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 - [Config](#Config) ## Types ### Reconnection Configures a reconnection strategy for an operation.
FieldTypeDescriptionDefault ValueRequired

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.
FieldTypeDescriptionDefault ValueRequired

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.
FieldTypeDescriptionDefault ValueRequired

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
FieldTypeDescriptionDefault ValueRequired

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.
FieldTypeDescriptionDefault ValueRequired

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
FieldTypeDescriptionDefault ValueRequired

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.
FieldTypeDescriptionDefault ValueRequired

Scan Toxicity

Scans content for toxicity.

### Scan Toxicity Represents safety and toxicity data.
FieldTypeDescriptionDefault ValueRequired

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.
FieldTypeDescriptionDefault ValueRequired

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
FieldTypeDescriptionDefault ValueRequired

Finish Reason

String

Index

Number

Logprobs

Any

Refusal

Any

### Response Parameters
FieldTypeDescriptionDefault ValueRequired

Model

String

Object

String

System Finger Print

String

Token Usage

### Token Usage
FieldTypeDescriptionDefault ValueRequired

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.
FieldTypeDescriptionDefault ValueRequired

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
FieldTypeDescriptionDefault ValueRequired

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.
FieldTypeDescriptionDefault ValueRequired

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.
FieldTypeDescriptionDefault ValueRequired

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
FieldTypeDescriptionDefault ValueRequired

Source

Enumeration, one of:

  • ANY

  • REDELIVERY_EXHAUSTED

  • TRANSFORMATION

  • EXPRESSION

  • SECURITY

  • CLIENT_SECURITY

  • SERVER_SECURITY

  • ROUTING

  • CONNECTIVITY

  • RETRY_EXHAUSTED

  • TIMEOUT

Target

String

x

## See Also - [Using Anypoint Code Builder to Configure a Connector](https://docs.mulesoft.com/connectors/introduction/intro-config-use-acb) - [Using Studio to Configure a Connector](https://docs.mulesoft.com/connectors/introduction/intro-config-use-studio) - [Einstein AI Connector Overview](https://docs.mulesoft.com/einstein-ai-connector/1.0/) - [Salesforce Help](https://help.salesforce.com) --- product: Einstein AI Connector version: 1.0 --- # Einstein AI Connector 1.0 XML and Maven Support > For the full documentation index, see: https://docs.mulesoft.com/llms.txt Although you can manually code a Mule app in XML, it is more efficient to use Anypoint Code Builder or Studio: - If you manually code a Mule runtime engine (Mule) app in XML, either from the Anypoint Code Builder or Studio XML editor, or from a text editor, you can access the connector from your app by adding reference statements to both your XML Mule flow and the Apache Maven `pom.xml` file. - If you add the connector in Anypoint Code Builder or Studio, the XML is automatically populated the code with the connector’s namespace and schema location and it also adds a dependency to the `pom.xml` file. ## Add a Namespace for the Connector Paste the following code inside the `mule` tag of the header of your configuration XML: ```xml http://www.mulesoft.org/schema/mule/ms-einstein-ai http://www.mulesoft.org/schema/mule/ms-einstein-ai/current/mule-ms-einstein-ai.xsd ``` This example shows how the namespace statements are placed in the `` XML block: ```xml ``` ## Add a POM File Dependency The Apache Maven `pom.xml` file generated by Anypoint Code Builder and Studio contains dependencies for a Mule app. If you code a Mule app manually, include this XML snippet in your `pom.xml` file to enable access to this connector: ```xml com.mulesoft.connectors mule4-einstein-ai-connector x.x.x mule-plugin ``` Replace `x.x.x` with the version that corresponds to the connector you’re using. To get the most up-to-date `pom.xml` file information: 1. Go to [Anypoint Exchange](https://www.mulesoft.com/exchange/). 2. In Exchange, click **Login** and supply your Anypoint Platform username and password. 3. In Exchange, search for `einstein ai`. 4. Select the connector. 5. Click **Dependency Snippets** near the upper right of the screen. ## See Also - [Einstein AI Connector Overview](https://docs.mulesoft.com/einstein-ai-connector/1.0/) - [Einstein AI Connector Reference](https://docs.mulesoft.com/einstein-ai-connector/1.0/einstein-ai-connector-reference) - [Einstein AI Connector - Additional Configuration](https://docs.mulesoft.com/einstein-ai-connector/1.0/einstein-ai-additional-config) --- product: Einstein AI Connector version: 1.1 --- # Einstein AI Connector 1.1 > For the full documentation index, see: https://docs.mulesoft.com/llms.txt Anypoint Connector for Einstein AI (Einstein AI Connector) provides connectivity to LLMs via the Salesforce Einstein Trust Layer. Einstein AI Connector offers a range of advanced features that simplify and enhance AI integration in MuleSoft applications. Use this connector to: - Build AI Agents in a low-code environment - Leverage existing investments (APIs, integrations, and templates) as tooling for the AI agents - Manage all Large Language Model (LLM) interactions through the Salesforce Einstein Trust Layer - Generate vector embeddings to power RAG-based architectures For information about compatibility and fixed issues, see the Einstein AI Connector release notes. ## Before You Begin To use this connector, you must be familiar with: - Anypoint Connectors - Mule runtime engine (Mule) - Elements and global elements in a Mule flow - How to create a Mule app using Anypoint Code Builder or Anypoint Studio Before creating an app, you must have: - Java 8 or 17 - Apache Maven - Connected App credentials to connect with your Salesforce org - Anypoint Platform - The latest versions of Anypoint Code Builder or Anypoint Studio To configure the connector, you must create a Connected App in Salesforce. For more information, see [Models API Developer Guide](https://developer.salesforce.com/docs/ai/agentforce/guide/models-api.html). ## Common Use Cases for the Connector These are some common use cases for Einstein AI Connector: - Enhance customer service by providing case summaries, case classifications, large dataset summaries, and more. - Assist sales teams in writing sales emails, summarizing cases for specific accounts, assessing the probability of closing deals, and more. - Support marketing teams in generating product descriptions, creating newsletters, planning social media campaigns, and more. - Generate embeddings of text data to support sentiment analysis and natural language understanding applications. ## Next Step After you complete the prerequisites, you are ready to create an app and configure the connector using [Anypoint Studio](https://docs.mulesoft.com/einstein-ai-connector/1.1/einstein-ai-connector-studio) or [Anypoint Code Builder](https://docs.mulesoft.com/einstein-ai-connector/1.1/einstein-ai-connector-config-acb). ## See Also - [Introduction to Anypoint Connectors](https://docs.mulesoft.com/connectors/introduction/introduction-to-anypoint-connectors) - [Using Anypoint Code Builder to Configure a Connector](https://docs.mulesoft.com/connectors/introduction/intro-config-use-acb) - [Using Studio to Configure a Connector](https://docs.mulesoft.com/connectors/introduction/intro-config-use-studio) - [Einstein AI Connector Reference](https://docs.mulesoft.com/einstein-ai-connector/1.1/einstein-ai-connector-reference) - [Einstein AI Connector - Additional Configuration Information](https://docs.mulesoft.com/einstein-ai-connector/1.1/einstein-ai-additional-config) - [Salesforce Help](https://help.salesforce.com) --- product: Einstein AI Connector version: 1.1 --- # Einstein AI Connector 1.1 - Additional Configuration Information > For the full documentation index, see: https://docs.mulesoft.com/llms.txt Einstein AI Connector supports these operations, which are categorized into: - [Agent](https://docs.mulesoft.com/einstein-ai-connector/1.1/configuring-agent-operations) - [Chat](https://docs.mulesoft.com/einstein-ai-connector/1.1/configuring-chat-operations) - [Embeddings](https://docs.mulesoft.com/einstein-ai-connector/1.1/configuring-embeddings-operations) - [RAG](https://docs.mulesoft.com/einstein-ai-connector/1.1/configuring-rag-operations) - [Tools](https://docs.mulesoft.com/einstein-ai-connector/1.1/configuring-tools-operations) --- product: Einstein AI Connector version: 1.1 --- # Einstein AI Connector 1.1 Reference > For the full documentation index, see: https://docs.mulesoft.com/llms.txt Einstein AI Connector provides access to the Salesforce Einstein Trust Layer through the Models APIs. ## Configurations --- ### Config Default configuration #### Parameters
NameTypeDescriptionDefault ValueRequired

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
NameTypeDescriptionDefault ValueRequired

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.

## Operations - [AGENT Define Prompt Template](#AgentDefinePromptTemplate) - [CHAT Answer Prompt](#ChatAnswerPrompt) - [CHAT Generate From Messages](#ChatGenerateFromMessages) - [EMBEDDING Adhoc File Query](#EmbeddingAdhocFileQuery) - [EMBEDDING Generate From File](#EmbeddingGenerateFromFile) - [EMBEDDING Generate From Text](#EmbeddingGenerateFromText) - [RAG Adhoc Load Document](#RagAdhocLoadDocument) - [Tools Use Ai Service](#ToolsUseAiService) - [Unauthorize](#Unauthorize) ## 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
NameTypeDescriptionDefault ValueRequired

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 - [Config](#Config) ### Throws - MS-EINSTEIN-AI:CHAT\_FAILURE - MS-EINSTEIN-AI:CONNECTIVITY - MS-EINSTEIN-AI:RETRY\_EXHAUSTED ## 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
NameTypeDescriptionDefault ValueRequired

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 - [Config](#Config) ### Throws - MS-EINSTEIN-AI:CHAT\_FAILURE - MS-EINSTEIN-AI:CONNECTIVITY - MS-EINSTEIN-AI:RETRY\_EXHAUSTED ## 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
NameTypeDescriptionDefault ValueRequired

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 - [Config](#Config) ### Throws - MS-EINSTEIN-AI:CHAT\_FAILURE - MS-EINSTEIN-AI:CONNECTIVITY - MS-EINSTEIN-AI:RETRY\_EXHAUSTED ## EMBEDDING Adhoc File Query `` ### Parameters
NameTypeDescriptionDefault ValueRequired

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 - [Config](#Config) ### 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 `` ### Parameters
NameTypeDescriptionDefault ValueRequired

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 - [Config](#Config) ### 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 `` ### Parameters
NameTypeDescriptionDefault ValueRequired

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 - [Config](#Config) ### 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 `` ### Parameters
NameTypeDescriptionDefault ValueRequired

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 - [Config](#Config) ### 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 `` ### Parameters
NameTypeDescriptionDefault ValueRequired

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 - [Config](#Config) ### 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 `` 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
NameTypeDescriptionDefault ValueRequired

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 - [Config](#Config) ## Types ### Reconnection Configures a reconnection strategy for an operation.
FieldTypeDescriptionDefault ValueRequired

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.
FieldTypeDescriptionDefault ValueRequired

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.
FieldTypeDescriptionDefault ValueRequired

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
FieldTypeDescriptionDefault ValueRequired

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.
FieldTypeDescriptionDefault ValueRequired

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
FieldTypeDescriptionDefault ValueRequired

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.
FieldTypeDescriptionDefault ValueRequired

Scan Toxicity

Scans content for toxicity.

### Scan Toxicity Represents safety and toxicity data.
FieldTypeDescriptionDefault ValueRequired

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.
FieldTypeDescriptionDefault ValueRequired

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
FieldTypeDescriptionDefault ValueRequired

Finish Reason

String

Index

Number

Logprobs

Any

Refusal

Any

### Response Parameters
FieldTypeDescriptionDefault ValueRequired

Model

String

Object

String

System Finger Print

String

Token Usage

### Token Usage
FieldTypeDescriptionDefault ValueRequired

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.
FieldTypeDescriptionDefault ValueRequired

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
FieldTypeDescriptionDefault ValueRequired

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.
FieldTypeDescriptionDefault ValueRequired

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.
FieldTypeDescriptionDefault ValueRequired

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
FieldTypeDescriptionDefault ValueRequired

Source

Enumeration, one of:

  • ANY

  • REDELIVERY_EXHAUSTED

  • TRANSFORMATION

  • EXPRESSION

  • SECURITY

  • CLIENT_SECURITY

  • SERVER_SECURITY

  • ROUTING

  • CONNECTIVITY

  • RETRY_EXHAUSTED

  • TIMEOUT

Target

String

x

## See Also - [Using Anypoint Code Builder to Configure a Connector](https://docs.mulesoft.com/connectors/introduction/intro-config-use-acb) - [Using Studio to Configure a Connector](https://docs.mulesoft.com/connectors/introduction/intro-config-use-studio) - [Einstein AI Connector Overview](https://docs.mulesoft.com/einstein-ai-connector/1.1/) - [Salesforce Help](https://help.salesforce.com) --- product: Einstein AI Connector version: 1.1 --- # Einstein AI Connector 1.1 XML and Maven Support > For the full documentation index, see: https://docs.mulesoft.com/llms.txt Although you can manually code a Mule app in XML, it is more efficient to use Anypoint Code Builder or Studio: - If you manually code a Mule runtime engine (Mule) app in XML, either from the Anypoint Code Builder or Studio XML editor, or from a text editor, you can access the connector from your app by adding reference statements to both your XML Mule flow and the Apache Maven `pom.xml` file. - If you add the connector in Anypoint Code Builder or Studio, the XML is automatically populated the code with the connector’s namespace and schema location and it also adds a dependency to the `pom.xml` file. ## Add a Namespace for the Connector Paste the following code inside the `mule` tag of the header of your configuration XML: ```xml http://www.mulesoft.org/schema/mule/ms-einstein-ai http://www.mulesoft.org/schema/mule/ms-einstein-ai/current/mule-ms-einstein-ai.xsd ``` This example shows how the namespace statements are placed in the `` XML block: ```xml ``` ## Add a POM File Dependency The Apache Maven `pom.xml` file generated by Anypoint Code Builder and Studio contains dependencies for a Mule app. If you code a Mule app manually, include this XML snippet in your `pom.xml` file to enable access to this connector: ```xml com.mulesoft.connectors mule4-einstein-ai-connector x.x.x mule-plugin ``` Replace `x.x.x` with the version that corresponds to the connector you’re using. To get the most up-to-date `pom.xml` file information: 1. Go to [Anypoint Exchange](https://www.mulesoft.com/exchange/). 2. In Exchange, click **Login** and supply your Anypoint Platform username and password. 3. In Exchange, search for `einstein ai`. 4. Select the connector. 5. Click **Dependency Snippets** near the upper right of the screen. ## See Also - [Einstein AI Connector Overview](https://docs.mulesoft.com/einstein-ai-connector/1.1/) - [Einstein AI Connector Reference](https://docs.mulesoft.com/einstein-ai-connector/1.1/einstein-ai-connector-reference) - [Einstein AI Connector - Additional Configuration](https://docs.mulesoft.com/einstein-ai-connector/1.1/einstein-ai-additional-config) --- product: Einstein AI Connector version: 1.2 --- # Einstein AI Connector 1.2 > For the full documentation index, see: https://docs.mulesoft.com/llms.txt Anypoint Connector for Einstein AI (Einstein AI Connector) provides connectivity to LLMs via the Salesforce Einstein Trust Layer. Einstein AI Connector offers a range of advanced features that simplify and enhance AI integration in MuleSoft applications. Use this connector to: - Build AI Agents in a low-code environment - Leverage existing investments (APIs, integrations, and templates) as tooling for the AI agents - Manage all Large Language Model (LLM) interactions through the Salesforce Einstein Trust Layer - Generate vector embeddings to power RAG-based architectures For information about compatibility and fixed issues, see the Einstein AI Connector release notes. ## Before You Begin To use this connector, you must be familiar with: - Anypoint Connectors - Mule runtime engine (Mule) - Elements and global elements in a Mule flow - How to create a Mule app using Anypoint Code Builder or Anypoint Studio Before creating an app, you must have: - Java 8 or 17 - Apache Maven - Connected App credentials to connect with your Salesforce org - Anypoint Platform - The latest versions of Anypoint Code Builder or Anypoint Studio To configure the connector, you must create a Connected App in Salesforce. For more information, see [Models API Developer Guide](https://developer.salesforce.com/docs/ai/agentforce/guide/models-api.html). ## Common Use Cases for the Connector These are some common use cases for Einstein AI Connector: - Enhance customer service by providing case summaries, case classifications, large dataset summaries, and more. - Assist sales teams in writing sales emails, summarizing cases for specific accounts, assessing the probability of closing deals, and more. - Support marketing teams in generating product descriptions, creating newsletters, planning social media campaigns, and more. - Generate embeddings of text data to support sentiment analysis and natural language understanding applications. ## Next Step After you complete the prerequisites, you are ready to create an app and configure the connector using [Anypoint Studio](https://docs.mulesoft.com/einstein-ai-connector/1.2/einstein-ai-connector-studio) or [Anypoint Code Builder](https://docs.mulesoft.com/einstein-ai-connector/1.2/einstein-ai-connector-config-acb). ## See Also - [Introduction to Anypoint Connectors](https://docs.mulesoft.com/connectors/introduction/introduction-to-anypoint-connectors) - [Using Anypoint Code Builder to Configure a Connector](https://docs.mulesoft.com/connectors/introduction/intro-config-use-acb) - [Using Studio to Configure a Connector](https://docs.mulesoft.com/connectors/introduction/intro-config-use-studio) - [Einstein AI Connector Reference](https://docs.mulesoft.com/einstein-ai-connector/1.2/einstein-ai-connector-reference) - [Einstein AI Connector - Additional Configuration Information](https://docs.mulesoft.com/einstein-ai-connector/1.2/einstein-ai-additional-config) - [Salesforce Help](https://help.salesforce.com) --- product: Einstein AI Connector version: 1.2 --- # Einstein AI Connector 1.2 - Additional Configuration Information > For the full documentation index, see: https://docs.mulesoft.com/llms.txt Einstein AI Connector supports these operations, which are categorized into: - [Agent](https://docs.mulesoft.com/einstein-ai-connector/1.2/configuring-agent-operations) - [Chat](https://docs.mulesoft.com/einstein-ai-connector/1.2/configuring-chat-operations) - [Embeddings](https://docs.mulesoft.com/einstein-ai-connector/1.2/configuring-embeddings-operations) - [RAG](https://docs.mulesoft.com/einstein-ai-connector/1.2/configuring-rag-operations) - [Tools](https://docs.mulesoft.com/einstein-ai-connector/1.2/configuring-tools-operations) --- product: Einstein AI Connector version: 1.2 --- # Einstein AI Connector 1.2 Reference > For the full documentation index, see: https://docs.mulesoft.com/llms.txt Einstein AI Connector provides access to the Salesforce Einstein Trust Layer through the Models APIs. ## Configurations --- ### Config Default configuration #### Parameters
NameTypeDescriptionDefault ValueRequired

Name

String

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

x

Connection

Connection types to provide to this configuration.

x

Read Timeout

Number

Read timeout value.

30

Read Timeout Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

Time unit for the Read Timeout field.

SECONDS

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
NameTypeDescriptionDefault ValueRequired

Proxy Configuration

Configures a proxy for outbound connections.

Max Connections

Number

Maximum number of outbound connections to keep open at the same time.

-1

Connection Timeout

Number

Amount of time to wait when initially establishing the TCP connection between the connector and Salesforce Agent before throwing an exception if the connection fails.

30

Connection Timeout Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

Time unit for the Connection Timeout field.

SECONDS

Connection Idle Timeout

Number

Number of units that a connection can remain idle before it is closed.

30

Connection Idle Timeout Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

Time unit for the Connection Idle Timeout field.

SECONDS

TLS Configuration

Protocol to use for communication.

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.

## Operations - [AGENT Define Prompt Template](#AgentDefinePromptTemplate) - [CHAT Answer Prompt](#ChatAnswerPrompt) - [CHAT Generate From Messages](#ChatGenerateFromMessages) - [EMBEDDING Adhoc File Query](#EmbeddingAdhocFileQuery) - [EMBEDDING Generate From File](#EmbeddingGenerateFromFile) - [EMBEDDING Generate From Text](#EmbeddingGenerateFromText) - [RAG Adhoc Load Document](#RagAdhocLoadDocument) - [Tools Use Ai Service](#ToolsUseAiService) - [Unauthorize](#Unauthorize) ## 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
NameTypeDescriptionDefault ValueRequired

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

Read Timeout

Number

Read timeout value.

Read Timeout Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

Time unit for the Read Timeout field.

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 - [Config](#Config) ### Throws - MS-EINSTEIN-AI:CHAT\_FAILURE - MS-EINSTEIN-AI:CONNECTIVITY - MS-EINSTEIN-AI:RETRY\_EXHAUSTED ## 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
NameTypeDescriptionDefault ValueRequired

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

Read Timeout

Number

Read timeout value.

Read Timeout Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

Time unit for the Read Timeout field.

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 - [Config](#Config) ### Throws - MS-EINSTEIN-AI:CHAT\_FAILURE - MS-EINSTEIN-AI:CONNECTIVITY - MS-EINSTEIN-AI:RETRY\_EXHAUSTED ## 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
NameTypeDescriptionDefault ValueRequired

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

Read Timeout

Number

Read timeout value.

Read Timeout Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

Time unit for the Read Timeout field.

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 - [Config](#Config) ### Throws - MS-EINSTEIN-AI:CHAT\_FAILURE - MS-EINSTEIN-AI:CONNECTIVITY - MS-EINSTEIN-AI:RETRY\_EXHAUSTED ## EMBEDDING Adhoc File Query `` ### Parameters
NameTypeDescriptionDefault ValueRequired

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

Read Timeout

Number

Read timeout value.

Read Timeout Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

Time unit for the Read Timeout field.

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 - [Config](#Config) ### 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 `` ### Parameters
NameTypeDescriptionDefault ValueRequired

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

Read Timeout

Number

Read timeout value.

Read Timeout Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

Time unit for the Read Timeout field.

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 - [Config](#Config) ### 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 `` ### Parameters
NameTypeDescriptionDefault ValueRequired

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

Read Timeout

Number

Read timeout value.

Read Timeout Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

Time unit for the Read Timeout field.

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 - [Config](#Config) ### 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 `` ### Parameters
NameTypeDescriptionDefault ValueRequired

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

Read Timeout

Number

Read timeout value.

Read Timeout Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

Time unit for the Read Timeout field.

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 - [Config](#Config) ### 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 `` ### Parameters
NameTypeDescriptionDefault ValueRequired

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

Read Timeout

Number

Read timeout value.

Read Timeout Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

Time unit for the Read Timeout field.

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 - [Config](#Config) ### 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 `` 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
NameTypeDescriptionDefault ValueRequired

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 - [Config](#Config) ## Types ### Tls
FieldTypeDescriptionDefault ValueRequired

Enabled Protocols

String

Comma-separated list of protocols enabled for this context.

Enabled Cipher Suites

String

Comma-separated list of cipher suites enabled for this context.

Trust Store

Key Store

Revocation Check

### Trust Store
FieldTypeDescriptionDefault ValueRequired

Path

String

The location (which will be resolved relative to the current classpath and file system, if possible) of the truststore.

Password

String

Password that protects the truststore.

Type

String

Type of truststore.

Algorithm

String

Encryption algorithm that the truststore uses.

Insecure

Boolean

If true, Mule stops performing certificate validations. Setting this to true can make connections vulnerable to attacks.

### Key Store
FieldTypeDescriptionDefault ValueRequired

Path

String

Path to the keystore. Mule resolves the path relative to the current classpath and file system, if possible.

Type

String

Type of keystore to use.

Alias

String

Alias of the key to use when the keystore contains multiple private keys. By default, Mule uses the first key in the file.

Key Password

String

Password used to protect the private key.

Password

String

Password used to protect the keystore.

Algorithm

String

Encryption algorithm that the keystore uses.

### Standard Revocation Check Configures standard revocation checks for TLS certificates.
FieldTypeDescriptionDefault ValueRequired

Only End Entities

Boolean

Which elements to verify in the certificate chain:

  • true

    Verify only the last element in the certificate chain.

  • false

    Verify all elements in the certificate chain.

Prefer Crls

Boolean

How to check certificate validity:

  • true

    Check the Certification Revocation List (CRL) for certificate validity.

  • false

    Use the Online Certificate Status Protocol (OCSP) to check certificate validity.

No Fallback

Boolean

Whether to use the secondary method to check certificate validity:

  • true

    Use the method that wasn’t specified in the Prefer Crls field (the secondary method) to check certificate validity.

  • false

    Do not use the secondary method to check certificate validity.

Soft Fail

Boolean

What to do if the revocation server can’t be reached or is busy:

  • true

    Avoid verification failure.

  • false

    Allow the verification to fail.

### Custom Ocsp Responder
FieldTypeDescriptionDefault ValueRequired

Url

String

URL of the OCSP responder.

Cert Alias

String

Alias of the signing certificate for the OCSP response (must be in the truststore), if present.

### Crl File
FieldTypeDescriptionDefault ValueRequired

Path

String

Path to the CRL file.

### Reconnection Configures a reconnection strategy for an operation.
FieldTypeDescriptionDefault ValueRequired

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.
FieldTypeDescriptionDefault ValueRequired

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.
FieldTypeDescriptionDefault ValueRequired

Frequency

Number

How often to attempt to reconnect, in milliseconds.

Blocking

Boolean

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

### Expiration Policy Configures an expiration policy strategy.
FieldTypeDescriptionDefault ValueRequired

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.

### Pooling Profile
FieldTypeDescriptionDefault ValueRequired

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

### Einstein Response Attributes
FieldTypeDescriptionDefault ValueRequired

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.
FieldTypeDescriptionDefault ValueRequired

Scan Toxicity

Scans content for toxicity.

### Scan Toxicity Represents safety and toxicity data.
FieldTypeDescriptionDefault ValueRequired

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.
FieldTypeDescriptionDefault ValueRequired

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
FieldTypeDescriptionDefault ValueRequired

Annotations

Array of String

Finish Reason

String

Index

Number

Logprobs

Any

Refusal

Any

### Response Parameters
FieldTypeDescriptionDefault ValueRequired

Model

String

Object

String

System Finger Print

String

Token Usage

### Token Usage
FieldTypeDescriptionDefault ValueRequired

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.
FieldTypeDescriptionDefault ValueRequired

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
FieldTypeDescriptionDefault ValueRequired

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.
FieldTypeDescriptionDefault ValueRequired

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.
FieldTypeDescriptionDefault ValueRequired

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
FieldTypeDescriptionDefault ValueRequired

Source

Enumeration, one of:

  • ANY

  • REDELIVERY_EXHAUSTED

  • TRANSFORMATION

  • EXPRESSION

  • SECURITY

  • CLIENT_SECURITY

  • SERVER_SECURITY

  • ROUTING

  • CONNECTIVITY

  • RETRY_EXHAUSTED

  • TIMEOUT

Target

String

x

### Default Http Proxy Config
FieldTypeDescriptionDefault ValueRequired

Host

String

x

Port

Number

x

Username

String

Password

String

Non Proxy Hosts

String

## See Also - [Using Anypoint Code Builder to Configure a Connector](https://docs.mulesoft.com/connectors/introduction/intro-config-use-acb) - [Using Studio to Configure a Connector](https://docs.mulesoft.com/connectors/introduction/intro-config-use-studio) - [Einstein AI Connector Overview](https://docs.mulesoft.com/einstein-ai-connector/1.2/) - [Salesforce Help](https://help.salesforce.com) --- product: Einstein AI Connector version: 1.2 --- # Einstein AI Connector 1.2 XML and Maven Support > For the full documentation index, see: https://docs.mulesoft.com/llms.txt Although you can manually code a Mule app in XML, it is more efficient to use Anypoint Code Builder or Studio: - If you manually code a Mule runtime engine (Mule) app in XML, either from the Anypoint Code Builder or Studio XML editor, or from a text editor, you can access the connector from your app by adding reference statements to both your XML Mule flow and the Apache Maven `pom.xml` file. - If you add the connector in Anypoint Code Builder or Studio, the XML is automatically populated the code with the connector’s namespace and schema location and it also adds a dependency to the `pom.xml` file. ## Add a Namespace for the Connector Paste the following code inside the `mule` tag of the header of your configuration XML: ```xml http://www.mulesoft.org/schema/mule/ms-einstein-ai http://www.mulesoft.org/schema/mule/ms-einstein-ai/current/mule-ms-einstein-ai.xsd ``` This example shows how the namespace statements are placed in the `` XML block: ```xml ``` ## Add a POM File Dependency The Apache Maven `pom.xml` file generated by Anypoint Code Builder and Studio contains dependencies for a Mule app. If you code a Mule app manually, include this XML snippet in your `pom.xml` file to enable access to this connector: ```xml com.mulesoft.connectors mule4-einstein-ai-connector x.x.x mule-plugin ``` Replace `x.x.x` with the version that corresponds to the connector you’re using. To get the most up-to-date `pom.xml` file information: 1. Go to [Anypoint Exchange](https://www.mulesoft.com/exchange/). 2. In Exchange, click **Login** and supply your Anypoint Platform username and password. 3. In Exchange, search for `einstein ai`. 4. Select the connector. 5. Click **Dependency Snippets** near the upper right of the screen. ## See Also - [Einstein AI Connector Overview](https://docs.mulesoft.com/einstein-ai-connector/1.2/) - [Einstein AI Connector Reference](https://docs.mulesoft.com/einstein-ai-connector/1.2/einstein-ai-connector-reference) - [Einstein AI Connector - Additional Configuration](https://docs.mulesoft.com/einstein-ai-connector/1.2/einstein-ai-additional-config) --- product: Einstein AI Connector version: 2.0 is-latest-version: true --- # Einstein AI Connector 2.0 > For the full documentation index, see: https://docs.mulesoft.com/llms.txt Anypoint Connector for Einstein AI (Einstein AI Connector) provides connectivity to LLMs via the Salesforce Einstein Trust Layer. Einstein AI Connector offers a range of advanced features that simplify and enhance AI integration in MuleSoft applications. Use this connector to: - Build AI Agents in a low-code environment - Leverage existing investments (APIs, integrations, and templates) as tooling for the AI agents - Manage all Large Language Model (LLM) interactions through the Salesforce Einstein Trust Layer - Generate vector embeddings to power RAG-based architectures For information about compatibility and fixed issues, see the Einstein AI Connector release notes. For information about upgrading from version 1.x, see [Upgrading and Migrating Einstein AI Connector to 2.x](https://docs.mulesoft.com/einstein-ai-connector/latest/einstein-ai-connector-upgrade-migrate). ## Before You Begin To use this connector, you must be familiar with: - Anypoint Connectors - Mule runtime engine (Mule) - Elements and global elements in a Mule flow - How to create a Mule app using Anypoint Code Builder or Anypoint Studio Before creating an app, you must have: - Java 17 - Apache Maven - Connected App credentials to connect with your Salesforce org - Anypoint Platform - The latest versions of Anypoint Code Builder or Anypoint Studio To configure the connector, you must create a Connected App in Salesforce. For more information, see [Models API Developer Guide](https://developer.salesforce.com/docs/ai/agentforce/guide/models-api.html). ## Common Use Cases for the Connector These are some common use cases for Einstein AI Connector: - Enhance customer service by providing case summaries, case classifications, large dataset summaries, and more. - Assist sales teams in writing sales emails, summarizing cases for specific accounts, assessing the probability of closing deals, and more. - Support marketing teams in generating product descriptions, creating newsletters, planning social media campaigns, and more. - Generate embeddings of text data to support sentiment analysis and natural language understanding applications. ## Next Step After you complete the prerequisites, you are ready to create an app and configure the connector using [Anypoint Studio](https://docs.mulesoft.com/einstein-ai-connector/latest/einstein-ai-connector-studio) or [Anypoint Code Builder](https://docs.mulesoft.com/einstein-ai-connector/latest/einstein-ai-connector-config-acb). ## See Also - [Introduction to Anypoint Connectors](https://docs.mulesoft.com/connectors/introduction/introduction-to-anypoint-connectors) - [Using Anypoint Code Builder to Configure a Connector](https://docs.mulesoft.com/connectors/introduction/intro-config-use-acb) - [Using Studio to Configure a Connector](https://docs.mulesoft.com/connectors/introduction/intro-config-use-studio) - [Einstein AI Connector Reference](https://docs.mulesoft.com/einstein-ai-connector/latest/einstein-ai-connector-reference) - [Einstein AI Connector - Additional Configuration Information](https://docs.mulesoft.com/einstein-ai-connector/latest/einstein-ai-additional-config) - [Salesforce Help](https://help.salesforce.com) --- product: Einstein AI Connector version: 2.0 is-latest-version: true --- # Einstein AI Connector 2.0 - Additional Configuration Information > For the full documentation index, see: https://docs.mulesoft.com/llms.txt Einstein AI Connector supports these operations, which are categorized into: - [Agent](https://docs.mulesoft.com/einstein-ai-connector/latest/configuring-agent-operations) - [Chat](https://docs.mulesoft.com/einstein-ai-connector/latest/configuring-chat-operations) - [Embeddings](https://docs.mulesoft.com/einstein-ai-connector/latest/configuring-embeddings-operations) - [RAG](https://docs.mulesoft.com/einstein-ai-connector/latest/configuring-rag-operations) - [Tools](https://docs.mulesoft.com/einstein-ai-connector/latest/configuring-tools-operations) --- product: Einstein AI Connector version: 2.0 is-latest-version: true --- # Einstein AI Connector 2.0 Reference > For the full documentation index, see: https://docs.mulesoft.com/llms.txt Einstein AI Connector provides access to the Salesforce Einstein Trust Layer through the Models APIs. ## Configurations --- ### Configuration Default configuration #### Parameters
NameTypeDescriptionDefault ValueRequired

Name

String

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

x

Connection

The connection types to provide to this configuration.

x

Read Timeout

Number

Read timeout value.

30

Read Timeout Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

Time unit for the Read Timeout field.

SECONDS

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 ##### OAuth Client Credentials ###### Parameters
NameTypeDescriptionDefault ValueRequired

Proxy Configuration

Configures a proxy for outbound connections.

Max Connections

Number

Maximum number of outbound connections to keep open at the same time.

-1

Connection Timeout

Number

Amount of time to wait when initially establishing the TCP connection between the connector and Salesforce Agent before throwing an exception if the connection fails.

30

Connection Timeout Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

Time unit for the Connection Timeout field.

SECONDS

Connection Idle Timeout

Number

Number of units that a connection can remain idle before it is closed.

30

Connection Idle Timeout Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

Time unit for the Connection Idle Timeout field.

SECONDS

TLS Configuration

Protocol to use for communication.

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.

## Operations - [AGENT Define Prompt Template](#AgentDefinePromptTemplate) - [CHAT Answer Prompt](#ChatAnswerPrompt) - [CHAT Generate From Messages](#ChatGenerateFromMessages) - [EMBEDDING Adhoc File Query](#EmbeddingAdhocFileQuery) - [EMBEDDING Generate From File](#EmbeddingGenerateFromFile) - [EMBEDDING Generate From Text](#EmbeddingGenerateFromText) - [RAG Adhoc Load Document](#RagAdhocLoadDocument) - [Tools Use Ai Service](#ToolsUseAiService) - [Unauthorize](#Unauthorize) ## 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
NameTypeDescriptionDefault ValueRequired

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

Read Timeout

Number

Read timeout value.

Read Timeout Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

Time unit for the Read Timeout field.

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 - [Configuration](#Config) ### Throws - MS-EINSTEIN-AI:CHAT\_FAILURE - MS-EINSTEIN-AI:CONNECTIVITY - MS-EINSTEIN-AI:RETRY\_EXHAUSTED ## 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
NameTypeDescriptionDefault ValueRequired

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

Read Timeout

Number

Read timeout value.

Read Timeout Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

Time unit for the Read Timeout field.

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 - [Configuration](#Config) ### Throws - MS-EINSTEIN-AI:CHAT\_FAILURE - MS-EINSTEIN-AI:CONNECTIVITY - MS-EINSTEIN-AI:RETRY\_EXHAUSTED ## 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
NameTypeDescriptionDefault ValueRequired

Configuration

String

Name of the configuration to use.

x

Messages

Any

#[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

Read Timeout

Number

Read timeout value.

Read Timeout Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

Time unit for the Read Timeout field.

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 - [Configuration](#Config) ### Throws - MS-EINSTEIN-AI:CHAT\_FAILURE - MS-EINSTEIN-AI:CONNECTIVITY - MS-EINSTEIN-AI:RETRY\_EXHAUSTED ## EMBEDDING Adhoc File Query `` ### Parameters
NameTypeDescriptionDefault ValueRequired

Configuration

String

Name of the configuration to use.

x

Prompt

String

Plain text prompt to send to the LLM.

x

Input Stream

Any

Document content to ingest into the embedding store.

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

Enumeration, one of:

  • PDF

  • TEXT

  • CSV

Type of the document provided as input.

PDF

Option Type

Enumeration, one of:

  • FULL

  • PARAGRAPH

How to split the loaded document before embedding.

FULL

Read Timeout

Number

Read timeout value.

Read Timeout Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

Time unit for the Read Timeout field.

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 - [Configuration](#Config) ### 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 `` ### Parameters
NameTypeDescriptionDefault ValueRequired

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

Enumeration, one of:

  • PDF

  • TEXT

  • CSV

Type of the document provided as input.

PDF

Option Type

Enumeration, one of:

  • FULL

  • PARAGRAPH

How to split the loaded document before embedding.

FULL

Read Timeout

Number

Read timeout value.

Read Timeout Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

Time unit for the Read Timeout field.

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 - [Configuration](#Config) ### 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 `` ### Parameters
NameTypeDescriptionDefault ValueRequired

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

Read Timeout

Number

Read timeout value.

Read Timeout Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

Time unit for the Read Timeout field.

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 - [Configuration](#Config) ### 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 `` ### Parameters
NameTypeDescriptionDefault ValueRequired

Configuration

String

Name of the configuration to use.

x

Prompt

String

Plain text prompt to send to the LLM.

x

Input Stream

Any

Document content to ingest into the embedding store.

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

Embedding Name

String

sfdc_ai__DefaultOpenAITextEmbeddingAda_002

Option Type

Enumeration, one of:

  • FULL

  • PARAGRAPH

How to split the loaded document before embedding.

FULL

File Type

Enumeration, one of:

  • PDF

  • TEXT

  • CSV

Type of the document provided as input.

PDF

Read Timeout

Number

Read timeout value.

Read Timeout Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

Time unit for the Read Timeout field.

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 - [Configuration](#Config) ### 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 `` ### Parameters
NameTypeDescriptionDefault ValueRequired

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

Read Timeout

Number

Read timeout value.

Read Timeout Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

Time unit for the Read Timeout field.

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 - [Configuration](#Config) ### 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 `` 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
NameTypeDescriptionDefault ValueRequired

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 - [Configuration](#Config) ## Types ### Tls
FieldTypeDescriptionDefault ValueRequired

Enabled Protocols

String

Comma-separated list of protocols enabled for this context.

Enabled Cipher Suites

String

Comma-separated list of cipher suites enabled for this context.

Trust Store

Key Store

Revocation Check

### Trust Store
FieldTypeDescriptionDefault ValueRequired

Path

String

The location (which will be resolved relative to the current classpath and file system, if possible) of the truststore.

Password

String

Password that protects the truststore.

Type

String

Type of truststore.

Algorithm

String

Encryption algorithm that the truststore uses.

Insecure

Boolean

If true, Mule stops performing certificate validations. Setting this to true can make connections vulnerable to attacks.

### Key Store
FieldTypeDescriptionDefault ValueRequired

Path

String

Path to the keystore. Mule resolves the path relative to the current classpath and file system, if possible.

Type

String

Type of keystore to use.

Alias

String

Alias of the key to use when the keystore contains multiple private keys. By default, Mule uses the first key in the file.

Key Password

String

Password used to protect the private key.

Password

String

Password used to protect the keystore.

Algorithm

String

Encryption algorithm that the keystore uses.

### Standard Revocation Check Configures standard revocation checks for TLS certificates.
FieldTypeDescriptionDefault ValueRequired

Only End Entities

Boolean

Which elements to verify in the certificate chain:

  • true

    Verify only the last element in the certificate chain.

  • false

    Verify all elements in the certificate chain.

Prefer Crls

Boolean

How to check certificate validity:

  • true

    Check the Certification Revocation List (CRL) for certificate validity.

  • false

    Use the Online Certificate Status Protocol (OCSP) to check certificate validity.

No Fallback

Boolean

Whether to use the secondary method to check certificate validity:

  • true

    Use the method that wasn’t specified in the Prefer Crls field (the secondary method) to check certificate validity.

  • false

    Do not use the secondary method to check certificate validity.

Soft Fail

Boolean

What to do if the revocation server can’t be reached or is busy:

  • true

    Avoid verification failure.

  • false

    Allow the verification to fail.

### Custom Ocsp Responder
FieldTypeDescriptionDefault ValueRequired

Url

String

URL of the OCSP responder.

Cert Alias

String

Alias of the signing certificate for the OCSP response (must be in the truststore), if present.

### Crl File
FieldTypeDescriptionDefault ValueRequired

Path

String

Path to the CRL file.

### Reconnection Configures a reconnection strategy for an operation.
FieldTypeDescriptionDefault ValueRequired

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.
FieldTypeDescriptionDefault ValueRequired

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.
FieldTypeDescriptionDefault ValueRequired

Frequency

Number

How often to attempt to reconnect, in milliseconds.

Blocking

Boolean

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

### Expiration Policy Configures an expiration policy strategy.
FieldTypeDescriptionDefault ValueRequired

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
FieldTypeDescriptionDefault ValueRequired

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.
FieldTypeDescriptionDefault ValueRequired

Scan Toxicity

Scans content for toxicity.

### Scan Toxicity Represents safety and toxicity data.
FieldTypeDescriptionDefault ValueRequired

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.
FieldTypeDescriptionDefault ValueRequired

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
FieldTypeDescriptionDefault ValueRequired

Annotations

Array of String

Finish Reason

String

Index

Number

Logprobs

String

Refusal

String

### Response Parameters
FieldTypeDescriptionDefault ValueRequired

Model

String

Object

String

System Fingerprint

String

Token Usage

### Token Usage
FieldTypeDescriptionDefault ValueRequired

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.
FieldTypeDescriptionDefault ValueRequired

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
FieldTypeDescriptionDefault ValueRequired

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.
FieldTypeDescriptionDefault ValueRequired

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.
FieldTypeDescriptionDefault ValueRequired

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
FieldTypeDescriptionDefault ValueRequired

Source

Enumeration, one of:

  • ANY

  • REDELIVERY_EXHAUSTED

  • TRANSFORMATION

  • EXPRESSION

  • SECURITY

  • CLIENT_SECURITY

  • SERVER_SECURITY

  • ROUTING

  • CONNECTIVITY

  • RETRY_EXHAUSTED

  • TIMEOUT

Target

String

x

### Default Http Proxy Config
FieldTypeDescriptionDefault ValueRequired

Host

String

x

Port

Number

x

Username

String

Password

String

Non Proxy Hosts

String

## See Also - [Using Anypoint Code Builder to Configure a Connector](https://docs.mulesoft.com/connectors/introduction/intro-config-use-acb) - [Using Studio to Configure a Connector](https://docs.mulesoft.com/connectors/introduction/intro-config-use-studio) - [Einstein AI Connector Overview](https://docs.mulesoft.com/einstein-ai-connector/latest/) - [Salesforce Help](https://help.salesforce.com) --- product: Einstein AI Connector version: 2.0 is-latest-version: true --- # Einstein AI Connector 2.0 XML and Maven Support > For the full documentation index, see: https://docs.mulesoft.com/llms.txt Although you can manually code a Mule app in XML, it is more efficient to use Anypoint Code Builder or Studio: - If you manually code a Mule runtime engine (Mule) app in XML, either from the Anypoint Code Builder or Studio XML editor, or from a text editor, you can access the connector from your app by adding reference statements to both your XML Mule flow and the Apache Maven `pom.xml` file. - If you add the connector in Anypoint Code Builder or Studio, the XML is automatically populated the code with the connector’s namespace and schema location and it also adds a dependency to the `pom.xml` file. ## Add a Namespace for the Connector Paste the following code inside the `mule` tag of the header of your configuration XML: ```xml http://www.mulesoft.org/schema/mule/ms-einstein-ai http://www.mulesoft.org/schema/mule/ms-einstein-ai/current/mule-ms-einstein-ai.xsd ``` This example shows how the namespace statements are placed in the `` XML block: ```xml ``` ## Add a POM File Dependency The Apache Maven `pom.xml` file generated by Anypoint Code Builder and Studio contains dependencies for a Mule app. If you code a Mule app manually, include this XML snippet in your `pom.xml` file to enable access to this connector: ```xml com.mulesoft.connectors mule4-einstein-ai-connector x.x.x mule-plugin ``` Replace `x.x.x` with the version that corresponds to the connector you’re using. To get the most up-to-date `pom.xml` file information: 1. Go to [Anypoint Exchange](https://www.mulesoft.com/exchange/). 2. In Exchange, click **Login** and supply your Anypoint Platform username and password. 3. In Exchange, search for `einstein ai`. 4. Select the connector. 5. Click **Dependency Snippets** near the upper right of the screen. ## See Also - [Einstein AI Connector Overview](https://docs.mulesoft.com/einstein-ai-connector/latest/) - [Einstein AI Connector Reference](https://docs.mulesoft.com/einstein-ai-connector/latest/einstein-ai-connector-reference) - [Einstein AI Connector - Additional Configuration](https://docs.mulesoft.com/einstein-ai-connector/latest/einstein-ai-additional-config) --- product: Einstein AI Connector version: 1.0 --- # Troubleshooting Einstein AI Connector 1.0 > For the full documentation index, see: https://docs.mulesoft.com/llms.txt ## Empty API Instance URL Error If you receive the `Empty API Instance URL` error, confirm that you completed Einstein Generative AI setup correctly for your Salesforce org. For more information, see [Set Up Einstein Generative AI](https://developer.salesforce.com/docs/ai/agentforce/guide/org-setup.html). ## See Also - [Salesforce Help](https://help.salesforce.com) - [Known Issues](https://help.salesforce.com/s/issues) --- product: Einstein AI Connector version: 1.1 --- # Troubleshooting Einstein AI Connector 1.1 > For the full documentation index, see: https://docs.mulesoft.com/llms.txt ## Empty API Instance URL Error If you receive the `Empty API Instance URL` error, confirm that you completed Einstein Generative AI setup correctly for your Salesforce org. For more information, see [Set Up Einstein Generative AI](https://developer.salesforce.com/docs/ai/agentforce/guide/org-setup.html). ## See Also - [Salesforce Help](https://help.salesforce.com) - [Known Issues](https://help.salesforce.com/s/issues) --- product: Einstein AI Connector version: 1.2 --- # Troubleshooting Einstein AI Connector 1.2 > For the full documentation index, see: https://docs.mulesoft.com/llms.txt ## Empty API Instance URL Error If you receive the `Empty API Instance URL` error, confirm that you completed Einstein Generative AI setup correctly for your Salesforce org. For more information, see [Set Up Einstein Generative AI](https://developer.salesforce.com/docs/ai/agentforce/guide/org-setup.html). ## See Also - [Salesforce Help](https://help.salesforce.com) - [Known Issues](https://help.salesforce.com/s/issues) --- product: Einstein AI Connector version: 2.0 is-latest-version: true --- # Troubleshooting Einstein AI Connector 2.0 > For the full documentation index, see: https://docs.mulesoft.com/llms.txt ## Empty API Instance URL Error If you receive the `Empty API Instance URL` error, confirm that you completed Einstein Generative AI setup correctly for your Salesforce org. For more information, see [Set Up Einstein Generative AI](https://developer.salesforce.com/docs/ai/agentforce/guide/org-setup.html). ## See Also - [Salesforce Help](https://help.salesforce.com) - [Known Issues](https://help.salesforce.com/s/issues) --- product: Einstein AI Connector version: 2.0 is-latest-version: true --- # Upgrading and Migrating Einstein AI Connector to 2.x > For the full documentation index, see: https://docs.mulesoft.com/llms.txt Upgrade Anypoint Connector for Einstein AI (Einstein AI Connector) from version 1.x to version 2.x. ## Supported Upgrade Paths
From VersionTo Version

1.x

2.x

## Changes ### 2.0 - This connector is now compatible with Java 17 only. - Document parsing now uses Apache Tika 4.0.0, instead of Apache Tika 2.9.4. Text extraction for some document types can differ from Einstein AI Connector 1.2. - **File Type** and **Option Type** are now enumerations on [**Embedding Adhoc File Query**](https://docs.mulesoft.com/einstein-ai-connector/latest/einstein-ai-connector-reference#EmbeddingAdhocFileQuery), [**Embedding Generate From File**](https://docs.mulesoft.com/einstein-ai-connector/latest/einstein-ai-connector-reference#EmbeddingGenerateFromFile), and [**RAG Adhoc Load Document**](https://docs.mulesoft.com/einstein-ai-connector/latest/einstein-ai-connector-reference#RagAdhocLoadDocument). The values are unchanged: `PDF`, `TEXT`, and `CSV` for **File Type**, and `FULL` and `PARAGRAPH` for **Option Type**. - These libraries are upgraded to address reported security vulnerabilities: - The `tika-core` and `tika-parsers-standard-package` libraries are upgraded to version 4.0.0. - The `org.bouncycastle` library is upgraded to version 1.86. - The `log4j` dependency is excluded. - The `junrar` library is upgraded to version 8.1.1. - The `jackson` library is upgraded to version 2.22.3. - The `jsoup` library is upgraded to version 1.23.2. - The `commons-lang3` library is upgraded to version 3.20.0. ## Requirements Ensure your system meets the following compatibility requirements before you perform the upgrade:
Application/ServiceVersion

Mule runtime

4.9.0 and later

Java

17

## Upgrade Prerequisites Before you perform the upgrade, you must: 1. Create a backup of your files, data, and configuration in case you need to restore to the previous version. 2. Ensure that your environment meets the version 2.x requirements, including Java 17 and Mule runtime 4.9.0 or later. 3. Install Einstein AI Connector 2.x to replace the operations that were previously included in Einstein AI Connector 1.x. ## Upgrade Steps Follow these steps to perform the upgrade from Einstein AI Connector 1.x to Einstein AI Connector 2.x: 1. In Anypoint Studio, create a Mule project. 2. In the Mule Palette view, click **Search in Exchange**. 3. In the **Add Dependencies to Project** window, enter `Einstein AI` in the search field. 4. In the **Available modules** section, select **Einstein AI Connector** and click **Add**. 5. Click **Finish**. 6. Verify that the `mule4-einstein-ai-connector` dependency version is `2.x.x` in the `pom.xml` file, where `x.x` is the minor release and patch version number. For example, if you are upgrading to version 2.0, the dependency version in the `pom.xml` file should be `2.0.0`. Studio upgrades the connector automatically. ## Verify the Upgrade After you install the latest version of the connector, follow these steps to verify the upgrade: 1. In Studio, verify that there are no errors in the **Problems** or **Console** views. 2. Check the project `pom.xml` file and verify that there are no problems. 3. Test the connection and verify that the operations work. ## Troubleshooting If there are problems with caching the parameters and caching the metadata, try restarting Studio. ## Revert the Upgrade If it is necessary to revert to the previous version of Einstein AI Connector, change the `mule4-einstein-ai-connector` dependency version in the project’s `pom.xml` file to the previous version. You must update the project’s `pom.xml` file in Anypoint Studio. ## See Also - [Introduction to Anypoint Connectors](https://docs.mulesoft.com/connectors/introduction/introduction-to-anypoint-connectors) - [Salesforce Help](https://help.salesforce.com) --- product: Einstein AI Connector version: 1.0 --- # Using Anypoint Code Builder to Configure Einstein AI Connector 1.0 > For the full documentation index, see: https://docs.mulesoft.com/llms.txt Cloud IDE (Beta) is scheduled for retirement on August 31, 2026. August 30, 2026 is the last day you can access Cloud IDE (Beta). Download your projects to work from Desktop IDE. Learn more in [Migrate a Project from Cloud IDE to Desktop IDE](https://docs.mulesoft.com/anypoint-code-builder/int-import-mule-project#migrate-cloud-to-desktop). To use Anypoint Code Builder to configure a connector or module, create a basic integration project in Anypoint Code Builder, add connectors and other components to your Mule application to process your business logic, and configure the attributes. ## Before You Begin Before creating an integration project, you must: - [Set up and access the Anypoint Code Builder web or desktop IDE](https://docs.mulesoft.com/anypoint-code-builder/start-acb) - Have credentials to access the connector’s API - Ensure that the Visual Studio Code Extension Pack for Java is installed. To use this connector, you must be familiar with: - The connector’s API - Anypoint Connectors - Mule runtime engine (Mule) ## Create a New Integration Project To create a new integration project: 1. In the activity bar of the IDE, click the ![Anypoint Code Builder icon](/mulesoft/current/en-us/connectors/_images/acb-icon-ms-logo.png) (**Anypoint Code Builder**) icon. 2. From **Quick Actions**, click **Develop an Integration**: ![Develop an Integration link highlighted in the Getting started section](/mulesoft/current/en-us/anypoint-code-builder/_images/develop-integration-option-mat.png) 3. Complete the following in the **Develop an Integration** form:
AttributeValue

Project Name

Unique name for your project.

This name is used as the title and name of the integration project file. For example, if the project name is "Salesforce Integration," the project file name is salesforce-integration.

Project Location

Your home directory or another directory you create. Click Browse to select a different directory for the integration project.

Don’t create the project within another project directory.

4. Select the type of project to create by selecting either the **Empty Project** or **Template or Example** card. 5. Select the **Mule runtime** and **Java Version** for your app. 6. Click **Create Project**. ## Add Components to Your Project Add components to your integration project to build a flow: 1. In the **Explorer** view, open the XML file for your project, such as `my-project-name.xml`. 2. Select **Build a Flow** from the start card to create an empty flow: ![Anypoint Code Builder canvas with starting cards with the options to start from scratch, build a flow, or build a subflow](/mulesoft/current/en-us/connectors/_images/acb-build-flow.png) 3. Change the name of the flow: 1. Click **Flow**. 2. Click the edit icon. ![Arrow pointing to the flow name edit pencil icon](/mulesoft/current/en-us/connectors/_images/acb-change-flow-name.png) 3. Enter the flow name, and click the checkmark. 4. In the canvas UI, click the ![Add component icon](/mulesoft/current/en-us/anypoint-code-builder/_images/icon-plus.png) (**Add component**) icon. 5. In the **Add Component** panel, search for and select your component from the results. The following example shows the **Listener** component from the **HTTP** search results: ![Listener component highlighted in the Add Component section](/mulesoft/current/en-us/anypoint-code-builder/_images/main-tutorial-add-first-listener.png) The configuration XML file now includes the XML for the HTTP Listener into the `` element, for example: ```XML ``` ## Configure the Trigger For the Flow A trigger (source) starts the flow when specified conditions are met. If a connector has its own associated sources, you can use a connector-specific trigger to initiate the flow. Each connector trigger has a unique configuration. You can configure the following sources for this connector: - **HTTP > Listener** Initiates a flow each time it receives a request on the configured host and port - **Scheduler** Initiates a flow when a time-based condition is met For example, to configure an HTTP Listener trigger, follow these steps: 1. Click the **Listener** component on the canvas UI. 2. (Optional) Click the edit icon to change the name of the **Listener** component. 3. (Optional) If you created a configuration file for the connector, select it. 4. In the **General** tab, in the **Path** field, enter the relative path for the path set in the HTTP configuration element. See [Configure Paths](https://docs.mulesoft.com/http-connector/latest/http-listener-ref#configure-paths). 5. Select the **Advanced** tab to configure the following attributes:
AttributeDescriptionRequired

Allowed methods

To allow all HTTP methods (default), do not define this attribute. To restrict certain methods, specify all allowed HTTP methods, for example, GET, POST, as a comma-separated list.

No

Response streaming mode

Whether to use streaming when the response is sent.

No

Output MIME type

MIME type of the payload that this component outputs.

No

Parameters

Appends a key-value pair for a reader property to the value of the Output MIME attribute. Multiple key-value pairs are allowed.

No

Output encoding

Encoding of the payload that this component outputs.

No

Streaming Strategy

Configures the way data streams are consumed in Mule apps.

No

Primary node only

Select this option to execute the Listener trigger on the primary node only when running in a cluster.

No

Redelivery policy

Configures the redelivery policy for executing requests that generate errors. You can add a redelivery policy to any source in a flow.

No

Reconnection strategy

When an operation in a Mule application fails to connect to an external server, the default behavior is for the operation to fail immediately and return a connectivity error. You can modify the default behavior by configuring the reconnection strategy for the operation.

No

Response

See HTTP Response Attributes.

No

Error Response

HTTP error response returns a status code for the error.

No

Body

Body of the error message.

No

Headers

Headers to include in the error message.

No

Status code

Status code of the error response, for example, 500.

No

Reason phrase

Reason for the error, for example, Gateway Timeout or Internal Server Error.

No

## Add the Connector to Your Integration Project 1. In the Explorer view, open the configuration XML file for your project, such as `my-project-name.xml`. 2. Click the ![Show Mule graphical mode icon](/mulesoft/current/en-us/anypoint-code-builder/_images/icon-tree-view.png) (**Show Mule graphical mode**) icon in the activity bar to open the canvas UI if it doesn’t open automatically. 3. Add the connector the same way you added other components from the canvas UI: 1. In the canvas UI, click the ![Add component icon](/mulesoft/current/en-us/anypoint-code-builder/_images/icon-plus.png) (**Add component**) icon. 2. In the **Add Component** panel, click **Connectors**. 4. Click the ![Search in Exchange icon](/mulesoft/current/en-us/anypoint-code-builder/_images/icon-search-exchange.png) (**Search in Exchange**) toggle: ![Search in Exchange toggle](/mulesoft/current/en-us/anypoint-code-builder/_images/int-connector-search-exchange.png) 5. Enter `einstein ai` in the search box. 6. Select the connector to add it to your project. Adding a connector to an integration project doesn’t make that connector available to other projects in your Anypoint Code Builder workspace. ## Add a Global Configuration 1. In the configuration XML, place your cursor before the `` element and type `einstein-ai`. Ensure that the cursor is not inside the `` element. 2. Select the `ms-einstein-ai:config` snippet: The snippet adds the following code: ```xml ``` 3. Add the attributes to complete the configuration, for example: ```xml ``` This example shows a flow named "Define\_Prompt" with two global elements defined (`http:listener-config` and `ms-einstein-ai:config`): ```xml ``` ## Example Customer Feedback Flow This example flow is designed to handle customer feedback analysis and responses using the Einstein AI service. In the first route of the scatter-gather component, the flow defines a prompt template for an agent to analyze customer feedback provided in a dataset. If the feedback is negative, the agent is instructed to open a service case and apologize to the customer. In the second route of the scatter-gather component, the flow defines a chat answer prompt for interacting with the Einstein AI service. ![A flow with a Tranform component, a scatter-gather component, and two routes](/mulesoft/current/en-us/einstein-ai-connector/1.0/_images/einstein-ai-example-flow-acb.png) ## Configure Additional Connector Fields After you configure a global element for the connector, configure the other required fields. The required fields vary depending on which connector actions you use. For more information about configuring Einstein AI Connector actions, see [Einstein AI Connector - Additional Configuration Information](https://docs.mulesoft.com/einstein-ai-connector/1.0/einstein-ai-additional-config). ## See Also - [Introduction to Anypoint Connectors](https://docs.mulesoft.com/connectors/introduction/introduction-to-anypoint-connectors) - [Einstein AI Connector Reference](https://docs.mulesoft.com/einstein-ai-connector/1.0/einstein-ai-connector-reference) - [Einstein AI - Additional Configuration Information](https://docs.mulesoft.com/einstein-ai-connector/1.0/einstein-ai-additional-config) - [Salesforce Help](https://help.salesforce.com) --- product: Einstein AI Connector version: 1.1 --- # Using Anypoint Code Builder to Configure Einstein AI Connector 1.1 > For the full documentation index, see: https://docs.mulesoft.com/llms.txt Cloud IDE (Beta) is scheduled for retirement on August 31, 2026. August 30, 2026 is the last day you can access Cloud IDE (Beta). Download your projects to work from Desktop IDE. Learn more in [Migrate a Project from Cloud IDE to Desktop IDE](https://docs.mulesoft.com/anypoint-code-builder/int-import-mule-project#migrate-cloud-to-desktop). To use Anypoint Code Builder to configure a connector or module, create a basic integration project in Anypoint Code Builder, add connectors and other components to your Mule application to process your business logic, and configure the attributes. ## Before You Begin Before creating an integration project, you must: - [Set up and access the Anypoint Code Builder web or desktop IDE](https://docs.mulesoft.com/anypoint-code-builder/start-acb) - Have credentials to access the connector’s API - Ensure that the Visual Studio Code Extension Pack for Java is installed. To use this connector, you must be familiar with: - The connector’s API - Anypoint Connectors - Mule runtime engine (Mule) ## Create a New Integration Project To create a new integration project: 1. In the activity bar of the IDE, click the ![Anypoint Code Builder icon](/mulesoft/current/en-us/connectors/_images/acb-icon-ms-logo.png) (**Anypoint Code Builder**) icon. 2. From **Quick Actions**, click **Develop an Integration**: ![Develop an Integration link highlighted in the Getting started section](/mulesoft/current/en-us/anypoint-code-builder/_images/develop-integration-option-mat.png) 3. Complete the following in the **Develop an Integration** form:
AttributeValue

Project Name

Unique name for your project.

This name is used as the title and name of the integration project file. For example, if the project name is "Salesforce Integration," the project file name is salesforce-integration.

Project Location

Your home directory or another directory you create. Click Browse to select a different directory for the integration project.

Don’t create the project within another project directory.

4. Select the type of project to create by selecting either the **Empty Project** or **Template or Example** card. 5. Select the **Mule runtime** and **Java Version** for your app. 6. Click **Create Project**. ## Add Components to Your Project Add components to your integration project to build a flow: 1. In the **Explorer** view, open the XML file for your project, such as `my-project-name.xml`. 2. Select **Build a Flow** from the start card to create an empty flow: ![Anypoint Code Builder canvas with starting cards with the options to start from scratch, build a flow, or build a subflow](/mulesoft/current/en-us/connectors/_images/acb-build-flow.png) 3. Change the name of the flow: 1. Click **Flow**. 2. Click the edit icon. ![Arrow pointing to the flow name edit pencil icon](/mulesoft/current/en-us/connectors/_images/acb-change-flow-name.png) 3. Enter the flow name, and click the checkmark. 4. In the canvas UI, click the ![Add component icon](/mulesoft/current/en-us/anypoint-code-builder/_images/icon-plus.png) (**Add component**) icon. 5. In the **Add Component** panel, search for and select your component from the results. The following example shows the **Listener** component from the **HTTP** search results: ![Listener component highlighted in the Add Component section](/mulesoft/current/en-us/anypoint-code-builder/_images/main-tutorial-add-first-listener.png) The configuration XML file now includes the XML for the HTTP Listener into the `` element, for example: ```XML ``` ## Configure the Trigger For the Flow A trigger (source) starts the flow when specified conditions are met. If a connector has its own associated sources, you can use a connector-specific trigger to initiate the flow. Each connector trigger has a unique configuration. You can configure the following sources for this connector: - **HTTP > Listener** Initiates a flow each time it receives a request on the configured host and port - **Scheduler** Initiates a flow when a time-based condition is met For example, to configure an HTTP Listener trigger, follow these steps: 1. Click the **Listener** component on the canvas UI. 2. (Optional) Click the edit icon to change the name of the **Listener** component. 3. (Optional) If you created a configuration file for the connector, select it. 4. In the **General** tab, in the **Path** field, enter the relative path for the path set in the HTTP configuration element. See [Configure Paths](https://docs.mulesoft.com/http-connector/latest/http-listener-ref#configure-paths). 5. Select the **Advanced** tab to configure the following attributes:
AttributeDescriptionRequired

Allowed methods

To allow all HTTP methods (default), do not define this attribute. To restrict certain methods, specify all allowed HTTP methods, for example, GET, POST, as a comma-separated list.

No

Response streaming mode

Whether to use streaming when the response is sent.

No

Output MIME type

MIME type of the payload that this component outputs.

No

Parameters

Appends a key-value pair for a reader property to the value of the Output MIME attribute. Multiple key-value pairs are allowed.

No

Output encoding

Encoding of the payload that this component outputs.

No

Streaming Strategy

Configures the way data streams are consumed in Mule apps.

No

Primary node only

Select this option to execute the Listener trigger on the primary node only when running in a cluster.

No

Redelivery policy

Configures the redelivery policy for executing requests that generate errors. You can add a redelivery policy to any source in a flow.

No

Reconnection strategy

When an operation in a Mule application fails to connect to an external server, the default behavior is for the operation to fail immediately and return a connectivity error. You can modify the default behavior by configuring the reconnection strategy for the operation.

No

Response

See HTTP Response Attributes.

No

Error Response

HTTP error response returns a status code for the error.

No

Body

Body of the error message.

No

Headers

Headers to include in the error message.

No

Status code

Status code of the error response, for example, 500.

No

Reason phrase

Reason for the error, for example, Gateway Timeout or Internal Server Error.

No

## Add the Connector to Your Integration Project 1. In the Explorer view, open the configuration XML file for your project, such as `my-project-name.xml`. 2. Click the ![Show Mule graphical mode icon](/mulesoft/current/en-us/anypoint-code-builder/_images/icon-tree-view.png) (**Show Mule graphical mode**) icon in the activity bar to open the canvas UI if it doesn’t open automatically. 3. Add the connector the same way you added other components from the canvas UI: 1. In the canvas UI, click the ![Add component icon](/mulesoft/current/en-us/anypoint-code-builder/_images/icon-plus.png) (**Add component**) icon. 2. In the **Add Component** panel, click **Connectors**. 4. Click the ![Search in Exchange icon](/mulesoft/current/en-us/anypoint-code-builder/_images/icon-search-exchange.png) (**Search in Exchange**) toggle: ![Search in Exchange toggle](/mulesoft/current/en-us/anypoint-code-builder/_images/int-connector-search-exchange.png) 5. Enter `einstein ai` in the search box. 6. Select the connector to add it to your project. Adding a connector to an integration project doesn’t make that connector available to other projects in your Anypoint Code Builder workspace. ## Add a Global Configuration 1. In the configuration XML, place your cursor before the `` element and type `einstein-ai`. Ensure that the cursor is not inside the `` element. 2. Select the `ms-einstein-ai:config` snippet: The snippet adds the following code: ```xml ``` 3. Add the attributes to complete the configuration, for example: ```xml ``` This example shows a flow named "Define\_Prompt" with two global elements defined (`http:listener-config` and `ms-einstein-ai:config`): ```xml ``` ## Example Customer Feedback Flow This example flow is designed to handle customer feedback analysis and responses using the Einstein AI service. In the first route of the scatter-gather component, the flow defines a prompt template for an agent to analyze customer feedback provided in a dataset. If the feedback is negative, the agent is instructed to open a service case and apologize to the customer. In the second route of the scatter-gather component, the flow defines a chat answer prompt for interacting with the Einstein AI service. ![A flow with a Tranform component, a scatter-gather component, and two routes](/mulesoft/current/en-us/einstein-ai-connector/1.1/_images/einstein-ai-example-flow-acb.png) ## Configure Additional Connector Fields After you configure a global element for the connector, configure the other required fields. The required fields vary depending on which connector actions you use. For more information about configuring Einstein AI Connector actions, see [Einstein AI Connector - Additional Configuration Information](https://docs.mulesoft.com/einstein-ai-connector/1.1/einstein-ai-additional-config). ## See Also - [Introduction to Anypoint Connectors](https://docs.mulesoft.com/connectors/introduction/introduction-to-anypoint-connectors) - [Einstein AI Connector Reference](https://docs.mulesoft.com/einstein-ai-connector/1.1/einstein-ai-connector-reference) - [Einstein AI - Additional Configuration Information](https://docs.mulesoft.com/einstein-ai-connector/1.1/einstein-ai-additional-config) - [Salesforce Help](https://help.salesforce.com) --- product: Einstein AI Connector version: 1.2 --- # Using Anypoint Code Builder to Configure Einstein AI Connector 1.2 > For the full documentation index, see: https://docs.mulesoft.com/llms.txt Cloud IDE (Beta) is scheduled for retirement on August 31, 2026. August 30, 2026 is the last day you can access Cloud IDE (Beta). Download your projects to work from Desktop IDE. Learn more in [Migrate a Project from Cloud IDE to Desktop IDE](https://docs.mulesoft.com/anypoint-code-builder/int-import-mule-project#migrate-cloud-to-desktop). To use Anypoint Code Builder to configure a connector or module, create a basic integration project in Anypoint Code Builder, add connectors and other components to your Mule application to process your business logic, and configure the attributes. ## Before You Begin Before creating an integration project, you must: - [Set up and access the Anypoint Code Builder web or desktop IDE](https://docs.mulesoft.com/anypoint-code-builder/start-acb) - Have credentials to access the connector’s API - Ensure that the Visual Studio Code Extension Pack for Java is installed. To use this connector, you must be familiar with: - The connector’s API - Anypoint Connectors - Mule runtime engine (Mule) ## Create a New Integration Project To create a new integration project: 1. In the activity bar of the IDE, click the ![Anypoint Code Builder icon](/mulesoft/current/en-us/connectors/_images/acb-icon-ms-logo.png) (**Anypoint Code Builder**) icon. 2. From **Quick Actions**, click **Develop an Integration**: ![Develop an Integration link highlighted in the Getting started section](/mulesoft/current/en-us/anypoint-code-builder/_images/develop-integration-option-mat.png) 3. Complete the following in the **Develop an Integration** form:
AttributeValue

Project Name

Unique name for your project.

This name is used as the title and name of the integration project file. For example, if the project name is "Salesforce Integration," the project file name is salesforce-integration.

Project Location

Your home directory or another directory you create. Click Browse to select a different directory for the integration project.

Don’t create the project within another project directory.

4. Select the type of project to create by selecting either the **Empty Project** or **Template or Example** card. 5. Select the **Mule runtime** and **Java Version** for your app. 6. Click **Create Project**. ## Add Components to Your Project Add components to your integration project to build a flow: 1. In the **Explorer** view, open the XML file for your project, such as `my-project-name.xml`. 2. Select **Build a Flow** from the start card to create an empty flow: ![Anypoint Code Builder canvas with starting cards with the options to start from scratch, build a flow, or build a subflow](/mulesoft/current/en-us/connectors/_images/acb-build-flow.png) 3. Change the name of the flow: 1. Click **Flow**. 2. Click the edit icon. ![Arrow pointing to the flow name edit pencil icon](/mulesoft/current/en-us/connectors/_images/acb-change-flow-name.png) 3. Enter the flow name, and click the checkmark. 4. In the canvas UI, click the ![Add component icon](/mulesoft/current/en-us/anypoint-code-builder/_images/icon-plus.png) (**Add component**) icon. 5. In the **Add Component** panel, search for and select your component from the results. The following example shows the **Listener** component from the **HTTP** search results: ![Listener component highlighted in the Add Component section](/mulesoft/current/en-us/anypoint-code-builder/_images/main-tutorial-add-first-listener.png) The configuration XML file now includes the XML for the HTTP Listener into the `` element, for example: ```XML ``` ## Configure the Trigger For the Flow A trigger (source) starts the flow when specified conditions are met. If a connector has its own associated sources, you can use a connector-specific trigger to initiate the flow. Each connector trigger has a unique configuration. You can configure the following sources for this connector: - **HTTP > Listener** Initiates a flow each time it receives a request on the configured host and port - **Scheduler** Initiates a flow when a time-based condition is met For example, to configure an HTTP Listener trigger, follow these steps: 1. Click the **Listener** component on the canvas UI. 2. (Optional) Click the edit icon to change the name of the **Listener** component. 3. (Optional) If you created a configuration file for the connector, select it. 4. In the **General** tab, in the **Path** field, enter the relative path for the path set in the HTTP configuration element. See [Configure Paths](https://docs.mulesoft.com/http-connector/latest/http-listener-ref#configure-paths). 5. Select the **Advanced** tab to configure the following attributes:
AttributeDescriptionRequired

Allowed methods

To allow all HTTP methods (default), do not define this attribute. To restrict certain methods, specify all allowed HTTP methods, for example, GET, POST, as a comma-separated list.

No

Response streaming mode

Whether to use streaming when the response is sent.

No

Output MIME type

MIME type of the payload that this component outputs.

No

Parameters

Appends a key-value pair for a reader property to the value of the Output MIME attribute. Multiple key-value pairs are allowed.

No

Output encoding

Encoding of the payload that this component outputs.

No

Streaming Strategy

Configures the way data streams are consumed in Mule apps.

No

Primary node only

Select this option to execute the Listener trigger on the primary node only when running in a cluster.

No

Redelivery policy

Configures the redelivery policy for executing requests that generate errors. You can add a redelivery policy to any source in a flow.

No

Reconnection strategy

When an operation in a Mule application fails to connect to an external server, the default behavior is for the operation to fail immediately and return a connectivity error. You can modify the default behavior by configuring the reconnection strategy for the operation.

No

Response

See HTTP Response Attributes.

No

Error Response

HTTP error response returns a status code for the error.

No

Body

Body of the error message.

No

Headers

Headers to include in the error message.

No

Status code

Status code of the error response, for example, 500.

No

Reason phrase

Reason for the error, for example, Gateway Timeout or Internal Server Error.

No

## Add the Connector to Your Integration Project 1. In the Explorer view, open the configuration XML file for your project, such as `my-project-name.xml`. 2. Click the ![Show Mule graphical mode icon](/mulesoft/current/en-us/anypoint-code-builder/_images/icon-tree-view.png) (**Show Mule graphical mode**) icon in the activity bar to open the canvas UI if it doesn’t open automatically. 3. Add the connector the same way you added other components from the canvas UI: 1. In the canvas UI, click the ![Add component icon](/mulesoft/current/en-us/anypoint-code-builder/_images/icon-plus.png) (**Add component**) icon. 2. In the **Add Component** panel, click **Connectors**. 4. Click the ![Search in Exchange icon](/mulesoft/current/en-us/anypoint-code-builder/_images/icon-search-exchange.png) (**Search in Exchange**) toggle: ![Search in Exchange toggle](/mulesoft/current/en-us/anypoint-code-builder/_images/int-connector-search-exchange.png) 5. Enter `einstein ai` in the search box. 6. Select the connector to add it to your project. Adding a connector to an integration project doesn’t make that connector available to other projects in your Anypoint Code Builder workspace. ## Add a Global Configuration 1. In the configuration XML, place your cursor before the `` element and type `einstein-ai`. Ensure that the cursor is not inside the `` element. 2. Select the `ms-einstein-ai:config` snippet: The snippet adds the following code: ```xml ``` 3. Add the attributes to complete the configuration, for example: ```xml ``` This example shows a flow named "Define\_Prompt" with two global elements defined (`http:listener-config` and `ms-einstein-ai:config`): ```xml ``` ## Example Customer Feedback Flow This example flow is designed to handle customer feedback analysis and responses using the Einstein AI service. In the first route of the scatter-gather component, the flow defines a prompt template for an agent to analyze customer feedback provided in a dataset. If the feedback is negative, the agent is instructed to open a service case and apologize to the customer. In the second route of the scatter-gather component, the flow defines a chat answer prompt for interacting with the Einstein AI service. ![A flow with a Tranform component, a scatter-gather component, and two routes](/mulesoft/current/en-us/einstein-ai-connector/1.2/_images/einstein-ai-example-flow-acb.png) ## Configure Additional Connector Fields After you configure a global element for the connector, configure the other required fields. The required fields vary depending on which connector actions you use. For more information about configuring Einstein AI Connector actions, see [Einstein AI Connector - Additional Configuration Information](https://docs.mulesoft.com/einstein-ai-connector/1.2/einstein-ai-additional-config). ## See Also - [Introduction to Anypoint Connectors](https://docs.mulesoft.com/connectors/introduction/introduction-to-anypoint-connectors) - [Einstein AI Connector Reference](https://docs.mulesoft.com/einstein-ai-connector/1.2/einstein-ai-connector-reference) - [Einstein AI - Additional Configuration Information](https://docs.mulesoft.com/einstein-ai-connector/1.2/einstein-ai-additional-config) - [Salesforce Help](https://help.salesforce.com) --- product: Einstein AI Connector version: 2.0 is-latest-version: true --- # Using Anypoint Code Builder to Configure Einstein AI Connector 2.0 > For the full documentation index, see: https://docs.mulesoft.com/llms.txt Cloud IDE (Beta) is scheduled for retirement on August 31, 2026. August 30, 2026 is the last day you can access Cloud IDE (Beta). Download your projects to work from Desktop IDE. Learn more in [Migrate a Project from Cloud IDE to Desktop IDE](https://docs.mulesoft.com/anypoint-code-builder/int-import-mule-project#migrate-cloud-to-desktop). To use Anypoint Code Builder to configure a connector or module, create a basic integration project in Anypoint Code Builder, add connectors and other components to your Mule application to process your business logic, and configure the attributes. ## Before You Begin Before creating an integration project, you must: - [Set up and access the Anypoint Code Builder web or desktop IDE](https://docs.mulesoft.com/anypoint-code-builder/start-acb) - Have credentials to access the connector’s API - Ensure that the Visual Studio Code Extension Pack for Java is installed. To use this connector, you must be familiar with: - The connector’s API - Anypoint Connectors - Mule runtime engine (Mule) ## Create a New Integration Project To create a new integration project: 1. In the activity bar of the IDE, click the ![Anypoint Code Builder icon](/mulesoft/current/en-us/connectors/_images/acb-icon-ms-logo.png) (**Anypoint Code Builder**) icon. 2. From **Quick Actions**, click **Develop an Integration**: ![Develop an Integration link highlighted in the Getting started section](/mulesoft/current/en-us/anypoint-code-builder/_images/develop-integration-option-mat.png) 3. Complete the following in the **Develop an Integration** form:
AttributeValue

Project Name

Unique name for your project.

This name is used as the title and name of the integration project file. For example, if the project name is "Salesforce Integration," the project file name is salesforce-integration.

Project Location

Your home directory or another directory you create. Click Browse to select a different directory for the integration project.

Don’t create the project within another project directory.

4. Select the type of project to create by selecting either the **Empty Project** or **Template or Example** card. 5. Select the **Mule runtime** and **Java Version** for your app. 6. Click **Create Project**. ## Add Components to Your Project Add components to your integration project to build a flow: 1. In the **Explorer** view, open the XML file for your project, such as `my-project-name.xml`. 2. Select **Build a Flow** from the start card to create an empty flow: ![Anypoint Code Builder canvas with starting cards with the options to start from scratch, build a flow, or build a subflow](/mulesoft/current/en-us/connectors/_images/acb-build-flow.png) 3. Change the name of the flow: 1. Click **Flow**. 2. Click the edit icon. ![Arrow pointing to the flow name edit pencil icon](/mulesoft/current/en-us/connectors/_images/acb-change-flow-name.png) 3. Enter the flow name, and click the checkmark. 4. In the canvas UI, click the ![Add component icon](/mulesoft/current/en-us/anypoint-code-builder/_images/icon-plus.png) (**Add component**) icon. 5. In the **Add Component** panel, search for and select your component from the results. The following example shows the **Listener** component from the **HTTP** search results: ![Listener component highlighted in the Add Component section](/mulesoft/current/en-us/anypoint-code-builder/_images/main-tutorial-add-first-listener.png) The configuration XML file now includes the XML for the HTTP Listener into the `` element, for example: ```XML ``` ## Configure the Trigger For the Flow A trigger (source) starts the flow when specified conditions are met. If a connector has its own associated sources, you can use a connector-specific trigger to initiate the flow. Each connector trigger has a unique configuration. You can configure the following sources for this connector: - **HTTP > Listener** Initiates a flow each time it receives a request on the configured host and port - **Scheduler** Initiates a flow when a time-based condition is met For example, to configure an HTTP Listener trigger, follow these steps: 1. Click the **Listener** component on the canvas UI. 2. (Optional) Click the edit icon to change the name of the **Listener** component. 3. (Optional) If you created a configuration file for the connector, select it. 4. In the **General** tab, in the **Path** field, enter the relative path for the path set in the HTTP configuration element. See [Configure Paths](https://docs.mulesoft.com/http-connector/latest/http-listener-ref#configure-paths). 5. Select the **Advanced** tab to configure the following attributes:
AttributeDescriptionRequired

Allowed methods

To allow all HTTP methods (default), do not define this attribute. To restrict certain methods, specify all allowed HTTP methods, for example, GET, POST, as a comma-separated list.

No

Response streaming mode

Whether to use streaming when the response is sent.

No

Output MIME type

MIME type of the payload that this component outputs.

No

Parameters

Appends a key-value pair for a reader property to the value of the Output MIME attribute. Multiple key-value pairs are allowed.

No

Output encoding

Encoding of the payload that this component outputs.

No

Streaming Strategy

Configures the way data streams are consumed in Mule apps.

No

Primary node only

Select this option to execute the Listener trigger on the primary node only when running in a cluster.

No

Redelivery policy

Configures the redelivery policy for executing requests that generate errors. You can add a redelivery policy to any source in a flow.

No

Reconnection strategy

When an operation in a Mule application fails to connect to an external server, the default behavior is for the operation to fail immediately and return a connectivity error. You can modify the default behavior by configuring the reconnection strategy for the operation.

No

Response

See HTTP Response Attributes.

No

Error Response

HTTP error response returns a status code for the error.

No

Body

Body of the error message.

No

Headers

Headers to include in the error message.

No

Status code

Status code of the error response, for example, 500.

No

Reason phrase

Reason for the error, for example, Gateway Timeout or Internal Server Error.

No

## Add the Connector to Your Integration Project 1. In the Explorer view, open the configuration XML file for your project, such as `my-project-name.xml`. 2. Click the ![Show Mule graphical mode icon](/mulesoft/current/en-us/anypoint-code-builder/_images/icon-tree-view.png) (**Show Mule graphical mode**) icon in the activity bar to open the canvas UI if it doesn’t open automatically. 3. Add the connector the same way you added other components from the canvas UI: 1. In the canvas UI, click the ![Add component icon](/mulesoft/current/en-us/anypoint-code-builder/_images/icon-plus.png) (**Add component**) icon. 2. In the **Add Component** panel, click **Connectors**. 4. Click the ![Search in Exchange icon](/mulesoft/current/en-us/anypoint-code-builder/_images/icon-search-exchange.png) (**Search in Exchange**) toggle: ![Search in Exchange toggle](/mulesoft/current/en-us/anypoint-code-builder/_images/int-connector-search-exchange.png) 5. Enter `einstein ai` in the search box. 6. Select the connector to add it to your project. Adding a connector to an integration project doesn’t make that connector available to other projects in your Anypoint Code Builder workspace. ## Add a Global Configuration 1. In the configuration XML, place your cursor before the `` element and type `einstein-ai`. Ensure that the cursor is not inside the `` element. 2. Select the `ms-einstein-ai:config` snippet: The snippet adds the following code: ```xml ``` 3. Add the attributes to complete the configuration, for example: ```xml ``` This example shows a flow named "Define\_Prompt" with two global elements defined (`http:listener-config` and `ms-einstein-ai:config`): ```xml ``` ## Example Customer Feedback Flow This example flow is designed to handle customer feedback analysis and responses using the Einstein AI service. In the first route of the scatter-gather component, the flow defines a prompt template for an agent to analyze customer feedback provided in a dataset. If the feedback is negative, the agent is instructed to open a service case and apologize to the customer. In the second route of the scatter-gather component, the flow defines a chat answer prompt for interacting with the Einstein AI service. ![A flow with a Tranform component, a scatter-gather component, and two routes](/mulesoft/current/en-us/einstein-ai-connector/latest/_images/einstein-ai-example-flow-acb.png) ## Configure Additional Connector Fields After you configure a global element for the connector, configure the other required fields. The required fields vary depending on which connector actions you use. For more information about configuring Einstein AI Connector actions, see [Einstein AI Connector - Additional Configuration Information](https://docs.mulesoft.com/einstein-ai-connector/latest/einstein-ai-additional-config). ## See Also - [Introduction to Anypoint Connectors](https://docs.mulesoft.com/connectors/introduction/introduction-to-anypoint-connectors) - [Einstein AI Connector Reference](https://docs.mulesoft.com/einstein-ai-connector/latest/einstein-ai-connector-reference) - [Einstein AI - Additional Configuration Information](https://docs.mulesoft.com/einstein-ai-connector/latest/einstein-ai-additional-config) - [Salesforce Help](https://help.salesforce.com) --- product: Einstein AI Connector version: 1.0 --- # Using Anypoint Studio to Configure Einstein AI Connector 1.0 > For the full documentation index, see: https://docs.mulesoft.com/llms.txt Anypoint Studio (Studio) editors help you design and update your Mule applications, properties, and configuration files. To add and configure a connector in Studio: 1. [Create a Mule project](#create-mule-project). 2. [Add the connector to your Mule project](#add-connector-to-project). 3. [Configure a source for the connector’s flow](#configure-source). 4. [Add a connector operation to the flow](#add-connector-operation). 5. [Configure a global element for the connector](#configure-global-element). 6. [Configure the other connector fields](#configure-other-fields). When you run the connector, you can view the app log to check for problems in real time, as described in [View the App Log](#view-app-log). If you are new to configuring connectors in Studio, see [Using Anypoint Studio to Configure a Connector](https://docs.mulesoft.com/connectors/introduction/intro-config-use-studio). If, after reading this topic, you need additional information about the connector fields, see the [Einstein AI Connector Reference](https://docs.mulesoft.com/einstein-ai-connector/1.0/einstein-ai-connector-reference). ## Create a Mule Project In Studio, create a new Mule project in which to add and configure Anypoint Connector for Einstein AI (Einstein AI Connector): 1. In Studio, select **File > New > Mule Project**. 2. Enter a name for your Mule project and click **Finish**. ## Add the Connector to Your Mule Project Add Einstein AI Connector to your Mule project to automatically populate the XML code with the connector’s namespace and schema location and add the required dependencies to the project’s `pom.xml` file: 1. In **Mule Palette**, click **(X) Search in Exchange**. 2. In **Add Dependencies to Project**, type `einstein ai` in the search field. 3. Click **Einstein AI Connector** in **Available modules**. 4. Click **Add**. 5. Click **Finish**. The connector appears in the **Mule Palette**. ![Einstein AI Connector highlighted in the Mule Palette with a list of the connector’s operations](/mulesoft/current/en-us/einstein-ai-connector/1.0/_images/einstein-ai-palette-operations.png) Adding a connector to a Mule project in Studio doesn’t make that connector available to other projects in your Studio workspace. ## Configure a Source A source initiates a flow when a specified condition is met. You can configure one of these sources to use with Einstein AI Connector: - **HTTP > Listener** Initiates a flow each time it receives a request on the configured host and port - **Scheduler** Initiates a flow when a time-based condition is met For example, to configure an **HTTP > Listener** source, follow these steps: 1. In **Mule Palette**, select **HTTP > Listener**. 2. Drag **Listener** to the Studio canvas. 3. On the **Listener** configuration screen, optionally change the value of the **Display Name** field. 4. Specify a value for the **Path** field. 5. Click the plus sign (**+**) next to the **Connector configuration** field to configure a global element that can be used by all instances of the **HTTP > Listener** source in the app. 6. On the **General** tab, specify the connection information for the connector. 7. On the **TLS** tab, optionally specify the TLS information for the connector. 8. On the **Advanced** tab, optionally specify reconnection information, including a reconnection strategy. 9. Click **Test Connection** to confirm that Mule can connect with the specified server. 10. Click **OK**. ## Add a Connector Operation to the Flow When you add a connector operation to your flow, you are specifying an action for that connector to perform. To add an operation for Einstein AI Connector, follow these steps: 1. In **Mule Palette**, select **Einstein AI** and then select the operation to add. 2. Drag the operation onto the Studio canvas, next to the source. ## Configure a Global Element for the Connector When you configure a connector, configure a global element that all instances of that connector in the app can use. Configuring a global element requires you to provide the authentication credentials that the connector requires to access the target system. You can reference a configuration file that contains ANT-style property placeholders (recommended), or you can enter your authorization credentials in the global configuration properties. For information about the benefits of using property placeholders and how to configure them, see [Anypoint Connector Configuration](https://docs.mulesoft.com/connectors/introduction/intro-connector-configuration-overview). To configure the global element for Einstein AI Connector, follow these steps: 1. Select the operation in the Studio canvas. 2. On the properties screen for the operation, click the Add (**+**) icon to access the global element configuration fields. 3. In the **Global Elements Properties > General** tab, enter: - **Client Id** The OAuth public client ID as registered with the service provider. - **Client secret** The OAuth client secret that corresponds to the client ID. - **Token URL** Service provider’s token endpoint URL. - **Scopes** The OAuth scopes to request during the OAuth dance. 4. Click **OK**. ## Configure Additional Connector Fields After you configure a global element for the connector, configure the other required fields. The required fields vary depending on which connector operation you use. ## View the App Log To check for problems, you can view the app log as follows: - If you’re running the app from Anypoint Platform, the app log output is visible on the Anypoint Studio console window. - If you’re running the app using Mule from the command line, the app log output is visible in your operating system console. Unless the log file path is customized in the app’s log file (`log4j2.xml`), you can also view the app log in the default location `MULE_HOME/logs/.log`. You can configure the location of the log path in the app log file `log4j2.xml`. ## See Also - [Introduction to Anypoint Connectors](https://docs.mulesoft.com/connectors/introduction/introduction-to-anypoint-connectors) - [Using Studio to Configure a Connector](https://docs.mulesoft.com/connectors/introduction/intro-config-use-studio) - [Einstein AI Connector Reference](https://docs.mulesoft.com/einstein-ai-connector/1.0/einstein-ai-connector-reference) - [Einstein AI - Additional Configuration Information](https://docs.mulesoft.com/einstein-ai-connector/1.0/einstein-ai-additional-config) - [Salesforce Help](https://help.salesforce.com) --- product: Einstein AI Connector version: 1.1 --- # Using Anypoint Studio to Configure Einstein AI Connector 1.1 > For the full documentation index, see: https://docs.mulesoft.com/llms.txt Anypoint Studio (Studio) editors help you design and update your Mule applications, properties, and configuration files. To add and configure a connector in Studio: 1. [Create a Mule project](#create-mule-project). 2. [Add the connector to your Mule project](#add-connector-to-project). 3. [Configure a source for the connector’s flow](#configure-source). 4. [Add a connector operation to the flow](#add-connector-operation). 5. [Configure a global element for the connector](#configure-global-element). 6. [Configure the other connector fields](#configure-other-fields). When you run the connector, you can view the app log to check for problems in real time, as described in [View the App Log](#view-app-log). If you are new to configuring connectors in Studio, see [Using Anypoint Studio to Configure a Connector](https://docs.mulesoft.com/connectors/introduction/intro-config-use-studio). If, after reading this topic, you need additional information about the connector fields, see the [Einstein AI Connector Reference](https://docs.mulesoft.com/einstein-ai-connector/1.1/einstein-ai-connector-reference). ## Create a Mule Project In Studio, create a new Mule project in which to add and configure Anypoint Connector for Einstein AI (Einstein AI Connector): 1. In Studio, select **File > New > Mule Project**. 2. Enter a name for your Mule project and click **Finish**. ## Add the Connector to Your Mule Project Add Einstein AI Connector to your Mule project to automatically populate the XML code with the connector’s namespace and schema location and add the required dependencies to the project’s `pom.xml` file: 1. In **Mule Palette**, click **(X) Search in Exchange**. 2. In **Add Dependencies to Project**, type `einstein ai` in the search field. 3. Click **Einstein AI Connector** in **Available modules**. 4. Click **Add**. 5. Click **Finish**. The connector appears in the **Mule Palette**. ![Einstein AI Connector highlighted in the Mule Palette with a list of the connector’s operations](/mulesoft/current/en-us/einstein-ai-connector/1.1/_images/einstein-ai-palette-operations.png) Adding a connector to a Mule project in Studio doesn’t make that connector available to other projects in your Studio workspace. ## Configure a Source A source initiates a flow when a specified condition is met. You can configure one of these sources to use with Einstein AI Connector: - **HTTP > Listener** Initiates a flow each time it receives a request on the configured host and port - **Scheduler** Initiates a flow when a time-based condition is met For example, to configure an **HTTP > Listener** source, follow these steps: 1. In **Mule Palette**, select **HTTP > Listener**. 2. Drag **Listener** to the Studio canvas. 3. On the **Listener** configuration screen, optionally change the value of the **Display Name** field. 4. Specify a value for the **Path** field. 5. Click the plus sign (**+**) next to the **Connector configuration** field to configure a global element that can be used by all instances of the **HTTP > Listener** source in the app. 6. On the **General** tab, specify the connection information for the connector. 7. On the **TLS** tab, optionally specify the TLS information for the connector. 8. On the **Advanced** tab, optionally specify reconnection information, including a reconnection strategy. 9. Click **Test Connection** to confirm that Mule can connect with the specified server. 10. Click **OK**. ## Add a Connector Operation to the Flow When you add a connector operation to your flow, you are specifying an action for that connector to perform. To add an operation for Einstein AI Connector, follow these steps: 1. In **Mule Palette**, select **Einstein AI** and then select the operation to add. 2. Drag the operation onto the Studio canvas, next to the source. ## Configure a Global Element for the Connector When you configure a connector, configure a global element that all instances of that connector in the app can use. Configuring a global element requires you to provide the authentication credentials that the connector requires to access the target system. You can reference a configuration file that contains ANT-style property placeholders (recommended), or you can enter your authorization credentials in the global configuration properties. For information about the benefits of using property placeholders and how to configure them, see [Anypoint Connector Configuration](https://docs.mulesoft.com/connectors/introduction/intro-connector-configuration-overview). To configure the global element for Einstein AI Connector, follow these steps: 1. Select the operation in the Studio canvas. 2. On the properties screen for the operation, click the Add (**+**) icon to access the global element configuration fields. 3. In the **Global Elements Properties > General** tab, enter: - **Client Id** The OAuth public client ID as registered with the service provider. - **Client secret** The OAuth client secret that corresponds to the client ID. - **Token URL** Service provider’s token endpoint URL. - **Scopes** The OAuth scopes to request during the OAuth dance. 4. Click **OK**. ## Configure Additional Connector Fields After you configure a global element for the connector, configure the other required fields. The required fields vary depending on which connector operation you use. ## View the App Log To check for problems, you can view the app log as follows: - If you’re running the app from Anypoint Platform, the app log output is visible on the Anypoint Studio console window. - If you’re running the app using Mule from the command line, the app log output is visible in your operating system console. Unless the log file path is customized in the app’s log file (`log4j2.xml`), you can also view the app log in the default location `MULE_HOME/logs/.log`. You can configure the location of the log path in the app log file `log4j2.xml`. ## See Also - [Introduction to Anypoint Connectors](https://docs.mulesoft.com/connectors/introduction/introduction-to-anypoint-connectors) - [Using Studio to Configure a Connector](https://docs.mulesoft.com/connectors/introduction/intro-config-use-studio) - [Einstein AI Connector Reference](https://docs.mulesoft.com/einstein-ai-connector/1.1/einstein-ai-connector-reference) - [Einstein AI - Additional Configuration Information](https://docs.mulesoft.com/einstein-ai-connector/1.1/einstein-ai-additional-config) - [Salesforce Help](https://help.salesforce.com) --- product: Einstein AI Connector version: 1.2 --- # Using Anypoint Studio to Configure Einstein AI Connector 1.2 > For the full documentation index, see: https://docs.mulesoft.com/llms.txt Anypoint Studio (Studio) editors help you design and update your Mule applications, properties, and configuration files. To add and configure a connector in Studio: 1. [Create a Mule project](#create-mule-project). 2. [Add the connector to your Mule project](#add-connector-to-project). 3. [Configure a source for the connector’s flow](#configure-source). 4. [Add a connector operation to the flow](#add-connector-operation). 5. [Configure a global element for the connector](#configure-global-element). 6. [Configure the other connector fields](#configure-other-fields). When you run the connector, you can view the app log to check for problems in real time, as described in [View the App Log](#view-app-log). If you are new to configuring connectors in Studio, see [Using Anypoint Studio to Configure a Connector](https://docs.mulesoft.com/connectors/introduction/intro-config-use-studio). If, after reading this topic, you need additional information about the connector fields, see the [Einstein AI Connector Reference](https://docs.mulesoft.com/einstein-ai-connector/1.2/einstein-ai-connector-reference). ## Create a Mule Project In Studio, create a new Mule project in which to add and configure Anypoint Connector for Einstein AI (Einstein AI Connector): 1. In Studio, select **File > New > Mule Project**. 2. Enter a name for your Mule project and click **Finish**. ## Add the Connector to Your Mule Project Add Einstein AI Connector to your Mule project to automatically populate the XML code with the connector’s namespace and schema location and add the required dependencies to the project’s `pom.xml` file: 1. In **Mule Palette**, click **(X) Search in Exchange**. 2. In **Add Dependencies to Project**, type `einstein ai` in the search field. 3. Click **Einstein AI Connector** in **Available modules**. 4. Click **Add**. 5. Click **Finish**. The connector appears in the **Mule Palette**. ![Einstein AI Connector highlighted in the Mule Palette with a list of the connector’s operations](/mulesoft/current/en-us/einstein-ai-connector/1.2/_images/einstein-ai-palette-operations.png) Adding a connector to a Mule project in Studio doesn’t make that connector available to other projects in your Studio workspace. ## Configure a Source A source initiates a flow when a specified condition is met. You can configure one of these sources to use with Einstein AI Connector: - **HTTP > Listener** Initiates a flow each time it receives a request on the configured host and port - **Scheduler** Initiates a flow when a time-based condition is met For example, to configure an **HTTP > Listener** source, follow these steps: 1. In **Mule Palette**, select **HTTP > Listener**. 2. Drag **Listener** to the Studio canvas. 3. On the **Listener** configuration screen, optionally change the value of the **Display Name** field. 4. Specify a value for the **Path** field. 5. Click the plus sign (**+**) next to the **Connector configuration** field to configure a global element that can be used by all instances of the **HTTP > Listener** source in the app. 6. On the **General** tab, specify the connection information for the connector. 7. On the **TLS** tab, optionally specify the TLS information for the connector. 8. On the **Advanced** tab, optionally specify reconnection information, including a reconnection strategy. 9. Click **Test Connection** to confirm that Mule can connect with the specified server. 10. Click **OK**. ## Add a Connector Operation to the Flow When you add a connector operation to your flow, you are specifying an action for that connector to perform. To add an operation for Einstein AI Connector, follow these steps: 1. In **Mule Palette**, select **Einstein AI** and then select the operation to add. 2. Drag the operation onto the Studio canvas, next to the source. ## Configure a Global Element for the Connector When you configure a connector, configure a global element that all instances of that connector in the app can use. Configuring a global element requires you to provide the authentication credentials that the connector requires to access the target system. You can reference a configuration file that contains ANT-style property placeholders (recommended), or you can enter your authorization credentials in the global configuration properties. For information about the benefits of using property placeholders and how to configure them, see [Anypoint Connector Configuration](https://docs.mulesoft.com/connectors/introduction/intro-connector-configuration-overview). To configure the global element for Einstein AI Connector, follow these steps: 1. Select the operation in the Studio canvas. 2. On the properties screen for the operation, click the Add (**+**) icon to access the global element configuration fields. 3. In the **Global Elements Properties > General** tab, enter: - **Client Id** The OAuth public client ID as registered with the service provider. - **Client secret** The OAuth client secret that corresponds to the client ID. - **Token URL** Service provider’s token endpoint URL. - **Scopes** The OAuth scopes to request during the OAuth dance. 4. Click **OK**. ## Configure Additional Connector Fields After you configure a global element for the connector, configure the other required fields. The required fields vary depending on which connector operation you use. ## View the App Log To check for problems, you can view the app log as follows: - If you’re running the app from Anypoint Platform, the app log output is visible on the Anypoint Studio console window. - If you’re running the app using Mule from the command line, the app log output is visible in your operating system console. Unless the log file path is customized in the app’s log file (`log4j2.xml`), you can also view the app log in the default location `MULE_HOME/logs/.log`. You can configure the location of the log path in the app log file `log4j2.xml`. ## See Also - [Introduction to Anypoint Connectors](https://docs.mulesoft.com/connectors/introduction/introduction-to-anypoint-connectors) - [Using Studio to Configure a Connector](https://docs.mulesoft.com/connectors/introduction/intro-config-use-studio) - [Einstein AI Connector Reference](https://docs.mulesoft.com/einstein-ai-connector/1.2/einstein-ai-connector-reference) - [Einstein AI - Additional Configuration Information](https://docs.mulesoft.com/einstein-ai-connector/1.2/einstein-ai-additional-config) - [Salesforce Help](https://help.salesforce.com) --- product: Einstein AI Connector version: 2.0 is-latest-version: true --- # Using Anypoint Studio to Configure Einstein AI Connector 2.0 > For the full documentation index, see: https://docs.mulesoft.com/llms.txt Anypoint Studio (Studio) editors help you design and update your Mule applications, properties, and configuration files. To add and configure a connector in Studio: 1. [Create a Mule project](#create-mule-project). 2. [Add the connector to your Mule project](#add-connector-to-project). 3. [Configure a source for the connector’s flow](#configure-source). 4. [Add a connector operation to the flow](#add-connector-operation). 5. [Configure a global element for the connector](#configure-global-element). 6. [Configure the other connector fields](#configure-other-fields). When you run the connector, you can view the app log to check for problems in real time, as described in [View the App Log](#view-app-log). If you are new to configuring connectors in Studio, see [Using Anypoint Studio to Configure a Connector](https://docs.mulesoft.com/connectors/introduction/intro-config-use-studio). If, after reading this topic, you need additional information about the connector fields, see the [Einstein AI Connector Reference](https://docs.mulesoft.com/einstein-ai-connector/latest/einstein-ai-connector-reference). ## Create a Mule Project In Studio, create a new Mule project in which to add and configure Anypoint Connector for Einstein AI (Einstein AI Connector): 1. In Studio, select **File > New > Mule Project**. 2. Enter a name for your Mule project and click **Finish**. ## Add the Connector to Your Mule Project Add Einstein AI Connector to your Mule project to automatically populate the XML code with the connector’s namespace and schema location and add the required dependencies to the project’s `pom.xml` file: 1. In **Mule Palette**, click **(X) Search in Exchange**. 2. In **Add Dependencies to Project**, type `einstein ai` in the search field. 3. Click **Einstein AI Connector** in **Available modules**. 4. Click **Add**. 5. Click **Finish**. The connector appears in the **Mule Palette**. ![Einstein AI Connector highlighted in the Mule Palette with a list of the connector’s operations](/mulesoft/current/en-us/einstein-ai-connector/latest/_images/einstein-ai-palette-operations.png) Adding a connector to a Mule project in Studio doesn’t make that connector available to other projects in your Studio workspace. ## Configure a Source A source initiates a flow when a specified condition is met. You can configure one of these sources to use with Einstein AI Connector: - **HTTP > Listener** Initiates a flow each time it receives a request on the configured host and port - **Scheduler** Initiates a flow when a time-based condition is met For example, to configure an **HTTP > Listener** source, follow these steps: 1. In **Mule Palette**, select **HTTP > Listener**. 2. Drag **Listener** to the Studio canvas. 3. On the **Listener** configuration screen, optionally change the value of the **Display Name** field. 4. Specify a value for the **Path** field. 5. Click the plus sign (**+**) next to the **Connector configuration** field to configure a global element that can be used by all instances of the **HTTP > Listener** source in the app. 6. On the **General** tab, specify the connection information for the connector. 7. On the **TLS** tab, optionally specify the TLS information for the connector. 8. On the **Advanced** tab, optionally specify reconnection information, including a reconnection strategy. 9. Click **Test Connection** to confirm that Mule can connect with the specified server. 10. Click **OK**. ## Add a Connector Operation to the Flow When you add a connector operation to your flow, you are specifying an action for that connector to perform. To add an operation for Einstein AI Connector, follow these steps: 1. In **Mule Palette**, select **Einstein AI** and then select the operation to add. 2. Drag the operation onto the Studio canvas, next to the source. ## Configure a Global Element for the Connector When you configure a connector, configure a global element that all instances of that connector in the app can use. Configuring a global element requires you to provide the authentication credentials that the connector requires to access the target system. You can reference a configuration file that contains ANT-style property placeholders (recommended), or you can enter your authorization credentials in the global configuration properties. For information about the benefits of using property placeholders and how to configure them, see [Anypoint Connector Configuration](https://docs.mulesoft.com/connectors/introduction/intro-connector-configuration-overview). To configure the global element for Einstein AI Connector, follow these steps: 1. Select the operation in the Studio canvas. 2. On the properties screen for the operation, click the Add (**+**) icon to access the global element configuration fields. 3. In the **Global Elements Properties > General** tab, select **OAuth Client Credentials**. 4. Enter: - **Client Id** The OAuth public client ID as registered with the service provider. - **Client secret** The OAuth client secret that corresponds to the client ID. - **Token URL** Service provider’s token endpoint URL. - **Scopes** The OAuth scopes to request during the OAuth dance. 5. Click **OK**. ## Configure Additional Connector Fields After you configure a global element for the connector, configure the other required fields. The required fields vary depending on which connector operation you use. ## View the App Log To check for problems, you can view the app log as follows: - If you’re running the app from Anypoint Platform, the app log output is visible on the Anypoint Studio console window. - If you’re running the app using Mule from the command line, the app log output is visible in your operating system console. Unless the log file path is customized in the app’s log file (`log4j2.xml`), you can also view the app log in the default location `MULE_HOME/logs/.log`. You can configure the location of the log path in the app log file `log4j2.xml`. ## See Also - [Introduction to Anypoint Connectors](https://docs.mulesoft.com/connectors/introduction/introduction-to-anypoint-connectors) - [Using Studio to Configure a Connector](https://docs.mulesoft.com/connectors/introduction/intro-config-use-studio) - [Einstein AI Connector Reference](https://docs.mulesoft.com/einstein-ai-connector/latest/einstein-ai-connector-reference) - [Einstein AI - Additional Configuration Information](https://docs.mulesoft.com/einstein-ai-connector/latest/einstein-ai-additional-config) - [Salesforce Help](https://help.salesforce.com)