New: Want to see the latest tools? Read our 2026 Developer Guides on AI Companions & Generators

Output Templates

By Ruben Aegerter ยท Last updated Mar 2024 ยท v4.x

Output Templates are Jovo's platform-agnostic response system. Instead of writing Alexa-specific JSON and Google-specific JSON separately, you define your response once as an Output Template โ€” and Jovo translates it to the correct format for each platform at runtime.

Overview

In Jovo v4, every handler returns an Output object. The simplest form is a message string:

LAUNCH() {

return this.$send({ message: 'Hello world!' });

}

Under the hood, Jovo converts this into the platform-specific response JSON. For Alexa, this becomes an outputSpeech directive with SSML. For Google, it becomes a simpleResponse. For the web, it becomes a chat message.

Output Properties

PropertyTypeDescription
messagestringThe main speech/text output
repromptstringFollow-up prompt if user doesn't respond
listenbooleanKeep the mic open (true) or end session (false)
cardobjectVisual card for screen-enabled devices
carouselobject[]Scrollable list of items
platformsobjectPlatform-specific overrides (APL, Chips, etc.)

Platform-Specific Responses

Use the platforms property to add platform-specific features alongside your generic response:

return this.$send({

message: 'Here are some options.',

platforms: {

alexa: {

nativeResponse: {

// Alexa APL directive

directives: [{ type: 'Alexa.Presentation.APL.RenderDocument', ... }]

}

},

googleAssistant: {

nativeResponse: {

suggestions: [{ title: 'Option A' }, { title: 'Option B' }]

}

}

}

});

SSML Support

Jovo automatically wraps your message in <speak> tags when sending to voice platforms. You can also use SSML directly:

message: '<speak>Welcome <break time="500ms"/> to the quiz!</speak>'

i18n / Internationalization

Output Templates work seamlessly with Jovo's i18n system. Store your messages in a CMS (Google Sheets, Airtable, Sanity) or local JSON files, and reference them by key:

message: this.$t('welcome_message')

See Google Sheets CMS Tutorial for a complete walkthrough of CMS-driven content.