# High-level overview of the conversation builder

The article provides a high-level description of the processes and components involved in building a conversation using the Delpha conversation builder. The Delpha Author can be defined as the user of Salesforce who has access to the Delpha conversation builder.&#x20;

The author playground mainly comprises:&#x20;

1. Delpha Conversation Builder

   The conversation builder is a no-code interface used to build new conversations and review existing templates, whereas, the configuration is used to install and uninstall templates.
2. Salesforce flow module

   The flows help in building business automation used in the conversation builder.

## The Conversation

The conversation is used to describe a use case. It facilitates interactive communication with Delpha assistant & end-user. Every conversation relies on 3 fundamental steps :

1. Recommendation\
   These are based on contextual rules. The author can define when and where a particular conversation (use case) is proposed.
2. Engagement\
   Guide the end-user through predefined & Interactive questions & answers.
3. Execution \
   Take necessary actions to deal with the corresponding use case efficiently.

![Picture1.png](https://delpha.file.force.com/servlet/rtaImage?eid=ka0EY00000008Vc\&feoid=00N5w00000NshhX\&refid=0EM5w000001spX7)&#x20;

## Conversation Builder layout

<div align="left"><img src="https://delpha.file.force.com/servlet/rtaImage?eid=ka0EY00000008Vc&#x26;feoid=00N5w00000NshhX&#x26;refid=0EM5w00000352Lg" alt="Conversation Builder"></div>

The Builder consists of 3 main components:

1. Toolbox: The toolbox appears on the extreme left and comprises all the author's text and variables while building a conversation. The messages, questions, and answers are filled automatically while variables used in the conversation need to be defined by the author.&#x20;
2. Tree Canvas: The canvas appears in the center. It is the working area and gives a high-level description of the conversation or the use case defined in a decision tree. The author can initialize and create nodes here.
3. Properties: The Properties tab appears on the extreme right and allows the author to define properties, including messages, questions, and answers associated with each component of the decision tree.

## Building a Conversation

### Initialization![Picture32.png](https://delpha.file.force.com/servlet/rtaImage?eid=ka0EY00000008Vc\&feoid=00N5w00000NshhX\&refid=0EM5w000001spXH)

<div align="left"><img src="https://delpha.file.force.com/servlet/rtaImage?eid=ka0EY00000008Vc&#x26;feoid=00N5w00000NshhX&#x26;refid=0EM5w00000352Lq" alt="Initialization"></div>

In the Initialization window, you can define: &#x20;

* Display Rule: Defines the page(s) on which the author wants the recommendation from the assistant.&#x20;
* Conditions: Define rule-based evaluation criteria on string fields to display the recommendation.
* Action Type: Defines evaluation criteria for contextual rules which cannot be defined using conditions. This can be achieved using a Flow, an Apex.

Once the initialization criteria are valid, you can start the conversation The conversation is made up of nodes that are organized as a decision tree.

### Node ![Picture33.png](https://delpha.file.force.com/servlet/rtaImage?eid=ka0EY00000008Vc\&feoid=00N5w00000NshhX\&refid=0EM5w000001spXR)     &#x20;

<div align="left"><img src="https://delpha.file.force.com/servlet/rtaImage?eid=ka0EY00000008Vc&#x26;feoid=00N5w00000NshhX&#x26;refid=0EM5w0000033Mq1" alt="Conversation Node" width="375"></div>

A conversation is made up of nodes. It is the key part of the decision tree and can act either as a redistribution point or endpoint of the conversation. Node consists of:

* Unique node name
* Message(s)
* A question and answer(s) to engage the user and take action.

1. Answer

The Answer is the key component of the node which lets the author define the type of answer and the action to be taken upon the selection of an answer.

<div align="left"><img src="https://delpha.file.force.com/servlet/rtaImage?eid=ka0EY00000008Vc&#x26;feoid=00N5w00000NshhX&#x26;refid=0EM5w00000352RZ" alt="Question" width="375"></div>

1. The answer can be Static or Dynamic![Picture34.png](https://delpha.file.force.com/servlet/rtaImage?eid=ka0EY00000008Vc\&feoid=00N5w00000NshhX\&refid=0EM5w000001spXg)

<div align="left"><img src="https://delpha.file.force.com/servlet/rtaImage?eid=ka0EY00000008Vc&#x26;feoid=00N5w00000NshhX&#x26;refid=0EM5w0000033Mqk" alt="Answer - Static vs Dynamic"></div>

* Static answers display fixed answers.&#x20;

<div align="left"><img src="https://delpha.file.force.com/servlet/rtaImage?eid=ka0EY00000008Vc&#x26;feoid=00N5w00000NshhX&#x26;refid=0EM5w0000033MoW" alt="Static Answer"></div>

* Dynamic answers display a list of dynamic values to select. The values are passed and stored using variables (discussed later).

<div align="left"><img src="https://delpha.file.force.com/servlet/rtaImage?eid=ka0EY00000008Vc&#x26;feoid=00N5w00000NshhX&#x26;refid=0EM5w0000033MsM" alt="Dynamic Answer"></div>

2. The Answer can be Single select or Multi-select&#x20;

<div align="left"><img src="https://delpha.file.force.com/servlet/rtaImage?eid=ka0EY00000008Vc&#x26;feoid=00N5w00000NshhX&#x26;refid=0EM5w00000352Ou" alt="Answer - Single or Multiselect"></div>

* The Selection view enables checkboxes, whereas, comparison view enables radio buttons.

<div align="left"><img src="https://delpha.file.force.com/servlet/rtaImage?eid=ka0EY00000008Vc&#x26;feoid=00N5w00000NshhX&#x26;refid=0EM5w00000352PY" alt="Answer - Single or Multiselect"></div>

3. The Answer can lead to an action![Picture35.png](https://delpha.file.force.com/servlet/rtaImage?eid=ka0EY00000008Vc\&feoid=00N5w00000NshhX\&refid=0EM5w000001spXq) or not lead to an action

<div align="left"><img src="https://delpha.file.force.com/servlet/rtaImage?eid=ka0EY00000008Vc&#x26;feoid=00N5w00000NshhX&#x26;refid=0EM5w0000033MsW" alt="Action"></div>

The toggle switch can activate new action. The new action can be flow, quick action, apex, conversation, or open in a new tab

3. Variables

Variables are placeholders. They are used for storing and retrieving values in the conversation flow (actions or messages).

<div align="left"><img src="https://delpha.file.force.com/servlet/rtaImage?eid=ka0EY00000008Vc&#x26;feoid=00N5w00000NshhX&#x26;refid=0EM5w0000033Msl" alt="Variables in the Toolbox"></div>

Variables can be created on the toolbox and can have multiple formats such as string, number, list, object, Id. The action type requires a set of input and output variables. Example: Input variables such as account Id passed to Flow, which processes the information and provides an output(s) used in the conversation. Variables can be classified into two types:

* Global variables\
  Read-only built-in variables to reference common information throughout the conversation. Currently, there are 2 global variables CurrentPage and CurrentRecordId&#x20;
* Conversation variables\
  User-created variables. They are used to transfer information/data from an action (Flow, Apex) to a conversation or between 2 conversations.

  &#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://help.delpha.io/delpha-for-salesforce/delpha-apps/delpha-setup/conversation-builder/high-level-overview-of-the-conversation-builder.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.
