Join us Dec. 16 for The Community Hour, our first global virtual User Group event!

Generate ticket in custom table from Lifecycle Event activity in Journey

servicenow_dev
Tera Contributor

Hi,

I have a requirement to generate a ticket/case in a custom table in ServiceNow from Lifecycle event in a Journey.
The activity needs to be reflected in Journey same as any other fulfiller activity (for example incident) and show as completed when closed. 

The idea is that there is some activities that are part of the a Journey, but fulfilled by groups who already work in a custom table with already established way of working, SLAs etc... And the custom table we want to generate tickets to is in its own custom Scope.

So ideally we want fulfillers in custom table to keep working as they are already doing now, but we want the Journey Owners to be able to follow these tickets in the Journey same as they do with other Fullfiller activities.

I have tried to create a new fulfiller activity type that uses template and noticed that the non-HR tables available to choose are limited to just change_request, incident_task and incident.
From my small testing all seams to work fine with incident_task table. But I wonder if there is any specific reason for this limitation in table choices, do the underlying Lifecycle event workflows NOT work correctly with other tables?

Would be great if anyone can suggest what is the best way of achieving this and does it lead to customization of Journey widgets in portal.

2 REPLIES 2

hannesh
Tera Contributor

Hey!

Facing the samme issue, did you manage to find a way to achieve this?

Best regards
Hannes

HasanM
Kilo Sage

 

Hi @servicenow_dev @hannesh 

The fulfiller activity template only supports a limited set of tables, probably because Lifecycle Events relies on logic tied to those tables to track the state and completion of activities. Adding a custom table to that list would mean customising baseline logic, and activities could get stuck, so I'd avoid it.

A cleaner approach that keeps your fulfillers working in their custom table:

  1. Create the activity in Activity Designer with a flow/subflow fulfilment type (the options vary by release, so check your version).
  2. In the subflow, create the record in your custom-scope table and pass in the subject person and case context.
  3. Use "Wait for condition" until the custom record is closed, then let the flow complete. The activity then shows as completed in the Journey like any other activity.
  4. Store the custom ticket number or sys_id on the activity or parent case so Journey owners can trace it.
  5. In your custom scope, set Application Access on the table so the HR scope can create and read records. You may also need cross-scope privileges.

This avoids customising the Journey widgets, and the existing SLAs and ways of working on the custom table stay as they are.

Alternative: generate a standard HR task as the activity and use a flow to create the custom record and close the HR task when the custom record closes. This tracks exactly like other activities in the Journey, but it creates two records per activity.

Hope this helps.