7 Replies Latest reply on Aug 7, 2018 2:38 PM by geroms

    How to prevent the creation of duplicate incidents for the same customer?

    geroms Apprentice

      We frequently log duplicate incidents for customers.  I've created a "Customer History" button on the incident form which, when clicked, will display the customer's history - with the most recent incidents listed on top.  This is somewhat helpful but my agents rarely use this button proactively when logging incidents since the vast majority of the time, there isn't a duplicate out there. We've also attempted to use the Object Matching feature to find the open incidents.  This worked... sort of.  However, we frequently got unexplained results from this.  I contacted Ivanti Support regarding this and they were unable to help.  Basically just told me that this isn't what Object Matching was designed to do.

       

      So, I've been trying to come up with a way to proactively alert my agents by configuring the system to automatically detect and notify them when it finds an "active" ticket for the customer that they are attempting to log a new incident for.  I think that I may be on to something but i can't get the expression to work.  I've created a Validation Business Rule on the Incident object - see below for a screen print of what it looks like.  The "CustomerHistoryBypass" that you see in the expression is just a check box that i put on the Incident form that the agents can check to bypass this validation rule.  This would be used in cases where there actually is an existing incident but it does't apply and therefore would not be considered a duplicate.  So checking the box would allow you to proceed with saving the new incident.

       

      Here's my problem though, the expression below will run the validation rule whether the customer has a ticket history or not.  The CustomerHistory field, while it seems like it should work, it is really just a blank HTML field so i'm not sure what its purpose is but it doesn't work for this.  What i need is to find a way to write an expression that looks to see if the customer has a history and if they do, look to see if any of those incidents are in an "Active" status.  Does anyone know how to do this?

       

        • 1. Re: How to prevent the creation of duplicate incidents for the same customer?
          westy1 Apprentice

          I could be wrong and you would definitely need to test this, but I think you would need to nest Childfold statements, something like the below

           

          $(ChildFold("Incident#",

            RecId,

            "Frs_CompositeContract_Contact#.IncidentAssociatedCustomer",

            1,

            "+",

            $(ChildFold("Frs_CompositeContract_Contact#",

                RecId,

                "Incident#.IncidentAssociatedReportedBy",

                1,

                "+",

                $(Status not in ("Closed",  "Resolved"))))))

           

          so to break that down, the first section

          $(ChildFold("Incident#",

            RecId,

            "Frs_CompositeContract_Contact#.IncidentAssociatedCustomer",

            1,

            "+",

           

          is going to the user of the incident, and the second section

          $(ChildFold("Frs_CompositeContract_Contact#",

                RecId,

                "Incident#.IncidentAssociatedReportedBy",

                1,

                "+",

                $(Status not in ("Closed",  "Resolved"))))))

           

          does a count on the amount of not resolved or closed incidents related to the user.

          not sure if it would work, but hopefully it puts you in the right direction

          • 2. Re: How to prevent the creation of duplicate incidents for the same customer?
            geroms Apprentice

            Thanks for trying Westy.  The expression was good - no errors in the expression editor but i get the error below now when i attempt to save an incident.  Unfortunately i'm not good enough to even begin to decipher what it doesn't like about the expression.  Any idea what it could be?

             

            screen print.png

            • 3. Re: How to prevent the creation of duplicate incidents for the same customer?
              geroms Apprentice

              So here is Ivanti Support's response to the error that i am seeing above:

               

              "Testing that statement in a virtual lab, I got the same error.  I resolved that error by enclosing the second Sub Expression $(Status not in ("Closed", "Resolved")) in single quotes. However, doing that resulted in the error "Function ChildFold is not supported in a database query.". As per the Admin Help, the ChildFold function cannot run client-side, so you may need to use the suggestion at the end of the Admin Help article on ChildFold (https://help.ivanti.com/ht/help/en_US/ISM/2017/Content/Reference/Functions/ChildFold.htm, yes this is for the most recent version of the product but I looked at the version of the help from HEAT 2016.1.1 and the article is identical) and set up a helper field on either Incident or Frs_CompositeContract_Contact if you want to continue trying to use ChildFold for this."

               

              Unfortunately though, none of what they say above makes any sense to me.    And reading the Admin Help article that they link to caused my eyes to go cross-eyed.  Is anyone able to make any sense out of this?

              • 4. Re: How to prevent the creation of duplicate incidents for the same customer?
                vee Apprentice

                Ok, so instead of putting the ChildFold in the validation rule, you put the output of the ChildFold into a field (via calculation rule), then use the validation rule to check that field for the result.

                 

                Create a new field - eg CustomerIncidentChecker - create a Calculation business rule on this field with the ChildFold() expression from above. Lets say the output is "2". You can then use the validation rule to go "Is CustomerIncidentChecker" more than 0? -> throw message"

                 

                Only issue with this I think is I'm not sure how it would behave on insert...you'd have to play around with it a little. But this is what I understand from the knowledge article.

                • 5. Re: How to prevent the creation of duplicate incidents for the same customer?
                  westy1 Apprentice

                  What vee said, only i would have it running on a boolean field. and set it to true or false.

                   

                  you could also run it as an editing rule, so on population of Profile link populate the boolean with the formula and run the validation rule off the boolean field.

                  you could then have a button that sets the boolean to false, to allow analysts to be able to override the calculation and still log the incident.

                   

                  does that make any sense?

                  • 6. Re: How to prevent the creation of duplicate incidents for the same customer?
                    westy1 Apprentice

                    also, just a thought, i have set up the below for one customer to use,

                    so the initial tab the analyst opens is the employee tab, then when they search they only see base info and cannot modify (sorry for the redacting) they can also see any incidents or requests for the user ont eh tabs and the buttons open a new incident or request for the user

                    may be another way to stream line the process

                    1 of 1 people found this helpful
                    • 7. Re: How to prevent the creation of duplicate incidents for the same customer?
                      geroms Apprentice

                      So at this point, i can't even get the validation rule to work.  Here's how I have it setup.  I've created a Boolean field called "ActiveIncidents" on Frs_CompositeContract_Contact.  I then have a Validation rule setup on Incident to check this field when an incident is created - see below.  Eventually i'll need to create the editing rule as Westy suggests to populate this Boolean field but for now, i'm just testing the actual validation piece.  For testing purposes, I've added the Boolean field to the Employee form and I've manually put a check mark in the field on my employee record (this should simulate what the editing rule will eventually be doing).  However, this isn't working.  When I create a new incident for myself, the validation rule is not prompting me like it should.  I'm assuming there's a problem with my validation rule expression?  I tried using == True at the end of the expression but the system dropped it and said that "the comparison was unnecessary".