Speech Insights Data Pipelines
The Orchard Core Data Pipelines module lets administrators design pipelines that read data, transform it and deliver it, without code. Speech Insights adds its data to the pipelines, and the Tableau Data Pipelines feature adds a step that publishes the rows to Tableau Cloud. With these, a pipeline can:
- keep a Tableau Cloud data source of the calls up to date, every few minutes, with a workflow timer;
- send the tags, the indicators and the call playbooks to Tableau, next to the calls, so that workbooks can join them;
- write the calls of a client to an Excel workbook every night, and upload it to an SFTP server or send it by email;
- filter, join, calculate and rename the fields with the steps of the designer.
The Tableau Export pipelines under Speech Insights > Tableau Pipelines continue to work. A data pipeline can do the same work, as shown in Replace a Tableau export pipeline.
Enable the features
| Admin display name | Feature ID | Adds |
|---|---|---|
| Data Pipelines | OrchardCore.DataPipelines | The designer, the runs, and the built-in steps. It enables Data Pipelines Core. |
| Speech Insights | CloudSolutions.Speech.Insights | The Speech Insights data source: tags, tag groups, indicators, indicator groups and call playbooks. |
| Speech Insights Export | CloudSolutions.Speech.Insights.Export | The Speech transcripts data source and the Read transcript changes step. |
| Tableau Data Pipelines | CloudSolutions.Tableau.DataPipelines | The Publish to Tableau step. On a tenant that has Speech Insights - Tableau Export, it is enabled with Data Pipelines. |
| Workflows | OrchardCore.Workflows | The Run Data Pipeline Task, to run a pipeline on a schedule. |
Each addition is available only when the Data Pipelines feature is enabled too.
A published pipeline runs with the access of the user who published it. This user must have the permissions of the data that the pipeline reads, and of the steps that it uses. See Permissions.
Data sources
Use the Read a data source step to read these data sets. Each run reads every row. Use the Read transcript changes step to read only the transcripts that changed.
Speech Insights
| Data set | One row per | Fields |
|---|---|---|
| Tags | Transcript tag | Tag ID, name, description, type, keyword, keyword filter and scope, group IDs, client IDs, active, created, author |
| Tag groups | Group of tags | Group ID, name, description, active, created, author |
| Tags of the tag groups | Tag and group that the tag is in | Tag ID, group ID |
| Indicators | Indicator | Indicator ID, name, description, value type, allowed values, index, group IDs, client IDs, active, created, author |
| Indicator groups | Group of indicators | Group ID, name, description, active, created, author |
| Indicators of the indicator groups | Indicator and group that the indicator is in | Indicator ID, group ID |
| Call playbooks | Call playbook | Playbook ID, name, description, version, index, number of phases and checks, client IDs, active, created, author |
| Call playbook phases | Phase of a playbook | Playbook ID, phase ID, position, name, description, transition cue |
| Call playbook checks | Check of a playbook | Playbook ID, check ID, position, name, instructions, phase ID, weight |
A list of identifiers, such as the group IDs of a tag, is one text with the identifiers separated by commas. Use the "of the groups" data sets to link the tags and the indicators to their groups.
Speech transcripts
Each Speech Insights index has two data sets:
| Data set | One row per | Fields |
|---|---|---|
| Transcripts (index) | Transcript of the index | The same fields as the file export: the transcript ID, the standard fields, the computed fields, one field for each additional metadata, each indicator and each call playbook value. It also has one yes/no field for each active tag, named after the tag, which tells whether the transcript has the tag. |
| Transcript tags (index) | Transcript and tag of the transcript | Transcript ID, tag ID, tag, qualification reason |
- An indicator with the Number or Date value type gives its number or date value. A duration, such as a talk time of
00:01:30, is a number of seconds. - These filters are applied in the Elasticsearch query, so a filtered read gets only the calls that can match and is fast:
- ClientId, CallDate and TranscriptId.
- Equals, In, Contains, Starts with and Ends with on a text field of the call that has exact values, such as AgentName, Disposition or QueueName, and on an additional metadata, such as Queue. Text compares ignore case.
- The other filters, such as a filter on an indicator or on a calculated field, are applied after the read.
- The Transcript ID of the transcript tags and the Tag ID refer to the transcripts and to the tags, so the designer suggests these joins.
Use the transcripts in the Report Builder
The Report Builder reads the same data sets. Add Transcripts (index) to a report, then drag a field onto Columns for each tag, indicator, playbook check or playbook phase measure that you need: each one is its own field. Do not mark a column as a measure to keep one row per call.
When a click on an agent in one visual filters the other visuals, the read of those visuals asks Elasticsearch only for the calls of that agent. Viewer filters on the agent name or an additional metadata, such as the queue, do the same.
Read the answer of an indicator
An indicator can return several values in one text, such as Assistance Offer Present: YES || Offer Type: NONE || Confidence: HIGH. The Speech Insights feature adds two functions to the formulas of the Add calculated fields step and of the Report Builder, with the names of the Tableau functions:
| Function | Result |
|---|---|
REGEXP_EXTRACT(text, pattern, [group]) | The text that the first match of the pattern captures: the group number you give, or else the first group of the pattern, or else the whole match. It is empty when nothing matches. |
REGEXP_MATCH(text, pattern) | TRUE when the text has a match of the pattern. |
- The patterns use the .NET syntax. Start a pattern with
(?i)to ignore case. - A pattern that is not valid, or that takes more than one second, gives an empty value, as the other functions of the formulas do.
- Use these functions to read each value, then score it:
UPPER(TRIM(REGEXP_EXTRACT([Indicator.QA04], '(?i)Assistance Offer Present\s*:\s*([^|;\r\n]+)')))
SWITCH([QA04 Present], 'YES', 100, 'NO', 0, NULL)
Read transcript changes
The Read transcript changes step is a source that keeps another system up to date with the transcripts of an index:
- The first run reads every transcript, with the change type
Snapshot. - The next runs read only the transcripts that changed since the last successful run:
Changedfor a transcript that was created or changed, andDeletedfor a transcript that was deleted, is no longer completed, or no longer matches the clients and the call dates of the step. A deleted row has a value only in the Transcript ID. - A run reads every transcript again after Start over, in the Actions menu of the pipeline, and when the index, the clients or the call dates of the step change.
| Setting | Description |
|---|---|
| Index | The Speech Insights index of the transcripts. |
| Fields | The fields to read, in order. Select none to read every field. The Transcript ID and the Change type are always read. |
| Clients | Reads only the transcripts of these clients. Shown when the Clients feature is enabled. |
| First call date, Last call date | Reads only the transcripts of the calls between these dates, inclusive. |
How the step tracks the changes:
- Each Read transcript changes step of a published pipeline has its own queue of changes. When a transcript is saved or deleted, its change goes to every queue. A transcript has one entry per queue: a later change replaces the entry.
- A run reads the changes that are at least two minutes old, so that the index has the changed document. The other changes wait for the next run.
- The changes leave the queue only when the run succeeds. When a run fails or is cancelled, the next run reads the same changes again.
- Deleting a pipeline, or publishing a version without the step, removes its queue. The next run of a new step reads every transcript.
Publish to Tableau
The Publish to Tableau step of the Tableau Data Pipelines feature sends rows to a Tableau Cloud data source, with the Tableau Cloud connection of the site (Settings > Tableau Cloud, see Configure WinnerWare). See Tableau Data Pipelines for its settings, and for how it keeps one row per key.
With the Speech Insights steps:
- After a Read transcript changes step, the step finds the
ChangeTypefield by itself, and the editor starts withTranscriptIdas the key field. The first run, and the run after Start over, publish every transcript. The next runs replace and delete the rows of the changed and deleted transcripts. So a transcript is in the data source once. - After a Read a data source step, such as the tags or the indicators, each run reads every row. Choose the key field of the data set, such as
TagId: each run then sends only the rows that were added, changed or removed, and a row that a join repeats is published once. Without a key field, each run sends every row again. - A field that is added to the source later, such as a new indicator, is not published until it is added to the columns, after Start over. When the columns that the step receives no longer match the published data source, such as after a mapped field was removed from the source, a run of changes fails and asks for Start over.
Run a pipeline on a schedule
Create a workflow with:
- A Timer Event, such as
*/5 * * * *to run every five minutes. - A Run Data Pipeline Task, with the pipeline, and Skip when a run is already queued or running enabled.
Add a Data Pipeline Run Completed Event workflow to notify someone when a run fails.
Replace a Tableau export pipeline
A data pipeline can replace a Tableau export pipeline of Speech Insights > Tableau Pipelines:
| Tableau export pipeline | Data pipeline |
|---|---|
| Index | Read transcript changes step: Index |
| Clients, call-date range | Read transcript changes step: Clients, First call date, Last call date |
| Fields | Read transcript changes step: Fields |
| Target column names and Tableau data types | Publish to Tableau step: Tableau columns |
| Mappings locked after the first publish | The Publish to Tableau editor locks the target and the columns after the first publish, until Start over |
| Tableau project, subfolder, data source name | Publish to Tableau step |
document_id key column | Key field: TranscriptId. Name its column document_id to keep the column of the old data source. |
| Active, 5-minute sync | A workflow with a Timer Event and the Run Data Pipeline Task |
| Run now | Run in the designer, or Run now in the Actions menu of the pipeline |
| Catch-up of failed runs | A failed run keeps its changes: the next run reads them again |
- Design the pipeline: Read transcript changes → Publish to Tableau, and choose the columns in the Publish to Tableau step. Add steps between them to filter or calculate fields.
- Use another data source name than the Tableau export pipeline, so that both can run while you compare the data. Or deactivate the Tableau export pipeline before the first run of the data pipeline, and use the same name.
- Publish the pipeline, and run it once to publish the data source.
- Create the workflow that runs it on a schedule.
Permissions
| To | The user who publishes the pipeline needs |
|---|---|
| Read the tags and the tag groups | Manage Speech Transcript Tags |
| Read the indicators and the indicator groups | Manage Speech Indicators |
| Read the call playbooks | Manage Call Playbooks |
| Read the transcripts of an index | Export speech transcript, and Query search index for the index |
| Publish to Tableau | Publish data to Tableau Cloud with the data pipelines, which Manage Tableau Export Pipelines includes |