This document shows how to configure and capture the data of a partially completed survey questionnaire using the flow studio.
This flow allows you to save a conversation of the user if it is not completed.
You can send him a link with the sessionid and/or flowid to prompt him to complete the partially finished survey.
Experience Manager
To capture the session details and the flow data, you have to create a dynamic schema.
...
Create a dynamic schema, name it, and include the fields “flowid”, “sessionid”, and “flowdata”. See, How do I create a schemaSchemas?
The following sample schema is a template that allows you to save data of a partially completed flow studio.
...
Sample URL (with flowid and sessionid): https://yourdomain.orbita.cloud:8443/oeapi/bot/myfirstchatbot?surveyIDflowId=5c1190a401bc681000d6698b&sessionId=:5a158f6422d2ab0f0036df81:c6388e6b-c0f7-4b0e-828f-2c665557a4cf
Append ?flowId='####'&sessionId='####' at the end of your chatbot URL to launch the partial flow.
Get survey ID and session ID
...
Code Block |
---|
var _ = global.get('lodash'); if(_.get(msg, 'payload.originalDetectIntentRequest.payload.flowIDflowId', undefined)){ msg.payload.flowId = _.get(msg, 'payload.originalDetectIntentRequest.payload.flowIDflowId', ''); } else{ msg.payload.flowId = ''; // Place your flow id here } var sessionId = _.get(msg, 'payload.originalDetectIntentRequest.payload.sessionId', null) if (sessionId){ _.set(msg, 'payload.sessionId', sessionId); } return msg; |
...
Code Block |
---|
var _ = global.get('lodash'); var flowContent = _.get(msg, 'data.dynamicData.result.0.flowdata', null); if (flowContent && flowContent.flowInfo) { _.set(msg, 'orbita.session.flowInfo', flowContent.flowInfo) } return msg; |
Save partial Flow studio data
...
This node will search for the sessionid from the dynamic data and deletes that document.
...
Attachments | ||||||||
---|---|---|---|---|---|---|---|---|
|
...
Filter by label (Content by label) | |||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|