Embedded Elements
What are Embedded Elements?
These are additional components that can be included in message content delivered to the Eduspot app. They can provide deep and rich integrations with your own platforms and can also serve a number of bespoke services within the app.
Any embedded elements in your message content will be rendered in the Eduspot app timeline for the user to interact with.
Formatting
The general format of the embedded elements are as follows:
<x-TYPE data="PAYLOAD" />
where the capitalised placeholders are:
TYPE, this determines the action or service that this element is representingPAYLOAD, this is a Base 64 encoded JSON string that provides the configuration instructions for the element.
Supported Element Types
Plugin
<x-plugin data="ewogICAgIlBsdWdpbk5hbWUiOiAic3...lua0RhdGEiOiAic3RyaW5nIgp9Cg==" />
This element allows you to provide a deep link into your own application. Such plugins are configured with the assistance of the VenturEd Solutions team.
{
"PluginName": "string",
"Text": "string",
"LinkData": "string"
}
The PluginName is the identifier of the plugin created for your purposes, it will be configured with an endpoint URL, and icon and other details. This element will render a link on a stylised button with the given Text in place. When the user clicks the button they will be navigated in-app to your endpoint with the given LinkData provided via a MessengerSSO secured payload.
This will allow you to identify the incoming user and you can authenticate them using the shared trust between Eduspot and your application. The context from the LinkData content can then be used to tailor the response or navigation into the app.
Calendar
<x-calendar data="ewogICAgInRleHQiOiAic3RyaW5nIi...RlVGltZSI6ICJkYXRldGltZSIKfQ==" />
This element allows the Eduspot app to generate and initiate the download of a standard iCalendar (.ics) formatted file within the app, used to save events to a user's calendar. On supported devices this element will also initiate the automatic event creation in the devices local calendar application.
{
"buttonText": "string",
"title": "string",
"location": "string",
"description": "string",
"startDateTime": "datetime",
"start": "date",
"endDateTime": "datetime",
"end": "date"
}
The buttonText parameter determines what textual content is displayed on the button. If no content is provided the default will be "Add to calendar". The remaining parameters describe the event that will be generated by the mobile app.
The title, location and description parameters control these named values of the event. The start/startDateTime and end/endDateTime parameters control the scheduling of the event with start and end taking priority over their conunterparts. The date and time elements should be parsable by a Javascript new Date("datetime") invocation.