Trace Types

Overview

Flows in Voiceflow are a composed of a variety of elements such as steps and links. Voiceflow steps have corresponding JSON traces. Step traces are used by Web Chat — and can be used by custom integrations — to determine what should be presented to the user upon events such as conversation launch, utterance submission, and button selection.

Trace objects returned by the Dialog Manager API have a type attribute that identifies the type of element and a payload object with additional data such as a step’s response content or a button’s label. The Dialog Manager API interact endpoint returns an array of trace objects.

Below are key trace types that you will encounter.

type: text

This trace type is returned for the following Voiceflow elements:

  • Text Step
  • Response AI Step
  • No match re-prompt
  • No reply re-prompt
  • Global No Match
  • Global No Reply

Example payload:

{
  "type": "text",
  "payload": {
    "slate": {
      "id": "", // unique string generated by Voiceflow
      "content": [
        {
          "children": [
            {
              "text": "Hello there!"
            }
          ]
        },
        {
          "children": [
            {
              "text": ""
            }
          ]
        },
        {
          "children": [
            {
              "text": "Select an option or ask me a question"
            }
          ]
        }
      ],
      "messageDelayMilliseconds": 1000 // default is 1000ms between responses
    },
    "message": "Hello there!\n\nSelect an option or ask me a question",
    "delay": 1000 // default is 1000ms between responses
  }
}

type: speak

This trace type is returned for the following Voiceflow elements:

  • Speak Step
  • Audio Step
  • No match reprompt
  • No reply reprompt
  • Global No Match
  • Global No Reply

Speak Step example:

The src value for Speak steps is a data URI generated by Voiceflow.

{
  "type": "speak",
  "payload": {
    "message": "Hello there!",
    "type": "message",
    "src": "data:audio/mpeg;base64,SUQzBAAAAAAAI1RTU0UAAAAPAAADTGF2ZjU4Ljc2LjEwMAAAAAAAAAAAAAAA//NgxAAc4m3kI0YYABFACDnkyZO7QIIRj3sEyd37u7EIiIiIj/EQv4gAhO8A3gAACE/+u/o7u///u7hxboiAAAiFUREREQv+u7n/8Qv+IibgAAAIiIVRC3d3cQIBA5wfygIO4gy4fKAgCb+H1AgCBkuD4PnwfD8QO5QH3hiCZ8EFFo122sG2s0Wj1eqGYz2aSOkXGXQMQkYzj+eL//NixBsl277SX41oAubhWjKHIIOMGOfjcShuKQ+Eomo0YxIRiPBicYGCcl3mIyxhC4SibKN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/////7SNVUQcAgsKAcGjge+Orl4CjwyOEjBAXDgIHAFnr+Sm27sFNs0mLsRgqVxyG2Su81pEJjztStnL1Q+yllr/IhJjlUSA522eJDKbgoSttaOoOppFxmtFQZb6D2tTw8NwlRRwHT/82DE7iNKLlQA5g58///9f//Uie38dLfs5QRgdKC0AkVCsYPGrZqcqWcZwVEhr/kX//v//S5rCVT7+pUpjSfMno05Sek62AAqXkUDVQWQydtUOb4kauK4380ZmFqeOStgT1riiGl2NMfpPk+jTSUq5XkmgCdJMyTeVbNthgCitcysbo+Yz6leYzylK/L/YxxPlL9fVnKpHLLSu2b/82LE7yOSQjwI5g5+dqGflp0N0MbUvoaYU0iWQRyLXktZ2sYVBoqdwaeJQVKu2REv7ExBTUUzLjEwMFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV//NixPAhQsoQCsvEfFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVQ==",
    "voice": "Ivy"
  }
}

Audio Step example:

The src value for Audio steps is a URL to the file and are generated by Voiceflow.

The message value will be an empty string for Audio steps.

{
  "type": "speak",
  "payload": {
    "message": "",
    "type": "audio",
    "src": "https://s3.amazonaws.com/com.example.audio.production/example-file.mp3"
  }
}

type: visual

This trace type is returned for the following Voiceflow elements: Image Step.

The dimentions attribute value can be null.

{
  "type": "visual",
  "payload": {
    "visualType": "image",
    "image": "https://assets-global.website-files.com/example-file.png",
    "dimensions": {
      "width": 800,
      "height": 800
    },
    "canvasVisibility": "full"
  }
}

type: cardV2

This trace type is returned for the following Voiceflow elements: Card Step.

When you encounter a trace with a button, take note of the button objects' request.type values. A request.type value is a Voiceflow-generated path ID for the next element, and will need to be included in the next request to the Dialog Manager API upon button click.

{
  "type": "cardV2",
  "payload": {
    "imageUrl": "https://assets-global.website-files.com/example-file.png",
    "description": {
      "slate": [
        {
          "children": [
            {
              "text": "This is a Card description"
            }
          ]
        }
      ],
      "text": "This is a Card description"
    },
    "buttons": [
      {
        "name": "Click for next step",
        "request": {
          "type": "", // path ID generated by Voiceflow
          "payload": {
            "actions": [],
            "label": "Click for next step"
          }
        }
      }
    ],
    "title": "This is a Card title"
  }
}

type: no-reply

This trace type is returned for the following Voiceflow elements: No Reply.

This example trace is for a no-reply with a timeout set to 10 seconds:

{
  "type": "no-reply",
  "payload": {
    "timeout": 10 // converted to seconds
  }
}

Note: If you encounter this trace, a No Reply setting was enabled. If the user does not complete an event (e.g. send a message) within the timeout specified, send another request to the Dialog Manager API to fetch the corresponding no-reply message. The request body format would be the below, and the returned trace type will be type: text:

{
  "request": {
    "type": "no-reply"
  }
}

type: carousel

This trace type is returned for the following Voiceflow elements: Carousel Step.

When you encounter a trace with a button, take note of the button objects' request.type values. A request.type value is a Voiceflow-generated path ID for the next element, and will need to be included in the next request to the Dialog Manager API upon button click.

This example trace is for a Carousel with two Cards:

{
  "type": "carousel",
  "payload": {
    "layout": "Carousel",
    "cards": [
      {
        "id": "", // unique string generated by Voiceflow
        "title": "This is a Carousel card title",
        "description": {
          "slate": [
            {
              "children": [
                {
                  "text": "This is a Carousel card description"
                }
              ]
            }
          ],
          "text": "This is a Carousel card description"
        },
        "imageUrl": "https://assets-global.website-files.com/example-file.png",
        "buttons": [
          {
            "name": "Click for next step",
            "request": {
              "type": "", // path ID generated by Voiceflow
              "payload": {
                "label": "Click for next step",
                "actions": []
              }
            }
          }
        ]
      },
      {
        "id": "", // unique string generated by Voiceflow
        "title": "This is a second Carousel card title",
        "description": {
          "slate": [
            {
              "children": [
                {
                  "text": "This is a second Carousel card description. For this card, the image was uploaded as a png file."
                }
              ]
            }
          ],
          "text": "This is a second Carousel card description. For this card, the image was uploaded as a png file."
        },
        "imageUrl": "https://cm4-production-assets.s3.amazonaws.com/example-file.png",
        "buttons": [
          {
            "name": "Click for next step",
            "request": {
              "type": "", // path ID generated by Voiceflow
              "payload": {
                "label": "Click for next step",
                "actions": []
              }
            }
          }
        ]
      }
    ]
  }
}

type: choice (button step)

This trace type is returned for the following Voiceflow elements: Button Step.

When you encounter a trace with a button, take note of the button objects' request.type values. The request.type value will determine how you retrieve the next elements via the Dialog Manager API upon button click (examples below).

The below example trace is for a Button step with two buttons and no intents:

{
  "type": "choice",
  "payload": {
    "buttons": [
      {
        "name": "Check Account Balance",
        "request": {
          "type": "", // path ID generated by Voiceflow
          "payload": {
            "label": "Check Account Balance",
            "actions": []
          }
        }
      },
      {
        "name": "Forgot Password",
        "request": {
          "type": "", // path ID generated by Voiceflow
          "payload": {
            "label": "Forgot Password",
            "actions": []
          
        }
      }
    ]
  }
}

Notes on the above example:

  • The request.type values for these buttons would be Voiceflow-generated path IDs for the next elements.
  • In this case, upon button click: call the Dialog Manager API with the path ID as the action.type value to retrieve the next elements. For example, if the request.type value for the button is “path-xyz”, the request body would look like the below. (request.payload.label value is optional; if included in the request, the value will be set as the last_utterance variable value)
{
  "request": {
    "type": "path-xyz",
    "payload": {
      "label": "Check Account Balance"
    }
  }
}

The below example trace is for a Button step with two buttons with intents attached:

{
  "type": "choice",
  "payload": {
    "buttons": [
      {
        "name": "Check Account Balance",
        "request": {
          "type": "intent",
          "payload": {
            "query": "Check Account Balance",
            "label": "Check Account Balance",
            "intent": {
              "name": "check_account_balance"
            },
            "actions": [],
            "entities": []
          }
        }
      },
      {
        "name": "Forgot Password",
        "request": {
          "type": "intent",
          "payload": {
            "query": "Forgot Password",
            "label": "Forgot Password",
            "intent": {
              "name": "forgot_password"
            },
            "actions": [],
            "entities": []
          }
        }
      }
    ]
  }
}

Notes on the above example:

  • The request.type values for these buttons are “intent” and both have intent.name values in the payload.
  • In this case, upon button click: call the Dialog Manager API with the intent name to retrieve the next elements. For example, if the request.type value is “intent” and the request.payload.intent.name is “forgot_password”, the request body would look like the below. [Alternatively, you could use a "text" request (e.g. { "action": { "type": "text", "payload": "Forgot Password" } }); this option would first pass the payload value through intent detection.]
{
  "action": {
    "type": "intent",
    "payload": {
      "intent": {
        "name": "forgot_password"
      },
      "query": "",
      "entities": []
    }
  }
}

Custom Actions

A Custom Action trace type value will match the string entered for the corresponding Custom Action in the Creator App.

The defaultPath attribute is useful if you want to set a default path during prototyping or user testing. The value will be 0 if the Custom Action's first path is assigned as the default in the Creator App, 1 if the second path is assigned, 2 if the third path is assigned, and so on.

Example with the Action Body format set to “Text” in the Creator App:

{
  "type": "calendar",
  "payload": "{\n  \"today\": 1700096546693\n}",
  "defaultPath": 0,
  "paths": [
    {
      "event": {
        "type": "done"
      }
    },
    {
      "event": {
        "type": "cancel"
      }
    }
  ]
}

Example with the Action Body format set to “JSON” in the Creator App:

{
  "type": "calendar",
  "payload": {
    "today": 1700096585398
  },
  "defaultPath": 0,
  "paths": [
    {
      "event": {
        "type": "done"
      }
    },
    {
      "event": {
        "type": "cancel"
      }
    }
  ]
}

type: end

This trace will be returned when an End action is reached in the design.

Example for a Chat Agent:

{
    "type": "end",
    "payload": null
}

Example for a Voice Agent:

{
    "type": "end"
}