Best approach for Preview → Agent-Editable Fields → Generate flow in HR Agent Workspace (Configurabl

YaelR
Tera Contributor

Hi all,

 

I'm looking for guidance on the recommended/supported approach to achieve the following flow, fully within HR Agent Workspace (Configurable):

 

1. An HR Agent opens an HR Case
2. Clicks a button to preview a document (generated from a template, pre-filled with values from the Case)
3. The agent can edit specific fields in that preview (while other fields remain locked/read-only)
4. Only after the agent confirms, the final document is generated and attached to the Case

 

Context:

  • We're working with a table extending sn_hr_core_case
  • We need a choice field on the Case to determine which document template is used (a few different templates depending on the value)
  • Ideally this needs to work for agents working in the Configurable Workspace, not just the legacy Platform UI

My questions:

1. What's the right document template type to use for this (PDF vs HTML), given the requirement for agent-editable fields before final generation?
2. Is there a supported/documented way to trigger a preview-then-edit-then-generate flow (rather than a UI Action that generates the final document immediately)?

 

Any guidance, examples, or pointers to the right documentation would be greatly appreciated!

Thanks in advance.

1 REPLY 1

sanjaygupta
Tera Guru

I'd recommend using ServiceNow's out-of-the-box Document Templates capability instead of building a custom solution.

  • Activate the Document Templates plugin (com.snc.document_templates).

  • Create an HTML or PDF document template.

  • Associate it with the relevant HR Case Template.

  • Configure the HR Service to use that template.

  • Open the HR Case in HR Agent Workspace.

  • Select Preview Document to review and edit the content.

  • Save and regenerate the document once the changes are complete.

One thing to consider: HTML and PDF templates support different editing capabilities. Choose the format based on which fields agents need to edit.

Using the native functionality will keep the process simpler and easier to maintain.

References:

Hope you find this useful.