Use Case - Creating a ServiceNow Ticket Based on User Input

Create a more sophisticated incident record in ServiceNow, based on the caller's information.

ūüĒć This use case is a more complex extension to¬†Use Case - Creating an incident task in ServiceNow.¬†

In this scenario we want to create an incident record in ServiceNow, based on the information the caller gives us. The flow is as follows:

  1. A caller calls the IT Helpdesk Number.
  2. In the Nimbus workflow, there is a "Customer Input" element asking whether the caller wants to get help from an agent or if they want to open a specific ticket type.
  3. If the caller chooses the incident report, we save the decision into a Parameter. Based on this parameter, we will create a technical or administrative ticket in ServiceNow.
  4. The Power Automate flow starts with a¬†"OnUpdatedTask" Session Event¬†item and checks on the "ParameterUpdated"¬†Trigger Event. If the Parameter is¬†‚Äúreport incident‚ÄĚ,¬†the flow is triggered.

Show a preview of the flow...

 
 

PRECONDITIONS

  • Power Automate Premium subscription¬†for the¬†"Service Now"¬†connector¬†element.
  • A ServiceNow connection.¬†Alternatively you can use a dev box as described below.
 

Show Icon Legend

ūüí° = A hint to signal¬†learnings, improvements or useful information¬†in context. ūüĒć = Info points out¬†essential notes or related page¬†in context.
‚ėĚ = Notifies you about¬†fallacies and tricky parts¬†that help avoid problems. ūü§Ē = Asks and answers common¬†questions and troubleshooting points.
‚ĚĆ = Warns you of¬†actions with irreversible / data-destructive¬†consequence. ‚úÖ = Intructs you to¬†perform a certain (prerequired) action¬†to complete a related step.
 
 

How-To Steps

Create your ServiceNow Dev Box

  1. Sign up on https://developer.servicenow.com
  2. Go to the instructions on how to obtain a Personal Developer Instance (PDI) and create your instance.
    ‚úÖ Note down the connection details for later!
  3. Check that in In ServiceNow the status of your instance should show "Online".
  4. Open and log into your box.
  5. Find the Incidents table and open it.
  6. Find the user who has read/write permissions on it (per default Incident.Manager)
  • You can always view connection credentials in My Instance ->"Manage instance password"
  • If you don‚Äôt use your instance for more than 10 days, ServiceNow will back it up. Recovery might take very long or cause errors, so we recommend creating a fresh one if you need to test again.
 

Prepare in Nimbus

In Power Automate we can evaluate the choice of the collect information workflow item and create a ServiceNow ticket accordingly. 

  1. In Nimbus, go to Configuration > Parameter > click on "Create New".
  2. In this example we store the input into a Parameter called "HotlineName"
  3. Then we create a workflow where we use this parameter to store the customer input using the "Collect Information"activity.

    Click here to see an overview of this workflow

     
     
  4. We start the workflow with "Accept Conversation" and link it to "Collect Information". This is where the caller will input the choice. We choose the option "Parameter to Save" to store the input to our new Parameter "HotlineName".
    ūüí° After the "Collect Information"¬†workflow step¬†we will use the Power Automate "Parameter Update"¬†trigger event¬†and create the¬†ServiceNow¬†ticket in the background. We will cover this in the next step as we iterate over the choices and route the call accordingly in your flow's outcome.¬†
  5. To complete your Nimbus workflow, add a check "Check Parameter" workflow activity after the "input received" exit and connect the outcomes accordingly.
    ūüí° In our example:
    1. Check 1 is a Technical Ticket (User dialed #1 via DTMF)
    2. Check 2 is an Administration Ticket (User dialed #2 via DTMF)
  6. The exits are then connected to a "Transfer" activity each, leading the user to to the corresponding services.

Create the flow

ūüĒć In PowerAutomate we can evaluate the choice of the¬†"Collect Information"¬†workflow activity¬†and create a ServiceNow ticket accordingly.¬†

  1. We start with "GetOnUpdatedTask" trigger element and want to listen to the "Parameter Updated" event.
  2. Add a "Switch" element to the flow as for each branch you want to create a different ticket in ServiceNow.
    Switch on the context parameter created in Step 2.
    • On¬†=¬†triggerOutputs()?['body/CustomContextParameters/HotlineName']

Create the ServiceNow Ticket

  1. In each branch of your Switch case, add a ServiceNow "Create record" element to the flow.
  2. The first one it will ask you to connect to your ServiceNow instance.
    ūüí° Give it a clear title and use the credentials copied from the earlier Dev Box preparation step (ServiceNow ‚Üí¬†My Instance ‚Üí "Manage instance password")
  3. In your Record Type choose the table name where you want to create the tickets in.
  4. Name your ServiceNow your "Create Record" step to handle the "Technical Ticket" (Check1 from the "Collect Information" workflow step in Nimbus).
  5. Map the values to the table. For instance using the following Context Fields provided by the Nimbus connector:
    • Sys ID¬†=¬†<Nimbus RequestId>
    • Created¬†=¬†<Nimbus CreatedId>
    • Description= New ticket via Nimbus service¬†<Nimbus TeamName>
    • Type¬†= triggerOutputs()?['body/CustomContextParameters/HotlineName']
    • Created By¬†= NimbusPowerAutomate Adapter
  6. Repeat this step for the other branch of your Switch case, this time handling the Administration ticket (Check2 from the "Collect Information" workflow step in Nimbus).
    ūüí° You can copy and paste the other "Create Record" flow step to save time and avoid mistakes.

Update the Nimbus Task

  1. Finally, add a Nimbus "UpdateTask" to the flow and write back the information to the ticket.
    1. Customer.CustomFields name = ServiceNowTicket , value = Sys ID
    2. CustomContextParameter name = ServiceNowUrl , value = concat("<your serviceNowURL>/", Sys ID)

Test your flow

  1. Run your flow by calling your main service number
  2. Input the corresponding user choice (DTMF tones) for the incident response team
  3. Verify in ServiceNow that the incident ticket has been created accordingly.

Table of Contents