# Frequent use cases

This page introduces you to different basic and frequent use cases of the dydu platform. Feel free to reproduce them to familiarize yourself with the platform.

### Create a matching group

The matching groups represent groups of words and terms having a similar meaning or intent.

<figure><img src="https://264031769-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPMvi3Izk7dvjl9HitZpp%2Fuploads%2F7fpxAnW61uZBdeY68R2x%2FCapture%20d%E2%80%99e%CC%81cran%202023-12-18%20a%CC%80%2015.58.18.png?alt=media&#x26;token=0aa18283-4bc6-4c12-b6dc-844fc61703a5" alt=""><figcaption></figcaption></figure>

Note: creating matching groups is the first major step to complete before any knowledge creation.

To create a matching group, please follow the following steps (in this example, we will be creating the 'computer' matching group):

1. Go to the **Content > Matching groups** page.
2. Click **Add** to create a group. Before creating a group, you can create categories in which your groups will be filed.
3. Click **Add matching group**. A new window appears.
4. Enter the name of your matching group.

<figure><img src="https://264031769-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPMvi3Izk7dvjl9HitZpp%2Fuploads%2FFNVJRCa1jasV5Fa6owMD%2FCapture%20d%E2%80%99e%CC%81cran%202023-12-18%20a%CC%80%2015.58.40.png?alt=media&#x26;token=3b5505cb-eb0a-4ae5-bdba-bedc7192d224" alt=""><figcaption></figcaption></figure>

5. Click **Add**. Your matching group is created.
6. Then, select your newly created matching group to add formulations.
7. At the bottom of the page, add all rewords one by one from the **Formulation**.

<figure><img src="https://264031769-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPMvi3Izk7dvjl9HitZpp%2Fuploads%2FKUmyBhkchIhD5Xi5bpvz%2FCapture%20d%E2%80%99e%CC%81cran%202023-12-18%20a%CC%80%2016.01.26.png?alt=media&#x26;token=410622c8-9d62-42ce-aaf0-1c5729015194" alt=""><figcaption></figcaption></figure>

8. Click **Add**. Your matching group now contains formulations and will can be used when creating a knowledge.

For more information, please visit matching groups.

### Create a decision tree

A dialog with a bot can involve more or less complex conversational flows. To meet this need, you have the ability to create decision trees to manage multiple scenarios within one and the same knowledge. Please follow these steps:

1. Create a simple knowledge [(see procedure on this page).](https://docs-en.dydu.ai/contents/knowledge) Our knowledge for the example will be "I have a payment problem" with the answer "Do you have an account on our website?"

<figure><img src="https://264031769-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPMvi3Izk7dvjl9HitZpp%2Fuploads%2F9w7eCfc91D7iQWeLvIlq%2FCapture%20d%E2%80%99e%CC%81cran%202023-12-18%20a%CC%80%2016.06.06.png?alt=media&#x26;token=0dbcecdc-10ff-46ed-b472-464d6b7580ac" alt=""><figcaption></figcaption></figure>

Note: matching groups can be suggested at any time. Select the suggested suggestions if you want to use them or just ignore them.

In this case, the user is asked to answer yes or no.

2. In order to manage the two possible scenarios, it becomes necessary to create a decision tree. To do this, click on the ![](data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACYAAAAmCAIAAAAnX375AAAAA3NCSVQICAjb4U/gAAAAGXRFWHRTb2Z0d2FyZQBnbm9tZS1zY3JlZW5zaG907wO/PgAAA5BJREFUWIW9l71uIzcQx/kxJHclu7ABv0KKAGlSpEseIm+QLi9wT5EXuC5vcA9xl+oCpAlwAVIb9hkRrD15bXk5HDLFyFxqvZA2lpypVlru/DjkcPgfmVISL7X3f/6dn3/45quJX8F0QJ5cfoiR8tsYoxBCSimlPBQ5IJU/GZN/SilTSjxgB3sXsvSeedmEEDGEzVApiUgWxmNGwXJ0L8s/Y4wlRinFjpRSeRKPiCAlB62UymPYA4/chRwsXZ6vMWbHkrCFEBCRJ8T2nDpEDngxxomw0rquIyIAGKVuIZ/zlFIA/yGrsyGi9x4AtNYDau9uwCMirfXLeEIIXpiu60oYb9DQ41F4mZpS4q1lKiNVJoniDEgpD+SxWWtTSkRUHrOt9OUQQwjW2sN5bPP5HBGJiI/QBlmGGGPUWk/x9eHjp99+/2vvME74EEJfmPpSEiOHWNf1FOTFtz8JIf7549e9I1NKq9XKOae11lr3e8kh7i3KLzCuDHlH1aCQDorTsUxrzYVMCDGM8pWQABACMbVPH354JaSUki/XlJJkMh9/RDw5ORn95sPHTz/+/Mte1+/evvn+u69HXy0Wi7qujTF9TDl1X8nyXvZR8r0zn88nru30QyKEQMTlcjmbzay1Q+9ENPrNgVZKlv8J6b0fQbJ0QMTXQK7Xa1YnPTLLJMRw9CSKMXZdxzVoc1+yIMvg9Xo9m832Onr39s1EZNN80VorpTeIfKcQERF57xHx/Pz8WMU2xnh5eemc43QFAJVdZ6kopWqaL0fhCSGur6+llKyARvZSKaW1BtAh4P39/eG8xWLhvTfGGGO01htKfp2pSikA07btgdS2bW9vbwEg67xe4XH6lIGmlGKE1WoVYzw9PX0Bb7lsPn++5v3jLcz6fUtTlUhWSnd3dw8PDxcXF9NvmJTSzc3Ncrms69paa63jVWUPMh8PUSggvlWIKITgvffehxDm8/nZ2dlucEqpbdurq6uUUlVVzjnnKuesMSavqlJqqBxzf1P+I6Vs27ZpGmttVVV1XQNAVVVCCESMMT4+Pq7X66ZpiMgYU1WVtda5ylpTtgm8sHsaBI4VMSB6vmoQMYTAb7PofUo6AABjjHPOGMu8XQ2C2C5DfdcipVIKQCOi1poVYnyyrMTZtTEGADhfJrVBo7FyKKx9iSgEIgqlAN8+01tHYlKzN6CK7Za2VC1Pc0pKbeq1KiwfieeN9L8FuAd0vu42zgAAAABJRU5ErkJggg==) icon below your answer window.&#x20;
3. Select **Add an intention**.
4. Enter "Yes" and click **Create**.
5. Write the answer, select **Published**, click on **Update**. Your first sub-branch is created.
6. Repeat the previous step to create a second sub-branch with the "No" knowledge. Your decision tree is created.<br>

<figure><img src="https://264031769-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPMvi3Izk7dvjl9HitZpp%2Fuploads%2F8Jk1iDScNK1GgI0JhP0a%2Fuc03.png?alt=media&#x26;token=2530924e-3769-4b93-8e77-7a406e53921d" alt=""><figcaption></figcaption></figure>

Note: It would have been possible here to insert two clickable redirections "Yes" and "No". However, using direct links to an internal redirect is especially useful when your bot offers multiple and specific choices.

{% embed url="<https://youtu.be/hT5i7RtP8W8>" %}

5. A user can respond with an unexpected answer that the bot did not consider. In this case, it would be an answer that does not correspond to "Yes" or "No". To do this, you must use the  icon ![](data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEQAAAA2CAYAAAB++T94AAAACXBIWXMAABYlAAAWJQFJUiTwAAAECUlEQVRoge2aPY/cRBjHf/PiPe/dXoIOUA6dEAkKDQgFKSUVRAEampR8Bago+AD5AjR0qdKkylVICAqogkQJzRUEKYfQiZxQ4NgXr9cez1Bsxvic3AvJjn0X/Jes3fXL7MzP/5nn8XiEc87RgmZZzr3f/+DBaALAC2cHXHjpRXpat1GdUrLVfz+B6oDU1AGpqQNSUwekpg5ITR2QmloN+s45fBpU/d6mGgfiG22tfQSGcw5rLUIIgPKzSYmmMtVq43NT8Nc4ZThJKQqHY9745aWIlThi0O/Ri1QrYBoBUnXFNDOAYClSRFrtO88UltFkxmiasRJrnhvESDkf5pqCEhxI6QxA/odG/T1JyXLD2mofIUS5hVZQINWin6QxzsFwMmXQ7zUGpbEx5GmUznIiLZFSdkC8jCmQMrxLgiRmIRjrhwNw6HwlCJBQd9BHnJA6Uam7nd4n296k+PPHQ88L6ZB25+tqmv18E7PzHQCDq5uIaPDIOVLKMssN4cRWgWTbt3FmPqeqVi8iohUAhF5+LIwm1FqUybZvM9u6sW9ftHGF6OX3EP11ZH/9wGt9lUM4pJUxxOx+z2zrBnrjXQZXN5FnzgOQ73xL9ts3h8LwCnUfW+kysn+O6PyHxK9/QvLDp9jhdnnMTXePvF4IUYbfRbuk1cQs3fqCfPtLANTaGwDY0T3U2pv0L18/9Fo/TbBoIK0Oqh4GQP/ydfKdrzEt1gdadsjoq/eRq69gR78SbVwhvvTZsa6rdpdT7xA7/KUMtQB6/W3kq9dIf/oc4FhQnpnEzOVjJnc+3rdPLp8j2vgAm+yS3b1F78I15JmLh5cTKCmDhoGIaMDKOzdx0/vz33pQNl4/f4ns7i2cGR9ZjrUWpdTpyFSPunuyvw7HyDMOkjHm//H4r9beovfaR8jVg7uLc46iKIBwT9QLjzI+AoR4VE/TFCEEWutgs2fBUndr7ULLS9MUa23wacSFA/G5gbW2tPfTajyZkmUZUv47rxpsEipIqcznLYqiYDabPXHe4Bw82BuRZyla62CRpaogYddXWimFMYYkSVBKEcfxscvYG6dMxglx5NC9Hkqp4O6AwHmIEKK0eZZlJEmCE5qlOCbuabTab1BTWIbJjL1hgsIwiDVRFDXmDmjgRZUPlcYY8jwnz3Oy3JAVgtwKCgeFBSUFWoISBT0FS9EcRh3IqewyXr7yUkr0w+WW3jVRUWCt3ReN5m5SKKXQWpdbE13FK3jq7gFU4SilKA4EMj/ux4ymnFHWt8nlENU1IH6rv//1UKqueOaWQ3g9boGM/11dC1KF0PSimWafdiuN898PWiHQxuohOEUvu5vSiXqVeRLUAampA1JTB6SmDkhNHZCaOiA1dUBq6oDU9A+b4OprYJ+0hgAAAABJRU5ErkJggg==) that will allow you to answer to any user sentences that do not match the defined branches of the decision tree.

<figure><img src="https://264031769-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPMvi3Izk7dvjl9HitZpp%2Fuploads%2FezzO7uew4iRvtvXrbJYN%2Fuc05.png?alt=media&#x26;token=389bd51f-b9b2-4cde-b33a-7cfcf693f4c1" alt=""><figcaption></figcaption></figure>

6. Test your knowledge and multiple scenarios through the test bot.

{% embed url="<https://youtu.be/biBbP6lOD7s>" %}

### Create a redirection to another knowledge

You can make redirections to other knowledge items. This allows you, among other things, to create connections within your knowledge base. To perform a redirection, please follow these steps:

1. Create or edit a knowledge and then move to the answer window.
2. Click the ![](data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACIAAAAUCAIAAABnBnglAAAAA3NCSVQICAjb4U/gAAAAGXRFWHRTb2Z0d2FyZQBnbm9tZS1zY3JlZW5zaG907wO/PgAAAcpJREFUSIlj/P//PwPtARMd7Bhwa37R3Jpfr3Z1Z6Zm1O9+/JN61jCiJoFfj3dNbF9w4QMDAwMjr2pCaZWr8usNtTWr7mHxHiOnSmpnk4MwMdYg++bX4609TRA7GBgY/n++vaC9cdtdPi0deS5sWv9/f/3sPZG+YYGz/l1Y2L706ldGXnlZpoePPvLKyTI/evxgafec0v7GOeFo2p4sLS/b+oRIO1CsYZI30le+98k5K/LplLJHH5n0Uurdd/btY7BQ4CBoyuNnLy5eu4kmKC0pYaitjm4Ng6BxerMxAwPDk6VQAXHH7E5HohwrKyXBwMCAbBOyHQxUzDeyUhL6WupY7WBA8Q0x4P3ZmX1rPjlnhTAwMDAwMDL8frl/at8+Bv/iLCsBRoif3rz/iGYHydb8e3ju4t1HH+61vpNlYmBg+HtpYeOWxx8YeU88+GFlwAnxE8QyYq35uKU+aguKyH8uxaCyosro101Lrz58xMDAwPD50WMGRk6F6NJsA0787sMSNwJSItzYlDJ+f3zk+ntZ75K6aG0BqBCvQnRlvZcyO35LGBgY/pMDfr7c2ZURl16369EP4jSgFTakgF8MDGzEqqXAGlLA8KrWAKAg/yqvv/mKAAAAAElFTkSuQmCC) icon, then click **Reword**.
3. Find the knowledge to which you want to redirect from the **Reword** field.

<figure><img src="https://264031769-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPMvi3Izk7dvjl9HitZpp%2Fuploads%2F4TxrUB9pIAVMyEGVa6rV%2FCapture%20d%E2%80%99e%CC%81cran%202023-09-25%20a%CC%80%2011.46.49.png?alt=media&#x26;token=d4f97314-98b9-4a1e-b89e-e320c7eac411" alt=""><figcaption></figcaption></figure>

4. Click **Ok**. Your redirection is shown.

<figure><img src="https://264031769-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPMvi3Izk7dvjl9HitZpp%2Fuploads%2FhPBzZT87gsEitPSQYjnj%2Fuc09.png?alt=media&#x26;token=78368004-4264-43e8-b932-f376d28b56f7" alt=""><figcaption></figcaption></figure>

{% embed url="<https://youtu.be/bgiH8hPPeFY>" %}

### Create a Livechat escalation

To create a Livechat escalation, you can do this through simple knowledge or through event-triggered knowledge (condition for triggering a Livechat escalation). Please follow these steps:

1. Create a simple knowledge like "I want to talk to an operator".
2. In the answer window, click **More options** then click on the **Other options**.
3. Click the ![](data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAXCAIAAACeQxh6AAAAA3NCSVQICAjb4U/gAAAAGXRFWHRTb2Z0d2FyZQBnbm9tZS1zY3JlZW5zaG907wO/PgAAAM1JREFUOI1j/P//PwM1ABNVTBmUBrGg8b/9/PXs5Vs0QSlxYS52NtIMevrizfTlW9EEMyO9VeWlSDMIAvoqUrcfPnv30fOcaJ+ijtkMDAy3Hz7DbwG6QdISIpmR3miqpSVEIAxkcTRz0Q3iYmdD8wWci993NI7+oo7Zu4+eu/f4OSSAiAHYAxstOMgx6O3Hz6cv3/KwMSbVIHSvvfvwedeRc6SagsUgsgHN8hoE7DhyllKDuDjYlWQl7zx8TlCnkqwkFwc7nMs4WkLSzyAATCpCQskdZs4AAAAASUVORK5CYII=)  button at the right of the **Define GUI** field then click **Livechat connection.**

<figure><img src="https://264031769-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPMvi3Izk7dvjl9HitZpp%2Fuploads%2FaCpu55d5W3lcjNcDnm33%2FEnregistrement%20de%20l%E2%80%99e%CC%81cran%202023-12-18%20a%CC%80%2016.43.19.gif?alt=media&#x26;token=164501f1-3038-400b-bb7f-d743b704c848" alt=""><figcaption></figcaption></figure>

Go to [the Livechat page](https://docs-en.dydu.ai/livechat/enable-livechat) if you want more information.

### Create a context condition

The context conditions let you add conditions that will trigger a knowledge, you can find more information on this page.

In this example, the context condition to be created will be about the user page. The goal will be to check if the user URL contains "knowledges". If it is the case, the user will get a specific answer. If not, they will get another one, asking to go to the page triggering the knowledge.

Note: if you want to test the context condition at the end of this example with a deployed bot, please customize the example by replacing the term of the URL with a term specific to a URL where your bot is located.

To create and use this context condition, please follow these steps:

1. Go to **Content > Context conditions**.
2. Click **Add** at the top right of the page.
3. Fill in the fields as follows:

<figure><img src="https://264031769-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPMvi3Izk7dvjl9HitZpp%2Fuploads%2FJcIkEfpFKrCbQjgSXare%2Fuc14.png?alt=media&#x26;token=ae43278d-c41f-420d-8746-d2e0c4493b21" alt=""><figcaption></figcaption></figure>

Note: the **UserURL()** condition is a selectable context condition by default in the condition list.

4. Click **the tick** to validate the creation of your context condition.
5. Go to **Content > Knowledge** and create your knowledge like this:

<figure><img src="https://264031769-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPMvi3Izk7dvjl9HitZpp%2Fuploads%2FKLP5xLauGzdAHQMSBbw6%2FCapture%20d%E2%80%99e%CC%81cran%202023-12-18%20a%CC%80%2016.51.17.png?alt=media&#x26;token=a4c55f1a-4e0c-4304-993d-2dd2950735cd" alt=""><figcaption></figcaption></figure>

* Add new knowledge
* Answer to a question
* Create the sentence to understand
* Close the answer window
* Click on ![](data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAC0AAAAmCAYAAABQ3RJZAAAACXBIWXMAABYlAAAWJQFJUiTwAAADBklEQVRYhe2Zv0/bQBTHv3dn+xLSlJEBMZUqA1vF0rB168KPqcwwVe3Yrf9ABf9HUTfUpWMXYKFDJZAAqVIFqKiooCokJU58d69DYteBtNg+k1Rqv5JlRZe799Hzu3fv2YyICDnp/KKBT19OobRBqSBxf3wMpaLMa/lIPPcVB6D/0INSbtBEdO26LTk2k0Ow8G6M6QJ37uFvAGCMWaL+EsuSPa5O6QektAYIAAic8+g/ecCnhiai1Ia11h1jjEWXjTJ5OouICFrryOs24APLHowxcM5jcZ/dVwNNeaGXbR/uwPO0EMI6LeYKPb+0kswo539PeGx9OEhm1DK2h3aM28T2UKGzamjQNnH9b4fH7v5Rzz2phrYRd/ePsLC8iiezVcwvrSQCtzpgKKN29g7p5avXtLN3SJPV57S2vkFERGvrG3Tv4bOe8X5SSlG73SatdWrbmevpWr2Jd+8/4s3bLbx4OovFuRkAwOLcDI5PzrCwvIq75RE8fvSg73ytdebCySo8jk/OAAAX9eYfx/sphM6izNCj5SKq0xVMVSawub3fM7a5fYCpygSq0xWMlovX5iqlAGTP1TfW05Sh6L9JjUYDruvCcZyeriapEnnaaqdfUbPZCaUssKFuhA4XNsZkMhBXEARot9twHMeq9UoV02Gvl0VBEKBer0chwXn2HJBoZtwjrVYr2khJdXl5iVqtFsWxEMKqT0yVpxljEEIgCAL4vg/OeQRyFSBQCr7vo+X7YIzB8zy4rhsB2yhVN07dol1rDa01giCAUgpaaxhjcF6r4/PXb9DaoFQsYnJ8DOVSEY7jXMsWNuCpPQ2g5/EKIWCMgTEGshXAkxJaG0gpUZASUkoIISCEyAU4NXQcPAQIoYkIBdmG9CSUNnA9D67nwfO86PVBfP5AoUPD8Xo4LOidbgiAGzhCRJsuL1gr6FBxEMYYitIDFwKMAGIMBvnChsqlng49PyIl3G4mUd3NeRvKtd0SgqNU6HxjUdqg9qMJY/J/VZh7j3gn9mHo9HsNgcUp+jv9BCwT++IfF0wKAAAAAElFTkSuQmCC)
* Select Current action
* Select your condition in the list
* Click on Update
* Then you will be able to fill Success and Failure answers.

So, depending on the success or failure of the context condition, the bot will send a different answer to the user.

You can create and customize an infinite number of context conditions and use them within your knowledge.
