Smartfill: review suggestions for fields you already filled
Smartfill: review suggestions for fields you already filled
Smartfill never overwrites a value an end user has already entered. Previously, when Smartfill produced a suggestion for a field that was already filled, that suggestion was simply discarded — there was no way for the user to apply it.
Now those suggestions are kept for review. The user can choose, per field, to use the AI suggestion or keep their current value.
What changed
- Empty (or still-default) fields are auto-filled by Smartfill exactly as before — no change.
- For a field the user has already filled with a different value, the suggestion is no longer thrown away. It is staged on a new state key and a review panel lets the user accept or keep each one.
New state: campaign.smartFillPendingSuggestions
A new field on the campaign state module holds the suggestions awaiting
review, keyed by the campaign-form path they apply to:
window.hapi.campaign.state.smartFillPendingSuggestions
// Record<string, {
// currentValue: unknown // the value currently in the form
// suggestedValue: unknown // what Smartfill suggested
// suggestedLabel?: string // human-readable label for select-type fields
// }>Posting-requirement spec suggestions are keyed as
orderedProductsSpecs.<productOrContractId>.<facet>; vacancy-field suggestions
use the campaign-form path of the field (for example postingDetails.title).
The map is updated on each Smartfill poll and cleared for the relevant scope
when a new Smartfill run is triggered. It defaults to {}.
New service methods
Four methods are available on window.hapi.campaign.service:
| Method | Effect |
|---|---|
acceptSmartFillSuggestion(path) | Writes the suggested value (and its label, for posting-requirement specs) into the campaign form and removes the entry. |
dismissSmartFillSuggestion(path) | Removes the entry, keeping the current value. |
acceptAllSmartFillSuggestions() | Accepts every pending suggestion. |
dismissAllSmartFillSuggestions() | Dismisses every pending suggestion. |
// Apply a single suggestion
window.hapi.campaign.service.acceptSmartFillSuggestion("postingDetails.title")
// Keep the user's current value for one field
window.hapi.campaign.service.dismissSmartFillSuggestion("postingDetails.title")Inline review
Suggestions are reviewed inline, next to the field they belong to, across the Posting Details, location, recruiter, contact, target-group and the product / contract channel posting-requirements widgets. On wider layouts the review sits in a gutter to the right of the field; on narrow widths it stacks directly below the field.
- When Smartfill auto-fills a previously empty field, a small AI-filled badge appears by the field label.
- When Smartfill has a different suggestion for a field the user already filled, an amber Suggestion available card appears beside that field showing the current value (struck through) and the suggested value, with Dismiss and Use suggestion actions.
- After the user applies a suggestion, a brief green Accepted confirmation shows the new value and then disappears on its own after a few seconds.
A compact summary banner at the top of each widget indicates when suggestions are outstanding and offers Use all / Keep all bulk actions. It only appears when there are suggestions to review.
Backwards compatibility
- No SDK function, getter, setter, property, or event was removed or renamed — the new state key and service methods are additive.
- Empty-field auto-fill behaviour is unchanged.
- No widget element
id,class, ordata-*attribute used forhapi.ui.*targeting was removed. - No translation keys were removed.
I18n
The following i18n translations have been added (used by the review panel):
| Key | "en" value | "de" value | "nl" value | "fr" value | "es" value | "it" value |
|---|---|---|---|---|---|---|
| campaign.smartfill.suggestionsAvailable | Smartfill has suggestions for fields you already filled | Smartfill hat Vorschläge für bereits ausgefüllte Felder | Smartfill heeft suggesties voor velden die je al hebt ingevuld | Smartfill a des suggestions pour des champs déjà remplis | Smartfill tiene sugerencias para campos que ya has rellenado | Smartfill ha suggerimenti per i campi che hai già compilato |
| campaign.smartfill.suggestionAvailable | Suggestion available | Vorschlag verfügbar | Suggestie beschikbaar | Suggestion disponible | Sugerencia disponible | Suggerimento disponibile |
| campaign.smartfill.filledByAI | AI-filled | Von KI ausgefüllt | Ingevuld door AI | Rempli par l'IA | Rellenado por IA | Compilato dall'IA |
| campaign.smartfill.accepted | Accepted | Übernommen | Toegepast | Appliqué | Aplicado | Applicato |
| campaign.smartfill.viewOriginal | View original | Original anzeigen | Origineel tonen | Voir l'original | Ver original | Mostra originale |
| campaign.smartfill.hideOriginal | Hide original | Original ausblenden | Origineel verbergen | Masquer l'original | Ocultar original | Nascondi originale |
| campaign.smartfill.currentValue | Current | Aktuell | Huidig | Actuel | Actual | Attuale |
| campaign.smartfill.suggestedValue | Suggested | Vorschlag | Voorgesteld | Suggéré | Sugerido | Suggerito |
| campaign.smartfill.useSuggestion | Use suggestion | Vorschlag übernehmen | Suggestie gebruiken | Utiliser la suggestion | Usar sugerencia | Usa suggerimento |
| campaign.smartfill.keepCurrent | Keep current | Aktuellen behalten | Huidige behouden | Conserver l'actuel | Mantener actual | Mantieni attuale |
| campaign.smartfill.dismiss | Dismiss | Verwerfen | Negeren | Ignorer | Descartar | Ignora |
| campaign.smartfill.acceptAll | Use all | Alle übernehmen | Alles gebruiken | Tout utiliser | Usar todas | Usa tutti |
| campaign.smartfill.dismissAll | Keep all | Alle behalten | Alles behouden | Tout conserver | Mantener todo | Mantieni tutto |