Apps can cause their own candidate-facing buttons to be displayed in various places within other apps. For example, you might display a "share" button on the job details page on the carer site. In this case your button might be displayed next to other buttons like "apply", "refer a friend", etc.
Displaying buttons involves a handful of APIs between your app and others (for example switchgear, which is an app provided by Aotal that gives tenants control over the order of buttons, and ways to control which buttons appear on which jobs).
The key APIs you'll produce and consume are:
There are similar APIs for the other places where candidate-facing buttons can be displayed (global, and search results).
Lets prepare by installing some sandbox apps.
Note: when installing apps, the apps that have links are sandbox apps that you install via their install token - the other apps can be found publicly listed (find them with "Browse apps").
Follow these instructions to install Developer ATS. The apply button will be showing and you can click on it to create a job application.
One of the apps you installed previously was Switchgear. Switchgear is an app that manages all of the buttons (apply, share, refer a friend, etc.) from all of the button-producing apps.
Typically a customer wants to show different combinations of those buttons to different candidates (e.g. internal vs external) on different jobs (e.g. IT jobs vs call centre jobs). This complexity is all handled via switchgear. Switchgear gives the customer a drag and drop user interface that they can use to drag button(s):
Now that we've got the sandbox apps installed, we're ready to get your app up and running.
Have your app produce the following API, to tell other apps (specifically switchgear) about its candidate facing buttons, e.g.:
GET /actions/byCandidate/job/possibles/byApp (produce as non-SoT)
Response:
The data that you are passing back in this example is as follows:
Install your app into your tenant.
Now that your possibles API is working, have your app produce two more APIs, one for logged in candidates and one for anonymous ones.
In your response, you pass back button details, like text, color, link, etc.
GET /actions/byCandidate/me/jobs/{job}/byName/{action}/byApp
GET /actions/byCandidate/anonymous/jobs/{job}/byName/{action}/byApp
Response:
The first form (/me/) is an on-behalf API.
Switchgear will call this API when it is displaying your button to a logged in person (i.e. the candidate).
As the producer of an on-behalf API, your app gets access to details about the logged-in person, such as their email address, name, and a unique identifier for them.
You might use that information to customize the details of your button. For example, if your button is an apply button, and the candidate already has a job application for this job, you might decide not to show your button at all, or to show it in a disabled state.
The second form (/anonymous/) is a normal API.
As the producer of this API, you don't know anything about the candidate who is looking at the job details page for this job, so you should assume they are a public job seeker.
Its up to you to decide whether to treat these two APIs differently in your app, or just return the same response for both.
In the response above:
Click into the Developer Careers app. You should see a job, with your buttons displayed on it.
Click on your button, and you should be redirected to your app's web experience (e.g. applying for a job, completing a quiz, sharing the job, etc.).
Once completed, your web experience should redirect the candidate correctly back to the relayPage (i.e. the job details page).
The button coordinating app (e.g. switchgear) will call your /possibles API to learn about your app's buttons at the time your app is installed. That will work fine, as long as your app doesn't change its set of buttons after its been installed.
However if your app does add new buttons (or remove or change existing ones) after install, then it should alert other interested apps of that by consuming:
POST /actions/byCandidate/job/possibles/byApp
Response:
This acts as a hint to switchgear (or any other app that cares) that it should call your /possibles API again, since your buttons may have changed.
As long as your button doesn't need any additional information, the drag and drop user interface provided by switchgear is all the customer needs.
However if your button requires some per-job or default setup then a setup page can be declared. The tenant will be prompted to complete setup when the add the button to a job or as a default for a group of jobs.
A setup page is a small HTML page that your app can present to the user right at the point when they drag and drop your button into the global or workflow areas or onto a specific job.
For example, lets say your app is an employee referral app. Employees can click your button on a job and then use your user interface to refer the job to their friends. They get a cash reward if they are hired.
In this example your app might present two separate setup pages: