8 Replies Latest reply on Aug 12, 2014 7:12 AM by SBW

    Process ID not available at start of the process?

    Apprentice

      Hi,

       

      I am trying to send ans SMS via a webservice integration.

      This works fine, but I would like the text message to contain the incident ID of the incident that was just created.

       

      This calculation returns an error because (I presume) the incident ID is not available yet ...

       

      Returning any other attribute from the incident is not an issue.

       

      Am I right in assuming this is not possible before a second status is reached (after open).

       

      Anyone with an idea / similar problem?

       

      Here is a screenshot with the process action - calculation - log file entry

       

      Capture.PNG

        • 1. Re: Process ID not available at start of the process?
          ProServices

          The ID is a calculated value(I believe), so I have found the same behavior myself. 

           

          In your specific case I might...

           

          1. create a boolean attribute on whether that Send SMS action has been triggered or not.

           

          2. create a query for Incidents(or whatever object that is) where the attribute above is false.

           

          Create two scheduled actions, one to run the action Send SMS on incidents where the value is false, the other immediately following to set that attribute to true so it does not resend the web service call again on that same incident.

           

          With the scenario above you would need to remove the Send SMS automatic action and instead make it an optional action on the WIP status.

           

          Not ideal, but unfortunately the only way I can think of right now.  Unless its possible to get the calc used to create the identity of the ticket.  Then you could include that instead of referenced the ID of the ticket.

           

          Or you could create an automatic action that updates the boolean attribute above after the Send SMS action, make Send SMS a manual action and follow it by the automatic action to update the value...  Whatever seems better to you in that case.  But that way you could also put a pre-condition before Send SMS thats only true if the boolean that its been sent is false.

          • 2. Re: Process ID not available at start of the process?
            ITSMMVPGroup

            vote here is it doesn't work at the moment

             

            Be able to access {Id} in a calculation at the start of a process

            1 of 1 people found this helpful
            • 3. Re: Process ID not available at start of the process?
              Apprentice

              This is not a solution for me. The schedule manager only runs 1 hour unless I make several....

               

              We have solved by sending an sms without incident number and a mail to the same person with the incident number.

              This way, they are alerted of a high priority incident and they know they can check their mail for more details

              • 4. Re: Process ID not available at start of the process?
                Apprentice

                Thanks DM, I have voted.

                 

                Any idea how many votes an ER needs to be seriously considered?

                • 5. Re: Process ID not available at start of the process?
                  Expert

                  It can vary but about 200 seems to be magic.  I guess this is a good time to remind everyone to review the ER's and vote.  Some are getting close to the magic number but are older and may never make it without your help.

                  • 6. Re: Process ID not available at start of the process?
                    ProServices

                    Maybe sending the process approver link article will help?  Not the ticket ID exactly as you wanted, but if they're opening from smart phones this might help...maybe not, because they may not be internal or your site may not be externally facing. etc, etc...

                     

                    Anyway, I definitely voted as well a while back I believe...So I feel your pain

                     

                    Only other solution I can think of is hooking up inbound email to an address which kicks off a Service Desk process that only sends an SMS using that web service behavior.  Basically a ticket that creates another ticket populated with that tickets details, that second process purpose being notification and then closing itself out automatically upon success. 

                    • 7. Re: Process ID not available at start of the process?
                      Apprentice

                      We don't offer a Self Service portal yet so that won't work either.

                       

                      Actually that last solution is something that might work. I just email my own system but how would I give it the phone numbers to text and the text content.

                      Proably doable, but way out of the scope of the project.


                      Good thinking though!

                      • 8. Re: Process ID not available at start of the process?
                        ProServices

                        Im thinking you might be able to place the phone number and content in the description using two placeholders separated by a dash maybe?  then just parse the text in the description into two other attributes on your alerting process incident called To and Text?

                         

                        Or maybe just place those two fields in the subject and body of the email.