Skip to content

Dixa Integration Guide

Introduction

nps.today for Dixa offers automatic survey triggers on conversation events, customer experience insight on your conversation, and P-GAP (Perception Gap) directly into your Dixa system. Our Dixa integration is an extension of your existing nps.today account and customer loyalty program.
Below GIF demonstrates how an agent will see responses from nps.today in Dixa. It will also show how an agent adds a P-GAP score. Read more about P-GAP here.

Dixa intro

Prerequisites

  • Have an nps.today subscription
  • IVR in nps.today is enabled
  • Have a Dixa subscription
  • Login with as an Administrator in Dixa
  • Login with as an Administrator in nps.today

Get Customer experience insight

With our Feedback Widget the Agent can see customer experience insight directly into your conversations in Dixa. If you need more technical information of the feedback Widget please click here.

Set up Custom Card

To set-up the feedback Widget in Dixa go to Setting -> Integration -> Conversation cards -> Custom Card.

Custom card

In the Custom Card set up add the following information:
Title: Give it a prober name
Method: POST
Hook URL:

https://api.nps.today/employees/token  
Custom card

Under Header put in the following:
Authentication method: Authorization header
Authorization header: Bearer
Token: Your nps.today API Key
Template content:

HTML Content
<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />
        <title>feedback-widget-nps-today</title>
    </head>
    <script>
        const feedbackWidgetSrc = "https://feedback.widget.nps.today?operationMode=admin";
        /*
        * Set initial parameters -
        */
        const token = "{{ token }}";;
        const respondentEmail = "{{ echo.customer_email }}"; 
        const respondentPhone = "{{ echo.customer_phone_number }}";

        /*
        * If you want to change the parameters after the widget is loaded,
        * you can do so by dispatching a custom event - see below
        */
        /*
        document.body.dispatchEvent(
            new CustomEvent("feedback-widget-nps-today-update-parameters", {
                parameters: {
                    respondentEmail: newRespondentEmail,
                    respondentPhone: newRespondentPhone,
                },
            })
        );
        */
    </script>
    <body>
        <iframe
            title="feedback-widget-nps-today"
            id="feedback-widget-nps-today"
            width="100%"
            height="600px"
            frameborder="0"
        >
        </iframe>
        <script>
            const iframeElement = document.getElementById("feedback-widget-nps-today");
            const setFeedbackWidgetParameters = (parameters) => {
                iframeElement.contentWindow.postMessage(
                    {
                        action: "SET_PARAMETERS",
                        parameters: {...parameters},
                    },
                    "*" // use feedbackWidgetSrc attribute, if inviornment allows
                );
            };
            window.addEventListener("message", (event) => {
                if (event.data && event.data.action === "FEEDBACK_WIDGET_READY") {
                    setFeedbackWidgetParameters({
                        token: token,
                        respondentEmail: respondentEmail,
                        respondentPhone: respondentPhone,
                    });
                }
            });
            // Listen for custom events to provide the feedback widget with new data
            document.body.addEventListener("feedback-widget-nps-today-update-parameters", (event) => {
                setFeedbackWidgetParameters({
                    ...event.parameters,
                });
            });
            iframeElement.src = feedbackWidgetSrc;
        </script>
    </body>
</html>  

Custom card

Under Body put in the following:
Content type: application/json
Body:

Body Content
{
    "employeeEmail": "{{agent_email}}",
    "customer_email": "{{customer_email}}",
    "customer_phone_number": "{{customer_phone_number}}"
}

Custom card

Now Click “Save changes”

Test your Custom Card

You can test your Custom Card to see if it works.
In the Conversation Cards overview click “Test” on your Custom Card.
Custom card test

Now add a Parameter like the customer email og phone number and click “Test”.
You can find more info about Dixa placeholders on the Dixa documentaion page. Add paraemters

If your Test Result looks similar to the picture below the test was a success.
Custom card test

The Conversation Card is now visible on your Conversations.

Trigger a survey

With this integration you can set up automatic survey triggers on events with Dixa Webhooks.
If you need to add more logic or conditions, other than e.g. conversation closed, you can use a third party system like Microsoft Power Automate. See this guide for more information.

Set-up your Dixa webhook

Log in to your Dixa Account.
Go to Settings -> Integration -> Webhooks. Now add a new webhook. Dixa Web

When setting up the webhook you should put in the following information:
Name: give it a prober name
Webhook URL:

https://functions.nps.today/api/dixa/relay
Enable Authentication and select “Token”
Token: Your nps.today API Key
Event: Closed

When saving the webhook you created the connection to nps.today.

Setting up Dixa IVR in nps.today

By setting up IVR in nps.today you create the connection between your queues in Dixa and your campaigns in nps.today. This means that you decide what survey should be triggered when a queue conversation is closed.

Before setting up the IVR you need to find your Queue Id and Dixa API Key.

Queue Id

Warning

You can't find the Queue Id if you are using the desktop client or mobile app. Please go to the web client or contact Dixa support.

Find the Queue Id by going to Settings -> Queues and scelect your Queue that you like to connect to a campaign in nps.today.
QueueID Dixa

Dixa API Key

Go to Settings -> Intergations -> API tokens and click “Add API token”. API token Dixa

Give it a prober name and click “Save changes” and get your Dixa API Key (Token).
API token Dixa

IVR set-up

Log in to your nps.today account with an Admin user.

Go to IVR and click "Add IVR" if IVR is not visible please contact nps.today Support at support@npstoday.com
IVR

Now put in the following information in the IVR set-up:
Name: Give it a prober name
IVR Provider: Dixa
Campaign: Scelect the campaign that should trigger a survey
Queue Id: Put in the Queue Id from Dixa
Dixa API Key: Put in the API Token from Dixa

Click “Save”
IVR

Now every time we close a conversation in the queue with Queue Id = 986359e5-e201-48ab-84af-c7799e03e58c we trigger a survey from the campaign Relationsmåling Q1 with the CampaignID 7232.

IVR

Set-up P-GAP

By adding P-GAP you enable the agent to give a rating, on how they perceived the conversation in Dixa that is about to close, on a scale for 0 to 10.

Go to Settings -> Custom attributes and click “Add attribute”
P-GAP

Put in the following information:
Attribute type: Select
Display label: Give it a prober name
Technical identifier: p_gap
Required for agents to fill: Enable
Add Label and Value from 0 to 10

And click “Create”.
P-GAP

A P-GAP rating is now required from the Agent before they can close a conversation in Dixa and trigger a survey.
P-GAP

Congratulations

Now you have set-up the nps.today integration to Dixa. If you have any comments or questions regarding this integration, please contact support@npstoday.com.