Skip to main content
1

Ask Forsta to Allow Outbound Calls

Request Forsta/Decipher support to whitelist the ReDem API:
If JavaScript is not allowed, use a server-side call with the same structure.
2

Create the ReDem Payload Container

Add a hidden question at the top of your XML (before <suspend/>):
Add the initial window.reDem object:
3

Set Up BAS Tracking (Behavioral Analysis)

In order to use the BAS you must include a custom tracker based on this sample: Behavior Tracking. Since it requires customization, this is not available via CDN, so copy the code from that sample and adapt it to each open-end:
  • Replace QUESTION_ID with your Decipher label (D2, OE1, etc.)
  • Ensure textarea has consistent IDs or selectors for the tracker to bind properly.
The tracker logs KEYSTROKE and COPY_AND_PASTE events into sessionStorage.
4

Add Helper Function for Datapoints

Include the following helper once, preferably in survey.before:
5

Push Datapoints During Survey

Use below list for where and how to add datapoints:Quality Checks: OES
Where: question.after on open-ends
Sample:
Quality Checks: BAS
Where: Same page as OES open-end
Sample:
Quality Checks: TS
Where: After any page to measure time
Sample:
Quality Checks: GQS
Where: After grid matrix questions
Sample:
Quality Checks: CHS
Where: Final page
Sample:
6

Call ReDem API on the Final Page

Add a new page (e.g., ReDem_Screen) after the last <suspend/> with a “please wait…” message.In question.after, add:
7

(Optional) Parse ReDem Scores into Export

Use the response_json row to extract and write additional scores to hidden questions:
8

Testing Checklist

  • Preview survey and provide multiple realistic answers.
  • Open DevTools → Network and confirm a 200 response from /v2/addRespondent.
  • Check that payload_json and response_json rows are populated.
  • Use sessionStorage.clear() on survey entry to reset BAS tracker data.
Quick Reference: Required Fields