This discussion has been locked. The information referenced herein may be inaccurate due to age, software updates, or external references.
You can no longer post new replies to this discussion. If you have a similar question you can start a new discussion in this forum.

Auto-create a new ticket from an existing ticket

Our campus on-boarded to a ServiceDesk instance this year.  I would like to know if/how an existing ticket can generate a new ticket when it reaches a certain stage.  The idea is as follows.

  1. From the service catalog, a new user account request ticket is submitted using the template in the self-service portal.
    1. Ticket filled in with required information.
    2. The ticket includes a task to add the new user email in the ticket when it's ready.
  2. Technician works the ticket.
    1. Enters the new user email.
    2. Marks that task as complete.
  3. A new ticket is generated once the task is marked complete.
    1. It captures several values from the existing ticket, including the new student email.

If anyone has a working example of what they did, I would really appreciate some help getting our instance configured.

Parents
  • OK.

    I had a similar challenge that I have “almost” solved. But I think what I have so far will be quite useful to everyone here.

    The challenge – new user onboarding:

    Simplified process:

    1. HR completes a catalogue item with all the new user details which are then assigned to an IT line manager.
    2. As the line manager finishes tasks on the ticket, other catalogue items are triggered for technicians to complete, populated by the details in the parent ticket.
    3. All tickets are linked automatically as related items.

    There are several steps in this overall process, but I will just cover the first two or three I will use my naming conventions, but feel free to amend them for your needs. I connect to the apieu server, so you may need to modify if you use the US one.

    Ready? Let’s go!

    1. Create an approved catalogue item 0010. New User Request with the following variables:
      1. New Users Name – text
      2. New Users Surname – text
      3. New Users Cell Number – text
      4. New Users Position Title – text
      5. New Users Department – text
      6. Office Location – text
      7. New User Reports to – text
      8. New Users Employee Number – text
      9. Proposed Email Address for New User – text
      10. Show Cell Number on Email Signature – checkbox
      11. New User Start Date – Date
      12. New User Requires Hardware – checkbox
      13. Requires Printing – checkbox
      14. Require VPN Access – checkbox

    2. Create an internal catalogue item 0011. New User Creation with the following variables:
      1. New Users Name – text
      2. New Users Surname – text
      3. New Users Cell Number – text
      4. New Users Position Title – text
      5. New Users Department – text
      6. Office Location – text
      7. New User Reports to – text
      8. Proposed Email Address for New User – text
      9. Show Cell Number on Email Signature – checkbox
      10. New User Requires Hardware – checkbox
      11. Requires Printing – checkbox
      12. Ref Ticket – text (in case the Related action fails)
      13. Require VPN Access – checkbox

    3. Create an internal catalogue item 0012. Set up new personal computer with the following variables:
      1. Require VPN Access – checkbox
      2. Requires Printing – checkbox
      3. Ref Ticket – text (in case the Related action fails)
    4. Then in the setup, under an admin user, generate a JSON Web Token. Copy it and save it somewhere for later.
    5. Then again in setup, under Integrations – Process Integrations, add an integration.
      1. Name: SWSD API EU
      2. Description: ACCESS API
      3. URL: https://apieu.samanage.com
      4. Authentication Method: SolarWinds Service Desk Web Token
      5. Token: Use the token you copied earlier.
      6. Tip – use the “eye” to see if everything is copied. I had to try a few times before I got a token that fit.
    6. Get the catalogue numbers of your other two items. You can do this by opening the request and checking the web address. It should be something like https://....... samanage.com/catalog_items/1234567-0010-new-user-request. You need to note the seven numbers after catalog_items. Just that.
    7. Back to the catalogue: Edit item 0010. New User Request, under processes:
      1. My first piece is some simple boring condition sets and approvals to determine if a laptop should be bought. Next the juicy bits…
      2. Add a Process integration
        1. Name: Create user – Automatically
        2. Description: Automatically start the Create User Process
    • Integration: SWSD API EU
    1. HTTP Method: POST
    2. URL: https:/apieu.samanage.com /catalog_items/1234567/service_requests.xml
    3. Retries: 2
    • Additional headers: add two items here called Content-Type and Accept both with the value application/xml
    1. Now for the crucial body. I am not going to explain it in detail. If you spend any time sifting through the API docs you should have a grasp of what all this means.
      1. Body

    <incident>
    
     
    
    <incidents><number>{{incident_number}}</number></incidents>
    
     
    
    <custom_fields_values>
    
    <custom_fields_value><name>New Users Name</name>
    
    <value>{{New Users Name}}</value></custom_fields_value>
    
     
    
    <custom_fields_value><name>New Users Surname</name>
    
    <value>{{New Users Surname}}</value></custom_fields_value>
    
     
    
    <custom_fields_value><name>New Users Cell Number</name>
    
    <value>{{New Users Cell Number}}</value></custom_fields_value>
    
       
    
    <custom_fields_value><name>New Users Position Title</name>
    
    <value>{{New Users Position Title}}</value></custom_fields_value>
    
     
    
    <custom_fields_value><name>New Users Department</name>
    
    <value>{{New Users Department}}</value></custom_fields_value>
    
     
    
    <custom_fields_value><name>Office Location</name>
    
    <value>{{Office Location}}</value></custom_fields_value>
    
     
    
    <custom_fields_value><name>New User Reports to</name>
    
    <value>{{New User Reports to}}</value></custom_fields_value>
    
     
    
    <custom_fields_value><name>Show Cell Number on Email Signature</name>
    
    <value>{{Show Cell Number on Email Signature}}</value></custom_fields_value>
    
     
    
    <custom_fields_value><name>Proposed Email Address for New User</name>
    
    <value>{{Proposed Email Address for New User}}</value></custom_fields_value>
    
     
    
    <custom_fields_value><name>Requires Printing</name>
    
    <value>{{Requires Printing}}</value></custom_fields_value>
    
     
    
    <custom_fields_value><name>Require VPN Access</name>
    
    <value>{{Require VPN Access}}</value></custom_fields_value>
    
     
    
    <custom_fields_value><name>Ref Ticket</name>
    
    <value>{{incident_number}}</value></custom_fields_value>
    
     
    
    </custom_fields_values></incident>

     

    1. Save the window.
    1. Leave “On Success” blank and add a Task to “On Failure” Prompting the Assignee to create the task manually, as a fail-safe.
    1. Add the next Process Integration in the same way, but remember to change the catalogue ID number in the URL. This time the body is:

    <incident>
    
    <requester>
    
    <id>1</id>
    
    <name>{{New Users Name}} {{New Users Surname}}</name>
    
    <email>{{Proposed Email Address for New User}}</email>
    
    </requester>
    
     
    
    <incidents><number>{{incident_number}}</number></incidents>
    
     
    
    <custom_fields_values>
    
    <custom_fields_value><name>Ref Ticket</name>
    
    <value>{{incident_number}}</value></custom_fields_value>
    
     
    
    <custom_fields_value><name>Requires Printing</name>
    
    <value>{{Requires Printing}}</value></custom_fields_value>
    
     
    
    <custom_fields_value><name>Require VPN Access</name>
    
    <value>{{Require VPN Access}}</value></custom_fields_value>
    
    </custom_fields_values></incident>

    Now in the sub tickets, aside from having the User info passed on automatically, you can create Conditional sets that modify the tasks for the installing technicians.  Like so:

    Name: Setup Printing
    Field: Requires Printing
    Operator: is
    Value: Checked

    Then if True the techs can have a set of tasks relating to printing that will only show if printing is required. You could use this to limit software as well.

    Well, that is if. All I know.

    I will be keeping an eye on the comment to see if I can help more.

Reply
  • OK.

    I had a similar challenge that I have “almost” solved. But I think what I have so far will be quite useful to everyone here.

    The challenge – new user onboarding:

    Simplified process:

    1. HR completes a catalogue item with all the new user details which are then assigned to an IT line manager.
    2. As the line manager finishes tasks on the ticket, other catalogue items are triggered for technicians to complete, populated by the details in the parent ticket.
    3. All tickets are linked automatically as related items.

    There are several steps in this overall process, but I will just cover the first two or three I will use my naming conventions, but feel free to amend them for your needs. I connect to the apieu server, so you may need to modify if you use the US one.

    Ready? Let’s go!

    1. Create an approved catalogue item 0010. New User Request with the following variables:
      1. New Users Name – text
      2. New Users Surname – text
      3. New Users Cell Number – text
      4. New Users Position Title – text
      5. New Users Department – text
      6. Office Location – text
      7. New User Reports to – text
      8. New Users Employee Number – text
      9. Proposed Email Address for New User – text
      10. Show Cell Number on Email Signature – checkbox
      11. New User Start Date – Date
      12. New User Requires Hardware – checkbox
      13. Requires Printing – checkbox
      14. Require VPN Access – checkbox

    2. Create an internal catalogue item 0011. New User Creation with the following variables:
      1. New Users Name – text
      2. New Users Surname – text
      3. New Users Cell Number – text
      4. New Users Position Title – text
      5. New Users Department – text
      6. Office Location – text
      7. New User Reports to – text
      8. Proposed Email Address for New User – text
      9. Show Cell Number on Email Signature – checkbox
      10. New User Requires Hardware – checkbox
      11. Requires Printing – checkbox
      12. Ref Ticket – text (in case the Related action fails)
      13. Require VPN Access – checkbox

    3. Create an internal catalogue item 0012. Set up new personal computer with the following variables:
      1. Require VPN Access – checkbox
      2. Requires Printing – checkbox
      3. Ref Ticket – text (in case the Related action fails)
    4. Then in the setup, under an admin user, generate a JSON Web Token. Copy it and save it somewhere for later.
    5. Then again in setup, under Integrations – Process Integrations, add an integration.
      1. Name: SWSD API EU
      2. Description: ACCESS API
      3. URL: https://apieu.samanage.com
      4. Authentication Method: SolarWinds Service Desk Web Token
      5. Token: Use the token you copied earlier.
      6. Tip – use the “eye” to see if everything is copied. I had to try a few times before I got a token that fit.
    6. Get the catalogue numbers of your other two items. You can do this by opening the request and checking the web address. It should be something like https://....... samanage.com/catalog_items/1234567-0010-new-user-request. You need to note the seven numbers after catalog_items. Just that.
    7. Back to the catalogue: Edit item 0010. New User Request, under processes:
      1. My first piece is some simple boring condition sets and approvals to determine if a laptop should be bought. Next the juicy bits…
      2. Add a Process integration
        1. Name: Create user – Automatically
        2. Description: Automatically start the Create User Process
    • Integration: SWSD API EU
    1. HTTP Method: POST
    2. URL: https:/apieu.samanage.com /catalog_items/1234567/service_requests.xml
    3. Retries: 2
    • Additional headers: add two items here called Content-Type and Accept both with the value application/xml
    1. Now for the crucial body. I am not going to explain it in detail. If you spend any time sifting through the API docs you should have a grasp of what all this means.
      1. Body

    <incident>
    
     
    
    <incidents><number>{{incident_number}}</number></incidents>
    
     
    
    <custom_fields_values>
    
    <custom_fields_value><name>New Users Name</name>
    
    <value>{{New Users Name}}</value></custom_fields_value>
    
     
    
    <custom_fields_value><name>New Users Surname</name>
    
    <value>{{New Users Surname}}</value></custom_fields_value>
    
     
    
    <custom_fields_value><name>New Users Cell Number</name>
    
    <value>{{New Users Cell Number}}</value></custom_fields_value>
    
       
    
    <custom_fields_value><name>New Users Position Title</name>
    
    <value>{{New Users Position Title}}</value></custom_fields_value>
    
     
    
    <custom_fields_value><name>New Users Department</name>
    
    <value>{{New Users Department}}</value></custom_fields_value>
    
     
    
    <custom_fields_value><name>Office Location</name>
    
    <value>{{Office Location}}</value></custom_fields_value>
    
     
    
    <custom_fields_value><name>New User Reports to</name>
    
    <value>{{New User Reports to}}</value></custom_fields_value>
    
     
    
    <custom_fields_value><name>Show Cell Number on Email Signature</name>
    
    <value>{{Show Cell Number on Email Signature}}</value></custom_fields_value>
    
     
    
    <custom_fields_value><name>Proposed Email Address for New User</name>
    
    <value>{{Proposed Email Address for New User}}</value></custom_fields_value>
    
     
    
    <custom_fields_value><name>Requires Printing</name>
    
    <value>{{Requires Printing}}</value></custom_fields_value>
    
     
    
    <custom_fields_value><name>Require VPN Access</name>
    
    <value>{{Require VPN Access}}</value></custom_fields_value>
    
     
    
    <custom_fields_value><name>Ref Ticket</name>
    
    <value>{{incident_number}}</value></custom_fields_value>
    
     
    
    </custom_fields_values></incident>

     

    1. Save the window.
    1. Leave “On Success” blank and add a Task to “On Failure” Prompting the Assignee to create the task manually, as a fail-safe.
    1. Add the next Process Integration in the same way, but remember to change the catalogue ID number in the URL. This time the body is:

    <incident>
    
    <requester>
    
    <id>1</id>
    
    <name>{{New Users Name}} {{New Users Surname}}</name>
    
    <email>{{Proposed Email Address for New User}}</email>
    
    </requester>
    
     
    
    <incidents><number>{{incident_number}}</number></incidents>
    
     
    
    <custom_fields_values>
    
    <custom_fields_value><name>Ref Ticket</name>
    
    <value>{{incident_number}}</value></custom_fields_value>
    
     
    
    <custom_fields_value><name>Requires Printing</name>
    
    <value>{{Requires Printing}}</value></custom_fields_value>
    
     
    
    <custom_fields_value><name>Require VPN Access</name>
    
    <value>{{Require VPN Access}}</value></custom_fields_value>
    
    </custom_fields_values></incident>

    Now in the sub tickets, aside from having the User info passed on automatically, you can create Conditional sets that modify the tasks for the installing technicians.  Like so:

    Name: Setup Printing
    Field: Requires Printing
    Operator: is
    Value: Checked

    Then if True the techs can have a set of tasks relating to printing that will only show if printing is required. You could use this to limit software as well.

    Well, that is if. All I know.

    I will be keeping an eye on the comment to see if I can help more.

Children
  • This is an amazing write up! We, the product team, know that this is a common ask and want to build out this ability in the process workflow and it's currently in our backlog to handle. This method, that  put together, is currently the best way to accomplish this use case.

  • Aw Shucks! Thanks so much. Suddenly I wish I had tidied up the XML code a little before posting. I promise that it doesn't look that bad in my Prod environment. It just copied poorly from Word!

  • Following your guide here. I keep getting the following error.  Any idea what I'm doing wrong? 

    "Failure: Http Unauthorized, reason: <message>Unauthorized</message> <description>["Invalid API token."]</description> , in url: ">api.samanage.com/.../service_requests.xml"

  • Tip – use the “eye” to see if everything is copied. I had to try a few times before I got a token that fit.

    Hi.
    So glad to be of help.
    The first few times that I tried, I got the same message. I then discovered that the whole token was not copied in when I pasted it in to the API integration.
    Using the "eye" I could see that the last 5 or 6 characters were not copied in.
    I generated a new token a few more times until I got one that could fit in completely. I initially assumed that the tokens were all the same length, but it doesn't look that way.
    Please also remember that if you generate a new token for another process, you will have to update the API integration as well with the new token.
    There is no need to start everything over from scratch! You can just open the process integration - API, and update the token.

    Please drop me a message if you need more help.

  • That fixed it, thank you!   I did have an issue with the email portion but ended up just taking that portion completely out and it worked just fine.  Now to get this all tweaked a little bit.  Thanks again for your help :) 

  • Omg, after I finally got this syntax down it works great! Thanks so much!