Skip to main content

Using Smartfill on Campaign Vacancy Fields

Version 2.5 added ability to prefill Campaign Vacancy Fields through the help of AI (Large Language Models).


Please consult with your Partner Account Manager to get this feature enabled for your ATS.


When the end user is filling in the form in the order journey, below the description field, user sees a button [AI] Smartfill. Upon clicking this button, the description they provided gets sent to AI and a polling is added to keep track of the progress of the task created by HAPI Backend Vacancy Fields Smartfill Endpoint. When task is marked as "completed", the data returned by HAPI Backend gets set on campaignForm object.


info

If user has already entered information into the fields, then they click the button, the information they entered will not get overwritten.


As a side note, these properties of campaignForm object are not set after smartfill completes:

  • labels
  • companyId
  • campaignName because this field is just for recruiter's record keeping
  • currency
  • poNumber
  • orderReference
  • paymentMethod
  • targetGroup.* because fields of this section are before the button
  • recruiterInfo.* because fields of this section are before the button
  • postingDetails.title because this field is before the button
  • postingDetails.description because this field is before the button
  • postingDetails.contactInfo.* because fields of this section are before the button
  • postingDetails.organization.companyLogo because if description contains multiple images, AI might fail to pick the correct one
  • postingDetails.workingLocation.allowsRemoteWork because this is easy to miss in the UI and recruiter might fail to review this this changed with version 3.1
  • postingDetails.applicationUrl because this field is being prefilled by you according to Prefilling Campaign Form recipe
  • postingDetails.jobPageUrl because this field is being prefilled by you according to Prefilling Campaign Form recipe
  • orderedProducts
  • orderedProductsSpecs.*
  • orderedProductsSpecsLabels.*

Triggering the smartfill without user action

Vacancy fields smartfill can be triggered by running the service function:


window.hapi.campaign.service.createSuggestionOfVacancyFields.run()

info

By default, when user clicks the [AI] Smartfill button, description field of campaignForm object is sent to HAPI Backend Vacancy Fields Smartfill Endpoint. You are most likely prefilling description field with the description that you already have however if you want to provide another description than the one you prefill, or you want to pass a custom context object of your own that has lots of campaign related data, you can check the arguments of createSuggestionOfVacancyFields service function by checking the Typescript definition and pass your own description/data.