0 votes

HI,

I have scenario to perform a custom action based on the notification approval result. Before creating a user, i need to send out for an approval, if the request is approved, i have to create a zendesk ticket with all the user data for reference.

If Notification Aprroval result is Yes
//execute task1
else Notification Approval result is No
//execute task2

I am new to this and could not find a direct way of doing it. Is there a way we can achieve this. Any help/pointers or references would really appreciated.

by (50 points)

1 Answer

0 votes
by (216k points)
selected by
Best answer

Hello,

Approving or denying an Approval Request means modifying it. So, to perform certain actions when an Approval Request is approved or denied, you need to create a Business Rule triggered after updating an Approval Request. To create such a rule:

  1. Create a new Business Rule.
  2. On step 2 of the Create Business Rule wizard, enable the Show all object types option.
  3. Select ApprovalRequest, and then After updating a ApprovalRequest.
  4. On step 3, add an action that must be performed when a request is approved. For example, if you want to run a PowerShell script, add the Run a program or PowerShell script action. To include a description of the operation that was approved in your action, use the %adm-DescriptionOfOperationToApprove% value reference.
  5. When done with the action, click OK.
  6. Now, you need to specify a condition when the action must be performed. When an operation is approved, the ApprovalState property of the Approval Request is set to 1. Click Add Condition.
  7. Select If <property> <relation> <value>.
  8. Specify If ApprovalRequest equals 1.
  9. Click OK.
  10. Click the Add action to a new set link.
  11. Add an action that must be performed when a request is denied.
  12. When done with the action, click OK.
  13. Now, you need to specify a condition when the action must be performed. When an operation is approved, the ApprovalState property of the Approval Request is set to 2. Click Add Condition.
  14. Select If <property> <relation> <value>.
  15. Specify If ApprovalRequest equals 2.
  16. Click OK.
  17. On the final state, include Configuration Objects in the Activity Scope of the rule.
0

Thanks, This is perfect!

Related questions

0 votes
1 answer

We have a New User action set up for our HR staff to use. There is a field in the custom form that states "Notes for IT Department". I want to display the data that is ... IT Helpdesk. I don't know what parameter this would be considered. How can I find out?

asked Feb 14, 2020 by slowllama (100 points)
0 votes
1 answer

Hi team, I have a business rule which is triggered, after an approval request was updated. Is it possible to read the reason somehow (if entered by the ... possible to run these actions only against specific approval or commands which create approvals?

asked Oct 1 by wintec01 (1.5k points)
0 votes
1 answer

In a custom command where an approval is added in Powershell code ($Context.SubmitForApproval) or as an action Send this operation for approval' how can you run specific ... is denied a mail is sent to requestors manager and requestors account is disabled.

asked Mar 28, 2023 by Pihl (20 points)
0 votes
1 answer

On Approval Requests, in the web console, Initiator shows "N/A" instead of the custom command scheduled task. The admin console shows the custom command scheduled task though. Any way to fix that?

asked Jan 21, 2021 by mark.it.admin (2.3k points)
0 votes
1 answer

Hello Support, We have reports for users who should only have the rights to see the members of a group. However, they should not have the right to open the "profile" ... report and see the result of the report and cannot do anything else? Thank you very much

asked Apr 15 by DRiVSSi (300 points)
3,533 questions
3,224 answers
8,216 comments
547,688 users