# Shomi Custom

Shomi is a built in feature of the Enreach Contact UCaaS suite that allows you to transcribe all or parts of your phone calls. Enreach Contact users can use the Enreach Contact desktop app to access the transcriptions.

Access to transcriptions is currently offered through the Call History section of the desktop app. Simply click on the "transcription" button that appears when hovering over a previous call opens the Shomi chat assistant. Using the Shomi assistant users can then ask questions related to the phone call or have the summary pushed to the CRM (when having a subscription to Contact Connect or Red Cactus) or have it send by e-mailed. Please refer to your Enreach Contact documentation regarding the use of Shomi.

The Shomi Custom Smart App is a technical solution for amending or customizing the transcriptions done by Shomi. Shomi Custom is called by the Shomi transcription bot in the very last step of the transcription process. By then, Shomi already transcribed the conversation and generated the summaries and rest of the meta data and the Shomi Custom bot can add final post processing before offering it to the Shomi assistant (in the Enreach Contact desktop client).

This page describes how to setup a Shomi Custom Smart App.

### Prerequisites

#### Ordering the extensions

When you as a partner have a customer that requires the default summary format, tone or voice or template to be different, you can order a Shomi Custom subscription. This needs to be done by submitting at least the following two orders in Operator:

1. Order the Shomi custom add-on on user level&#x20;
2. Order the Shomi custom Smart App extension on tenant level

Step 2 results in a Shomi custom Smart App being installed in your DialoX environment after which all transcriptions of calls from the users for which you ordered the Shomi custom add-on will now be processed by your Shomi custom bot.

#### Bubblescript

At the moment Shomi Custom is only adviced to be ordered and used by Partners that fully onboarded, trained and experienced in using [BubbleScript](https://developer.dialox.ai/) and subscribed to DialoX Creator for premium Developer access and support.

### Customization

Once ordered, the Shomi Custom bot allows for customization using bubblescript through the DialoX studio.

#### How to enable in the studio

Open the Shomi custom bot and make sure:

1. the telephony channel is enabled (should be automatically the case)
2. Enable the REST API channel
3. Optionally define your custom logic

#### How to extend

The transcribed conversation including the LLM generated summaries and rest of the meta data is made available in the global variable `transcript`. The map that is available for you in this variable is described in the last section of this article called data structure.

You can write your custom logic in the `custom/process` file inside the `process_transcript` task for which a simple example is already included:

<figure><img src="/files/wFvlPQ4X0Y2csA3NLDvE" alt=""><figcaption></figcaption></figure>

When more files are needed, they can be added in the same `custom/` folder.&#x20;

Using this bot you can extend the experience of Shomi in the Desktop App primarily by changing for instance the `extended_summary` attribute by your own version or by adding `quick_replies` in the form of a name-value map. The key of the map represents the quick reply button and the value would be the answer that you generate in this bot, for instance:

```
%{
  "What was the reason for calling?": "The user wanted feedback on …",
  "Was the user irritated in this call?": "No, the user was ok."
}
```

#### How to debug

To test you can add transcription objects in YAML files in the `samples/*` folder. There is one example.yaml file with an example of such a transcript. By running the bot in Preview mode, you can select a file and test it in the studio. Inspect the console for the results.

<figure><img src="/files/m4b7b9UNUosZVtalmQFE" alt=""><figcaption></figcaption></figure>

#### How to test

The DialoX test running can be used to perform automated tests. See the `tests/example` script to see how the process\_transcript task can be tested.

<figure><img src="/files/QnidhIOVMXP7rnRsyKuk" alt=""><figcaption></figcaption></figure>

#### How to integrate

The contents of the `transcript` variable can be pushed to any system using webhooks. You can define webhooks in the REST API channel configuration pages. There are two options:

1. Use the standard `conversation_close` webhook
2. Use a custom webhook

**Standard webhook**

Use this webhook if you don't care so much about the webhook structure and contents. It will simply send all available information about the user, the conversation and the corresponding transcription.

The `transcript` variable is exposed in the `conversation_data` element that will be pushed as part of the conversations webhook, see the manuals for more information. See the [developer documentation](https://developer.dialox.ai/dev/webhooks/) for more information.

**Custom webhook**

You can also define your own webhooks that adhere to your own interface requirements. Read about custom webhook tasks [here](https://developer.dialox.ai/bubblescript/tasks/?h=declared+tasks#task-webhooks).

#### Data structure

The following attributes are available in the `transcript`:

| Property              | Description                                                                                                                                    |
| --------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
| account\_id           | your account id                                                                                                                                |
| audio\_url            | the audio url, only available for limited time                                                                                                 |
| caller\_text          | only the text uttered by the caller                                                                                                            |
| duration              | the duration in seconds                                                                                                                        |
| json\_url             | the transcript in JSON format                                                                                                                  |
| locale                | the locale of the transcript (nl, en, de, etc)                                                                                                 |
| raw\_json\_url        | the raw transcript in JSON format                                                                                                              |
| session\_id           | the internal session id of the call                                                                                                            |
| summary               | the summary of the call                                                                                                                        |
| **extended\_summary** | the extended summary in meeting minutes style                                                                                                  |
| text                  | the full transcription in text                                                                                                                 |
| text\_url             | an url to the full transcription in text                                                                                                       |
| topic                 | the topic of the conversation                                                                                                                  |
| actions               | the actions part of the extended summary                                                                                                       |
| minutes               | the minutes part of the extended summary                                                                                                       |
| **quick\_replies**    | a key value struct with specific shomi quick\_replies and answers                                                                              |
| caller\_displayname   | the name of the caller                                                                                                                         |
| caller\_number        | the number of the caller                                                                                                                       |
| user\_email           | the email address of the user that initiated the recording                                                                                     |
| user\_phone           | the phone number of the user that initiated the recording                                                                                      |
| user\_extension       | the extension number of the user that initiated the recording                                                                                  |
| user\_operator\_id    | the operator id of the user that started the recording                                                                                         |
| callee\_number        | the number of the callee                                                                                                                       |
| callee\_displayname   | the name of the callee                                                                                                                         |
| direction             | the direction of the call seen from the user: "in" or "out"                                                                                    |
| roles\_description    | a description of the roles of the caller, callee and user that can be used in any LLM call to help the LLM understand the roles of the parties |
| conversation\_uuid    | to have a reference to the originating conversation                                                                                            |
| capabilities          | enum to define or limit the capabilities for shomi, available options: \["email"]                                                              |
| sentiment             | the sentiment of the call                                                                                                                      |
| class                 | the call class, like sales, service, billing, etc                                                                                              |
| notifications         | array of string with optional notifications for Shomi assistant to present to the user (e.g. auto pushed to crm, or auto emailed)              |
| keylink               | user has a keylink subscription                                                                                                                |
| redcactus             | user has a redcactus subscription                                                                                                              |
| auto\_email           | user has auto email enabled                                                                                                                    |
| auto\_push\_crm       | user has auto push to CRM enabled                                                                                                              |
| live                  | transcription was live transcribed                                                                                                             |
| pushed                | transcription has been pushed to the CRM                                                                                                       |
| emailed               | transcription has been emailed                                                                                                                 |
| extra                 | extra analysis fields added by 3rd party services, like juvoly                                                                                 |
| schema\_version       | <p></p><p>the version of the transcription schema</p>                                                                                          |

ℹ️ Notice that the URL's will be available for only a limited amount of time for privacy reasons


---

# 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://manuals.dialox.ai/advanced-topics/shomi-custom.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.
