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.

Trigger another service request when a specific task is completed

Can you setup a condition that when a specific task is completed another service request is triggered?

Use Case
Branch reports a new hire.  They start the a new hire service request.  During the hiring process, the potential employee changes their mind.  We would like to have a tasks for "Did not Hire".  If the branch selects, did not hire, it would trigger the creation of a different service request. 

  • We're trying desperately to get this exact scenario working; however despite tech experts from SW looking at it, and the Tier 2 team offering constant suggestions, we cannot. There is something wrong with the way the JSON and XML gets parsed which makes it fail with an "Internal Server Error".

    Personally I think this should be a core feature, offered out the box (like "Update Record") but if it needs to be an integration, IT SHOULD WORK.

  • Hello! This is something I currently have working in our instance using the Process Integration action. If you can provide the JSON you're sending and a screenshot of the endpoint/headers I can take a look at why it's returning an error.

  • Thanks but I need to explain more deeply than a quick forum post. Can you drop me an email address in PM and I'll send through a complete description of our setup?

  • I think the following should achieve what you're trying to do:

    Example Process

    You'll want to put the entire process in a Group and set the group to "concurrent". Then create two non-concurrent groups, one for your Cancel task logic and the rest for your normal workflow process. This way, the Cancel task flow won't impede the normal workflow, but can still cancel out the process.

    The only caveat with this setup is that there's no way to clean up open Tasks/Approvals from either group. So, if you finish the whole process normally, the Cancel task will still be open. Same for any approvals/tasks in the normal process if you click the cancel task.

    Process Integration

    This should open the related service request. You'll need to update the JSON to match the fields in your service request. You only need to provide the Required fields in the form. You'll also need to update the URL so the ID after "catalog_items" matches your service request ID. You can find your service request ID by opening the service request, and copying this number from the URL:

    This should be what the top portion of your Process integration should look like

    And this is an example of the payload at the bottom of the Process Integration. Anything you see in double brackets is a variable from the current incident. You can hard code any of these values if you need to. Variable example: "{{New Hire Name}}"

    {
        "incident":{
            "requester_name":"{{requester_email}}",
            "request_variables_attributes":[
                {
                    "name":"What type of change is this",
                    "value":"New Hire"
                },
                {
                    "name":"Requester Name",
                    "value":"{{New Hire Name}}"
                },
                {
                    "name":"Current Phone Display Name",
                    "value":"{{Current Phone Display Name}}"
                },
                {
                    "name":"Desired Phone Display Name",
                    "value":"{{Desired Phone Display Name}}"
                },
                {
                    "name":"Branch Name/Number or Corp Cost Center",
                    "value":"{{Four Digit Cost Center}}"
                },
                {
                    "name":"Phone Options",
                    "value":"{{Phone Options}}"
                },
                {
                    "name":"Mac/Serial Number (Listed on the bottom of existing phone)",
                    "value":"{{Existing Phone MAC Address or Serial Number, if possible}}"
                },
                {
                    "name":"Additional Notes or Comments",
                    "value":"{{Notes/Comments}}"
                },
                {
                    "name":"Best Callback Number (Cell)",
                    "value":"{{Delivery contact's name, phone, and email}}"
                },
                {
                    "name":"Preferred Area Code",
                    "value":"{{Preferred Area Code}}"
                }
            ],
            "incident_ids":["{{context_id}}"],
            "due_at":"{{New Hire Start Date}}"
        }
    }

    As a note, the above JSON payload is from before the 4/3 Custom Fields update. I haven't bothered updating the format since it is still the documented format for creating Service Requests from the API.

  • INTERESTING!!

    I have been using the "New" system of "custom_values" (or whatever it is). That is an amazing discovery which I'm going to try today!

  • Thanks to Mitch's help I have got this working in our very messy environment and I'm absolutely delighted.

    Many thanks to Mitch for his help and for taking time out of his day to meet with me.

  • I'm so glad that you got it working !!

    Well done, !