Different assessments for apply gate buttons


Our customers may potentially have between 1-10 assessments they may wish to use for different kinds of pre-screening.

Should we provide a button for each one? Or can we have some kind of configuration with the button? I notice there is a mayRequireSetupFlag on the button. What does this do?



If you had ten buttons, and each one was a different quiz, then the customer would see them all in switchgear.

They could get confused and add e.g. 3 buttons to a single job. That would lead to a weird experience for the candidate, as they’d need to complete all 3 quizzes successfully before the apply button appeared!

So if you don’t want to use “button per quiz”, then another approach would be to have just one button, and use a setup page on the button (mayRequireSetupFlag as you have noticed).

Presenting a setup page for your button

To present your setup page for a specific job, produce e.g. GET /actions/byCandidate/job/possibles/byApp/byName/{action}/{uiMode}/{internal}/setupPage/forJob/{job}.

The customer sees your setup page when they link the button to a specific job in switchgear.

On your setup page you could e.g. show a dropdown of available test types. When the customer chooses one, your setup page stores it in its own database, keyed by job id. Then at runtime, your button can show the candidate the correct quiz for the job.

You can also present setup pages to capture global or per-workflow default values from the user.

Displaying results

Whichever way you go, to actually display the results of your quiz/experience to the recruiter, currently you’ll need to store them as an assessment result.

To do this, create an assessment type just for this, and have the customer set it in the switchgear app to auto-start only - on every job, every time a new applicant arrives. When the assessment starts, your app completes it immediately with the quiz results that your button captured for that candidate and job.


Hi Andrew,

The documentation says you should use postMessage to pass a “verb” to the containing window once editing has finished.

What is meant by a verb in this case?



When the user (in the switchgear app ) drags your button onto a job, they will see your setup page, iframed within the page. Your setup page should be small.

Your setup page should display a UI to capture any data you need from the user, and OK and Cancel buttons.

Once the user has provided enough data in your page, then you can light up your OK button. When the user clicks OK, you signal to the container like this:

Window.parent.postMessage({"action": "closePanel", "verb": "ok"});

Once you signal OK, the “attach button” operation will be completed. If you signal “cancel” instead of “ok” as the verb, then the operation will be cancelled and the button won’t be attached.

The doc. has been updated to make this a bit clearer.