# Salesforce Opportunity Bot Creation Guide

This is a detailed step‐by‐step guide to create Salesforce Opportunity Bot in ix Hello Studio Mode. This guide covers creating all required components with options and valid values for each field:&#x20;

### **Prerequisites**

Ensure you have access to a Salesforce account. To establish this connection, please follow the instructions in the prerequisite document.

**To create Salesforce account and to integrate it with iX Hello, kindly refer to** [**this**](/ixhc/connections/salesforce.md)&#x20;

1. Before commencing bot creation, ensure the following prerequisites are met:&#x20;

* Access to [iX Hello](https://bots.ixhello.com) Studio Mode.&#x20;
* Familiarity with basic iX Hello navigation.&#x20;
* To establish a Gen AI connection please follow [this](/ixhc/general/enterprise-connections/generative-ai.md)

2. Create a Custom App&#x20;

* On the right sidebar, click on the Apps->Custom Apps. Click on New Custom App. Here you can create your own assistant with a dedicated name, description, instructions, and configuration.&#x20;

<figure><img src="/files/PARFswIpHtGDsMfUTijL" alt="" width="563"><figcaption></figcaption></figure>

* Fields and their valid values include:&#x20;
  * Name: For example, Salesforce Opportunity Status (your chosen name).&#x20;
  * Custom App Type: Choose ‘Search’ from dropdown&#x20;
  * Category: Choose ‘Default’ from dropdown&#x20;
  * Put a tick mark on This is a Generative AI App and click on Save.&#x20;
* Click on the App name created above from ‘Custom Apps List’ to open it for further configuration&#x20;

<figure><img src="/files/PJ7nhwjk2YEwHlC0UQGt" alt="" width="563"><figcaption></figcaption></figure>

3. Creating a Data Source&#x20;

* Navigate to the Data Sources tab and click on Create New Data Source.&#x20;

<figure><img src="/files/keftT50KHeI8Etp7JlyZ" alt="" width="563"><figcaption></figcaption></figure>

* Fill in the fields as follows:&#x20;
  * Name: For example, GenAI DS.&#x20;
  * Integration Configuration: Select the option Generative AI applicable integration.&#x20;
  * Click Save.&#x20;

<figure><img src="/files/CaMHD2L7Oqw1CT7SBq6i" alt="" width="563"><figcaption></figcaption></figure>

* Click on Create New Data Source to create another DS&#x20;
* Fill in the fields as follows:&#x20;
  * Name: For Example, Salesforce DS&#x20;
  * Integration Configuration: Choose any available Salesforce Connection from dropdown or create a new one.&#x20;
  * Click Save&#x20;

<figure><img src="/files/9VhLX8YhHLhqexEsFCFU" alt="" width="563"><figcaption></figcaption></figure>

4. &#x20; Defining Methods to Fetch Data from Gen AI&#x20;

* Go to the Methods tab, select GenAI DS and click on Create New Method.&#x20;

<figure><img src="/files/FDr7vSStXKwgzypT1f0P" alt="" width="563"><figcaption></figcaption></figure>

* Enter the following details:&#x20;
  * Method Name: GenAIMethod&#x20;
  * Request Type: azure-chatcompletion-rag&#x20;
* Parameters:&#x20;
  * Model: gpt-4&#x20;
  * *Note: These intents ( CheckAccountName and OpportunitiesBriefing) are created based on how you set up your sales force.*
  * Sample System Message: Run CheckAccountNameIntent when the user provides the name of a Salesforce account. Run GetOpportunitiesBriefingIntent when the user provides the AccountID of an Salesforce account. &#x20;
  * userQuestion: {{UserInput}}&#x20;
  * sessionTime: 10&#x20;
  * OrganizationID: {{Context.OrganizationID}}&#x20;
  * EmployeeID: {{Context.EmployeeID}}&#x20;

<figure><img src="/files/ZsajM79WUADRcb0KEQXp" alt="" width="563"><figcaption></figcaption></figure>

* Result Type: ListofRecords&#x20;
* Record Limit: 10&#x20;

<figure><img src="/files/L6loFjEXjS7qXgrAFJ4l" alt="" width="563"><figcaption></figcaption></figure>

* Record JsonPath: $.choices\[0].message&#x20;
* Empty Result Template: Is there anything else, I can assist you with?&#x20;
* Record Template: {{content}}&#x20;
* Valid Result Template: {{Records}}&#x20;
* Click Save and then Test the method.&#x20;

<figure><img src="/files/4z1R2NFKnhFlz22KxYHA" alt="" width="563"><figcaption></figcaption></figure>

Click Save and then Test the method.&#x20;

<figure><img src="/files/2Vcag7iKOHuyyuaf2YTQ" alt="" width="563"><figcaption></figcaption></figure>

* Again, click on Create New Methods, select Salesforce DS&#x20;
* Enter the following details:&#x20;
  * Method Name: AccountNametoIDCheck&#x20;
  * RequestType: GetSOQLQueryResult&#x20;
  * SOQLQuery: SELECT Name, BillingCity, Id FROM Account Where Name LIKE '%{{AccName}}%'&#x20;

<figure><img src="/files/JCxf594Dj5cK75xPpK0B" alt="" width="563"><figcaption></figcaption></figure>

* ListOfRecords: 10&#x20;

<figure><img src="/files/sUzafF2PqMgEvjjwMVdi" alt="" width="563"><figcaption></figcaption></figure>

* Record JsonPath: $.\[\*]&#x20;
* Valid Result Template: {{Records}}&#x20;
* Record Template: \<B>Account Name: {{Name}}\</BR>AccountId: {{Id}}\</BR>Billing City: {{BillingCity}}\</B>&#x20;
* Empty Result Template: \<BR>Sorry, account name provided not found. \</BR>\<BR>How else can I help you?&#x20;
* Click Save and then Test the method.&#x20;

<figure><img src="/files/ZS5S2tphefs7LMKxjKRX" alt="" width="563"><figcaption></figcaption></figure>

<figure><img src="/files/Z1xtUh9GZhr8TAumf7jK" alt="" width="563"><figcaption></figcaption></figure>

* Again, click on Create New Methods, select Salesforce DS&#x20;
* Enter the following details:&#x20;
  * Method Name: GetOpportunitiesBriefing&#x20;
  * RequestType: GetSOQLQueryResult&#x20;
  * SOQLQuery: SELECT Name, Amount, StageName, CloseDate FROM Opportunity WHERE AccountId = '{{AccountId}}'&#x20;

<figure><img src="/files/NEoDynUFq32rGZKBA3kE" alt="" width="563"><figcaption></figcaption></figure>

* ListOfRecords: 100&#x20;

<figure><img src="/files/2LNU3bPB3dk5HSeMJTxI" alt="" width="563"><figcaption></figcaption></figure>

* Record JsonPath: $.\[\*]&#x20;
* Valid Result Template: {{Records}}&#x20;
* Record Template: Opportunity Name : {{Name}}, Amount : {{Amount}}, Stage : {{StageName}}, Close Date : {{CloseDate}}&#x20;
* Empty Result Template : \<BR>Sorry, account name provided not found.\</BR> \<BR>How else can I help you?&#x20;
* Click Save and then Test the method.&#x20;

<figure><img src="/files/J5Y28O41TKiqpQDbLRVr" alt="" width="563"><figcaption></figcaption></figure>

<figure><img src="/files/xkMTSukmwLtwqRtt90Cp" alt="" width="563"><figcaption></figcaption></figure>

5. Creating an Intent&#x20;

* Select the Intents tab and click on Create New Intent.&#x20;
* Fill in these fields:&#x20;
  * Name: ChatIntent&#x20;
  * Intent Type: Search&#x20;
  * Intent Action: Execute Method&#x20;
  * DataSource: GenAI DS&#x20;
  * DataSource Method: GenAIMethod&#x20;
  * Dialog Delegation Strategy: FallbackToSkill&#x20;
  * Select checkbox ’Set this intent as a fallback Intent.’&#x20;
  * Click Save

<figure><img src="/files/FTyJmt4qFGGRqBwgkz30" alt="" width="375"><figcaption></figcaption></figure>

* Again, click on Create New Intent&#x20;
* Fill in these fields:&#x20;
  * Name: CheckAccountNameIntent &#x20;
  * Intent Type: Search&#x20;
  * Intent Action: Execute Method&#x20;
  * DataSource: Salesforce DS&#x20;
  * DataSource Method: AccountNametoIDCheck &#x20;
  * Dialog Delegation Strategy: FallbackToSkill&#x20;
  * Click Save&#x20;

<figure><img src="/files/ymhqtOlhg6R4UxLocaai" alt="" width="375"><figcaption></figcaption></figure>

* Again, click on Create New Intent&#x20;
* Fill in these fields:&#x20;
  * Name: GetOpportunitiesBriefingIntent &#x20;
  * Intent Type: Search&#x20;
  * Intent Action: Execute Method&#x20;
  * DataSource: Salesforce DS&#x20;
  * DataSource Method: GetOpportunitiesBriefing &#x20;
  * Dialog Delegation Strategy: FallbackToSkill&#x20;
  * Click Save&#x20;

<figure><img src="/files/zziI353mMWPo93H0s9AO" alt="" width="375"><figcaption></figcaption></figure>

6. Setting up Slots&#x20;

* Navigate to the Slots tab,select ChatIntent from dropdown and click on Create New Slot.&#x20;

<figure><img src="/files/eG6yHh1m3OjmxKO9kFAW" alt="" width="563"><figcaption></figcaption></figure>

* Enter the details:&#x20;
  * Name: UserInput&#x20;
  * Slot Order: 1&#x20;
  * Type: Text&#x20;
  * Custom App: Salesforce Opportunity Status&#x20;
  * Intent: ChatIntent&#x20;
  * Click Save

<figure><img src="/files/3RXjtSgHX2Kek63juQRa" alt="" width="375"><figcaption></figcaption></figure>

* Select ‘CheckAccountNameIntent‘ from dropdown and click on Create New Slot.&#x20;
* Enter the details:&#x20;
  * Name: AccName&#x20;
  * Slot Order: 1&#x20;
  * Type: Text&#x20;
  * Custom App: Salesforce Opportunity Status&#x20;
  * Intent: CheckAccountNameIntent&#x20;
  * Click Save.&#x20;

<figure><img src="/files/bUrc7szG47kZlP1KEL08" alt="" width="375"><figcaption></figcaption></figure>

* Select ‘GetOpportunitiesBriefingIntent’ from downdown and click on Create New Slot.&#x20;
* Enter the details:&#x20;
  * Name: AccountID&#x20;
  * Slot Order: 1&#x20;
  * Type: Text&#x20;
  * Custom App: Salesforce Opportunity Status&#x20;
  * Intent: GetOpportunitiesBriefingIntent&#x20;
  * Click Save.&#x20;

<figure><img src="/files/PNx1a4OaMIc3Ckf1Zddh" alt="" width="375"><figcaption></figcaption></figure>

7. Creating an Utterance&#x20;

* Go to the Utterance tab, select ChatIntent from dropdown and create a new utterance.&#x20;

<figure><img src="/files/wdDgICeh0tyU5lkBZFYt" alt="" width="563"><figcaption></figcaption></figure>

* Provide the following:&#x20;
  * Value: Ask a question&#x20;
  * Custom Skill: Salesforce Opportunity Status&#x20;
  * Intent: ChatIntent&#x20;
  * Click Save.&#x20;

<figure><img src="/files/0jy4gOUJtHV3RukNU6cY" alt="" width="375"><figcaption></figcaption></figure>

* Select CheckAccountNameIntent from dropdown and create a new utterance.&#x20;
* Provide the following:&#x20;
  * Value: Check Account&#x20;
  * Custom Skill: Salesforce Opportunity Status&#x20;
  * Intent: CheckAccountNameIntent&#x20;
  * Click Save.&#x20;

<figure><img src="/files/CayLoOy2kFcL5JhQ9IsY" alt="" width="375"><figcaption></figcaption></figure>

* Select GetOpportunitiesBriefingIntent from dropdown and create a new utterance.&#x20;
* Provide the following:&#x20;
* Value: Get opportunities briefing&#x20;
* Custom Skill: Salesforce Opportunity Status&#x20;
* Intent: GetOpportunitiesBriefingIntent&#x20;
* Click Save.&#x20;

<figure><img src="/files/t9VytrkQjpuUGbgpmnlu" alt="" width="375"><figcaption></figcaption></figure>

8. Creating an Input&#x20;

* In the Input tab, click on Create New Input and add the following:&#x20;

<figure><img src="/files/BOpIIfNStg7O2j0fB5yM" alt="" width="563"><figcaption></figcaption></figure>

* Name: ChatInput&#x20;
* Custom Skill: Salesforce Opportunity Status&#x20;
* Custom Intent: chatIntent&#x20;
* Data Source: GenAI DS&#x20;
* Data Source Method: GenAIMethod&#x20;
* Click on ‘Enable Generative AI Tool’&#x20;
* Click Save.&#x20;

<figure><img src="/files/3HloZ0UlnMsDIi3CCvhQ" alt="" width="375"><figcaption></figcaption></figure>

* Once created, click on manage Parameters and add:&#x20;
* Input Parameter Name: UserInput&#x20;
* Parameter: UserInput&#x20;
* Data Type: Text&#x20;
* Click Save.&#x20;

<figure><img src="/files/404Ks36NB5uNZY4y5AB2" alt="" width="375"><figcaption></figcaption></figure>

* Click on Create New Input and add the following:&#x20;
  * Name: CheckAccountNameInput&#x20;
  * Description: Check Account Details&#x20;
  * Custom Skill: Salesforce Opportunity Status&#x20;
  * Custom Intent: CheckAccountNameIntent&#x20;
  * Data Source: Salesforce DS&#x20;
  * Data Source Method: AccountNametoIDCheck&#x20;
  * Click on ‘Enable Generative AI Tool’&#x20;
  * Click Save.&#x20;

<figure><img src="/files/jyX8paVxjOT4G4T8kGXi" alt="" width="375"><figcaption></figcaption></figure>

* Once created, click on Manage Parameters and add:&#x20;
  * Input Parameter Name: AccName&#x20;
  * Parameter: AccName&#x20;
  * Data Type: Text&#x20;
  * Description: Capture the account name for the opportunity&#x20;
  * Click Save.&#x20;

<figure><img src="/files/Jvgfl3q3uztSYLlLHNZh" alt="" width="375"><figcaption></figcaption></figure>

* Click on Create New Input and add the following:&#x20;
  * Name: GetOpportunitiesBriefing&#x20;
  * Description: Check opportunity status&#x20;
  * Custom Skill: Salesforce Opportunity Status&#x20;
  * Custom Intent: GetOpportunitiesBriefingIntent&#x20;
  * Data Source: Salesforce DS&#x20;
  * Data Source Method: GetOpportunitiesBriefing&#x20;
  * Click on ‘Enable Generative AI Tool’&#x20;
  * Click Save.&#x20;

<figure><img src="/files/sOQrzWRUArcLXhnfrdB1" alt="" width="375"><figcaption></figcaption></figure>

* Once created, click on Manage Parameters and add:&#x20;
* Input Parameter Name: AccountId&#x20;
* Parameter: AccountId&#x20;
* Data Type: Text&#x20;
* Description: Capture the account id for the opportunity&#x20;
* Click Save.&#x20;

<figure><img src="/files/EqH9YHXPcrbkKpgy5Nu6" alt="" width="375"><figcaption></figcaption></figure>

9. Publishing the Custom App to Gen AI&#x20;

* In the top menu, select Publish then click on Add App Publishing.&#x20;

<figure><img src="/files/eMy08NauG6bQiuV68iDf" alt="" width="563"><figcaption></figcaption></figure>

* Fill in these details:&#x20;
  * External Skill Name: For example, Salesforce Opportunity Status Assistant&#x20;
  * App Description: A description for the assistant&#x20;
  * Skill Type: Search&#x20;
  * Channel: Generative AI&#x20;
  * Welcome message: Hello! I'm Salesforce Opportunity Status Assistant, your assistant to help you check the status of your opportunity in Salesforce. You can say ‘’ or ‘check Account details’ to proceed.&#x20;
  * If you want to see the app in Basic Mode, also enable the Show this app in the Basic Mode option.&#x20;
  * Click Save.&#x20;

<figure><img src="/files/FItxdAWMOhp9VfrgITrc" alt="" width="563"><figcaption></figcaption></figure>

10. Using the App&#x20;

* In the Publish Section, click on Action, select Test and start querying. &#x20;

<div><figure><img src="/files/s3GGe7dhNDMVy0F1LHth" alt="" width="322"><figcaption></figcaption></figure> <figure><img src="/files/j1eHPavwPybnFWmKj922" alt="" width="322"><figcaption></figcaption></figure></div>

Congratulations—you have successfully set up an assistant in Studio Mode utilizing Salesforce Connection to access ‘Opportunity’ and ‘Account’ Tables present in Salesforce and fetch the processed information.&#x20;


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.ixhello.com/ixhc/step-by-step-bot-creation-guide/salesforce-opportunity-bot-creation-guide.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
