Forum Discussion
Data exchange in Storyline 360 - in both directions
Hi Andreas
It's a pretty broad question. There are many ways you might approach sending data from Storyline 360 such as using an xAPI call to lodge data in an LRS database or using JavaScript API's to write data to Google Docs etc. There are many articles on this site that address this issue... We recently implemented a Storyline Course evaluation form on our own website that sends data to a node.js app on our server which then logs the evaluation scores in an SQL database on the server (but that's definitely not for the feint-hearted!).
There less discussion to be found about receiving data in a Storyline course. It's definitely possible and we have done a couple of projects that successfully use event handlers in JavaScript code within Storyline.
This simple card exercise I shared a link to on a recent post does exactly that:
In this demo the card is displayed in an HTML/JavaScript page which is loaded as a web object in Storyline. Clicking a button sends a message to an event handler in the web object that then selects a card at random from a deck of cards it has read in, displays it and then sends a message back to the Storyline via an event handler in Storyline JavaScript code. The JavaScript in Storyline updates a variable (the card description) and you can use a trigger that will be activated if the value of that variable changes setting up a two-way dialogue between Storyline and the Web Object, which (I think) was your question....
Before anyone asks, sharing the code for this wouldn't be possible as it only works in a specific environment. There are all sorts of security and CORS issues to take into account.... In my case the web object and Storyline are loaded on the same domain and they check that the messages they receive come from that specific domain...
Hope this helps a little...