Adobe Captivate
This page shows how to connect a SlideMind slide to an Adobe Captivate project: which variables to create, where to paste the integration code, and how to test it. It is for course authors who build their screens in Captivate.
Status: Beta
How it works
Section titled “How it works”You design the screen in Captivate: a text entry box, a button and a caption. The integration code runs in your published course when the learner clicks the button. It reads the learner’s text from a Captivate variable, sends it to SlideMind with the learner’s ID from your LMS, and writes the AI’s reply into another Captivate variable that your caption displays. Your instructions stay in SlideMind, and learners never see them.
Before you start
Section titled “Before you start”- You have a slide that answers well in Try it. See Create a slide.
- The slide is published. As the app warns, “Your course gets no answer from a draft.”
- The AI is connected: SlideMind Credits or your own provider key. See Choosing how AI is funded.
- The site that hosts your course (your LMS) is listed in Settings › Integrations › Allowed origins, or the list is empty. See Allowed websites.
Choose Captivate as the destination
Section titled “Choose Captivate as the destination”New slides start with the workspace’s Default editor (Settings › Integrations). To change the destination of a slide:
- Open the slide in the slide editor.
- In the Activity box, select Change.
- In the Activity and destination dialog, set Interface to Authoring tool and Destination to Adobe Captivate. For a Memory capture slide, the first field is Integration method: choose Authoring tool connection.
- Select Done.
The last step of the slide editor is now called Set it up in Captivate.
Variables to create in Captivate
Section titled “Variables to create in Captivate”The Integration variables box of the Installation step lists the names for your slide. Create each variable you need in Captivate as a user variable, with exactly the same name.
| Variable (as labeled in SlideMind) | Example name | What it does | When you need it |
|---|---|---|---|
| Learner question | userMsg_s3_coachingFeedback | The code reads the learner’s text from it. | Q&A and Chat |
| AI answer | aiResp_s3_coachingFeedback | The code writes the AI’s reply into it. With structured results, it receives the text of the first Text field, never the raw JSON. | Q&A and Chat |
| Error variable | aiResp_s3_coachingFeedback_err | Receives a short message when a call fails or a structured result is incomplete. | Recommended |
| Structured JSON | aiResp_s3_coachingFeedback_json | Receives the whole structured result as JSON text. | Reply format set to Structured JSON |
| Each return field (Return field) | aiResp_s3_coachingFeedback_score | Receives one field of the structured result. Its name is the AI answer name, an underscore, then the field name. | Reply format set to Structured JSON |
| Conversation history (text) | aiResp_s3_coachingFeedback_history | Keeps the conversation, so the AI remembers earlier turns. | Chat |
| Conversation ended (true/false) | aiResp_s3_coachingFeedback_done | Becomes true after the last turn the slide allows. | Chat |
| Turns answered (number) | aiResp_s3_coachingFeedback_turns | The learner turns that got a reply. A failed request doesn’t count. | Chat, optional |
| Turn limit (number, 0 when unlimited) | aiResp_s3_coachingFeedback_max_turns | The slide’s turn limit, or 0 without a limit. | Chat, optional |
| Values from Captivate | The names used in your instructions | The code reads them and sends them with the learner’s text. | When your instructions use them |
| Each Authoring tool variable under Capture variables during the AI call | Your own names | The code reads them when it calls the AI, and SlideMind saves them in the learner’s memory. | When the slide saves them |
The app lists the Error variable only for slides with structured results, but the code also writes it when a call fails. Create it on every slide so you can see what went wrong. See Troubleshooting below.
Variable names
Section titled “Variable names”SlideMind builds the names from the slide’s number and title, so that several slides can live in one Captivate project without clashing. Slide 3, titled “Coaching feedback”, gets userMsg_s3_coachingFeedback and aiResp_s3_coachingFeedback. The other names (…_err, …_json, …_history, …_done, …_turns, …_max_turns and one per return field) follow the AI answer name.
To use your own names, type them in the Learner question and AI answer fields of the Installation step. Use letters, digits and underscores only, without a digit at the start. The copy button beside each field copies the name, and the reset button returns to the generated name. Every other name in the list has a copy button too.
Set it up in Captivate
Section titled “Set it up in Captivate”These are the setup steps the app shows in the Installation step:
- In Captivate, create two user variables named after the Learner question and AI answer fields (plus the optional variables you need).
- Add a text entry box for the learner and assign it the Learner question variable.
- Add a button whose action is Execute JavaScript and paste the integration code (see the next section).
- Show the reply in a caption by inserting the AI answer variable between double dollar signs, for example
$$aiResp_s3_coachingFeedback$$. - Test it in the published course (HTML5 output, opened in a browser).
In the app, the steps show the actual names of your slide, exactly as you paste them in Captivate, double dollar signs included in step 4. Click a name to copy it.
Copy the integration code
Section titled “Copy the integration code”In the Installation step of the slide editor:
- Select Copy the code. If the slide has unsaved changes, the button reads Save & copy the code: it saves the slide, then copies. The code is always Built from the saved slide.
- To read the code first, open Show the code.
- If the step shows This slide is not published yet, select Publish.
Paste the code unchanged into the Execute JavaScript action of your button. A Q&A slide produces code that starts like this (shortened):
// === SlideMind Integration: Coaching feedback (qa) ===// Run after cpAPIInterface is available.var configUid = "abc123";var baseUrl = "https://api.slidemind.app/api/v1";// … learner detection …var userMessage = cpAPIInterface.getVariableValue("userMsg_s3_coachingFeedback");// … request to SlideMind …cpAPIInterface.setVariableValue("aiResp_s3_coachingFeedback", data.message.content);The code reads and writes variables through Captivate’s JavaScript interface (cpAPIInterface). Run it from a learner action, such as a button click, once the course has loaded.
What the code does
Section titled “What the code does”- It looks for the learner’s ID in your LMS. Without an ID, the slide still answers, but learner memory stays off. See Identifying learners.
- It reads the Learner question variable and any Values from Captivate, and sends them to SlideMind.
- It writes the reply into the AI answer variable.
- With Structured JSON, it writes
…_json, and the AI answer variable receives the text of the first Text field (it stays empty without one). When the result is complete, it also writes each field into its own variable, for exampleaiResp_s3_coachingFeedback_score. When fields are missing, it writes none of them, so your scores and branches keep their previous values, and…_errexplains which fields are missing. - When SlideMind is busy, the code waits and tries again a few times on its own before it reports an error.
Chat slides
Section titled “Chat slides”A Chat slide needs the Conversation history (text) and Conversation ended (true/false) variables. As the app explains: “The code keeps the conversation in the history variable and sends it with every message, so the AI remembers earlier turns. It sets the ended variable to true after the last turn allowed by the slide. To start over, set the history variable to an empty text.”
- The Opening message of the Conversation step is sent to the AI at the head of the conversation, so it knows what the learner read. Show the same text on your Captivate screen.
- The history is updated only after a successful reply.
- An empty message is not sent.
- Once the turn limit is reached, the code sends nothing more. Use the
…_donevariable to move the learner on, for example to show a Next button. - The turn limit is written into the code. If you change it in SlideMind, copy the code again.
- To show a counter such as “2/4”, create the optional
…_turnsand…_max_turnsnumber variables and show them side by side. The code writes both when a message is sent, then adds 1 to…_turnsafter each successful reply. Code copied before October 26, 2026 doesn’t write them: copy it again.
Capture slides
Section titled “Capture slides”A Memory capture slide saves Captivate values in the learner’s memory, with no AI call. The Installation step shows these steps:
- In Captivate, make sure the variables this slide captures exist, with exactly the same names.
- Run the code from Copy the code in an Execute JavaScript action at the moment those values are known (for example when the learner clicks Continue).
- Test it in the published course launched from your LMS: only an LMS identifies the learner.
Each value is saved under the memory key and scope set in the slide’s Values to remember step. When the slide has no such settings, choose the scope under Capture scope before you copy the code. Without an identified learner, nothing is saved. See Saving values.
Test your slide
Section titled “Test your slide”- In the slide editor, use Try it. Under Captivate variables after the reply, it shows the values your Captivate variables would receive. Each test is a real AI call.
- Publish your Captivate project to HTML5 and open it in a browser. Captivate previews do not always run JavaScript.
- To test learner memory, launch the published course from your LMS (or a SCORM test service such as SCORM Cloud). Previews and share links never identify a learner.
See Test before going live for the full checklist.
When to copy the code again
Section titled “When to copy the code again”Changes to the instructions, the question, the model and its response settings, and the slide’s status apply right away, without touching Captivate. Copy the code again and replace it in your action after you:
- change the activity type;
- rename the Learner question or AI answer variable;
- add a Values from Captivate entry, or add or rename a return field;
- add an Authoring tool variable under Capture variables during the AI call;
- change the Chat turn limit;
- change what a Capture slide saves, or its scope.
See Changing a slide after installation for the full list.
Troubleshooting
Section titled “Troubleshooting”When a call fails, the code writes a message into the Error variable (…_err) and leaves the AI answer variable unchanged. The code does not clear …_err after a later successful call: if you display it, empty it yourself before each call.
The values you are most likely to see are SlideMind error (0) (the site that hosts the course is not in Allowed origins), SlideMind error (403) (the slide is not published) and SlideMind error (429) (SlideMind stayed busy after the automatic retries, or the workspace reached its fair-use limit). SlideMind error codes lists every value with its cause and what to do.
If nothing happens at all, open your browser’s developer console in the published course. An error that mentions cpAPIInterface means the code could not reach Captivate’s JavaScript interface: check that it runs from an Execute JavaScript action in the published HTML5 output. Then check that every variable exists in Captivate with the exact name. See also Troubleshooting.