SampleNinja
If you run your own panel on SampleNinja, you can connect it to an Opini.ai project directly from the Fieldwork page. Use it like any panel provider, sending respondents back to the SampleNinja project when they finish. Or use it for profiling surveys, where Opini.ai writes each completed answer into the panelist's SampleNinja profile.
Fieldwork from your panel
Panelists arrive from a SampleNinja project and go back to its exit links as a complete, terminate or quota full. SampleNinja handles incentives as usual.
Fill your profile variables
On every complete, the answers you map are written to the panelist's SampleNinja data variables, ready for targeting your next project.
Both are the same source. Writing answers back is a switch you turn on, so you can combine them: a profiling survey that also returns panelists to a SampleNinja project.
What you'll need
- Your panel URL: the address of your SampleNinja panel, e.g.
https://yourpanel.panelservice.io. - Only if you want answers written back: an API client for your panel, meaning a Client ID and API key. Your SampleNinja administrator can create one. The Client ID is a number such as
4, not the client's name.
Adding the source
- 01
Open the Custom dialog
On the project's Fieldwork page, click Custom under Add another source, then choose SampleNinja.
- 02
Enter your panel
Fill in the Panel URL. Panelist ID parameter is the name of the link parameter that carries the panelist's ID. It is id by default, which is what SampleNinja sends.
- 03
Choose where respondents go when they finish
Return to the SampleNinja project, or send everyone to one page. See below.
- 04
Copy the survey link into SampleNinja
Use the Survey link shown in the dialog as the entry link of your SampleNinja project.
- 05
Optionally, write answers to the panel
Turn on Write answers to the panel?, enter your Client ID and API key, click Connect and map your questions. Then click Save.

When respondents finish
| Option | Where respondents go | Use it for |
|---|---|---|
| Return to the SampleNinja project | Your panel's exit links: completes to /p/exit?s=c, terminates to s=p and quota fulls to s=q. The panelist ID and SampleNinja's session value are passed back. | Regular fieldwork run as a SampleNinja project. This is the default. |
| Send everyone to one page | One URL you enter, such as your panel's website, whatever the outcome. | Profiling surveys sent to panelists outside a SampleNinja project. |
The Survey link follows your choice. When returning to a project, it's the plain link, and SampleNinja adds the panelist ID and session itself. When sending everyone to one page, the link ends in ?id=, ready for you to add each panelist's ID, for example as a merge field in an invitation email.
Writing answers to the panel
Turn on Write answers to the panel? and enter your Client ID and API key. Click Connect to load your panel's data variables. Under Profile variables, each question that can be written back is listed: Single, Multi and Open questions. Pick the data variable each one should fill, or Don't write to skip it.

- Automatic matching: when you connect, questions whose text matches a data variable's question text are mapped for you. Check them, and map the rest by hand.
- Single and Multi questions send the value of each chosen answer. It must equal the option's ID in SampleNinja. The dialog warns you when an answer's value has no matching option. Fix it by changing the answer's value in the questionnaire.
- Open questions send the typed text.
Editing the source
Edit on the Custom card reopens the SampleNinja dialog with your settings and mappings. Your API key is stored securely and never shown again. The field reads Saved - leave blank to keep, so only fill it in to replace the key. You can change mappings at any time. New completes use the mappings saved at the time.
Troubleshooting
| What you see | Likely cause | What to do |
|---|---|---|
| Client authentication failed | The Client ID or API key is wrong. | Use the numeric Client ID, not the client's name, and paste the API key again. |
| Lists say Connect to load variables | The dialog isn't connected yet. | Fill in the Panel URL, Client ID and API key, then click Connect. |
| A warning next to a mapping | Some answer values don't match the data variable's option IDs. | Change the answer values in the questionnaire to the SampleNinja option IDs. |
| Profile not updated after a complete | The respondent arrived without a panelist ID, or none of the mapped questions was answered. | Check the survey link carries the panelist ID in the Panelist ID parameter. |