6 Replies Latest reply on Nov 18, 2019 4:55 AM by Sinisa Mikor

    Create Service Request with approval using web service

    Sameer AlOmari
      Share This:

      Hi all

       

      i was in the process in creating web service to enable some third party system to create REQ in remedy

       

      the problem that the following fields are not in the SRM:Requestinterface_Create

      Z1D Approver

      Z1D Approval Keyword

       

      so i cant control the approval for this creation

       

      can you advise how to post a value on those 2 fields in SRM:Requestinterface_Create  from ??

        • 1. Re: Create Service Request with approval using web service
          Ankit Tiwari

          Hello Sameer,

           

          Do you want to share approved details in web service? I believe if you configure approval using approval mapping or approval rule than once service request is created approval will be attached to the request.

           

          Regards,

          Ankit

          • 2. Re: Create Service Request with approval using web service
            Sinisa Mikor

            Or you could have integration "submit" SRD so that all background actions, including approval, take place automatically.

            • 3. Re: Create Service Request with approval using web service
              Sameer AlOmari

              • 4. Re: Create Service Request with approval using web service
                Sinisa Mikor

                Hi Sameer,

                 

                start by preparing SRD as if it was supposed to be submitted by living person.  Once you've designed questions, actions, approvals, fulfillment process and mappings, and verified that everything works as planned, use it to create Service Request by your web service, but don't start by creating record in SRM:RequestInterface_Create.  Instead, locate all necessary questions in SRM:QuestionSRD_DefChoices, then create one record for each question's response in SRD:MultipleQuestionResponse with new Service Request's ID (one way this can be obtained is service action on that form) and populate it using data received by your web service.  Finally, create record in SRM:RequestInterface_Create with appropriate Login ID and Customer Login, matching Service Request ID (InstanceId) and Service Request Definition ID (TitleInstanceID), Source Keyword set to "From UI", and z1D Action set to "CREATE".  This should start the same workflow which is used when SRD is submitted manually, including approvals defined in that SRD.

                 

                When creating responses, make sure to set all non-hidden responses to "No" or they won't be visible in SRS:RequestDetails because it shows only questions where that flag is defined (this part of qualification is added behind the scenes) and isn't set to "Yes".

                1 of 1 people found this helpful
                • 5. Re: Create Service Request with approval using web service
                  Sameer AlOmari

                  Hi Sinisa Mikor

                  firstly : thank you for your amazing explanation

                  secondly : i am trying to implement the suggested scenario but stuck in the step  :create responses inSRD:MultipleQuestionResponse with new Service Request's ID (one way this can be obtained is service action on that form) and populate it using data received by your web service

                   

                  can you just clarify how to achieve this ? should i create a filter with service action on SRD:MultipleQuestionResponse form ?

                  i am not experienced in Service action and never used it before :/

                  • 6. Re: Create Service Request with approval using web service
                    Sinisa Mikor

                    Hi Sameer,

                     

                    location of filter depends on how you realize web service; for example, you could create your own regular form which would serve as input buffer between AR server and web service (which could offer additional benefit of restricting consumer's access to just that form, if necessary) and associate that form to your filter, or allow web service to operate directly on SRM:RequestInterface_Create and insert your filter into its Submit (FL) workflow.

                     

                    As to how it might look, to reserve Service Request's ID as mentioned before, you would use Service action in your filter to activate Service workflow on form named in Form Name -- in case of SRD:MultipleQuestionResponse, that boils down to triggering filter SRD:MQR:GenerateGuidSvc which expects 'z1D_TempFlag' = "GENERATE_GUID" so you'd have to define that as Input Mapping of Service action, and collect output value of $z1D_TemplFlag$ from Output Mapping (or you could avoid Service action altogether by getting the same result by invoking $PROCESS$ Application-Generate-GUID "SR" as it does).

                    3 of 3 people found this helpful