Dynamic approvers for a purchasing process

automator-logo

Prerequisites:

  • You already have an ITPR demo account or a production account. If not, you can easily request one with demo data.
  • You already signed up for a techwork automator demo account. If not, goto the registration blog post.

Business case:

In ITRP it is easy to design business workflows. For instance purchasing processes are implemented using change templates and related task templates. In some companies an additional approver is required if the value exceeds a certain amount.

In my simple example the chief controller “Matt Leach” is added as an approver if the investment exceeds 50.000 Euros otherwise Matt is not part of the process.The automator code is as usual very simple:

AddApprover

I created a purchase request worth 60.000 Euros. This is how the task list looks like before I start the change:

Automator_task_approval

Now, the change has been started and Matt Leach has been added by the automator package as an additional approver. Of course, the “Purchase Automation” task has been completed by the package too…

automator_task2

The code with comments

Automator_task_appr2

Interesting to note

The webhook event I chose is task.status-changed. I could have used task.update as an alternative. However, using task.update needs a couple of additional lines and mergeAudit is necessary to check wether the status changed or not. In addition the task.update webhook triggers each time a task is beeing updated.

Therefore task.status-changed is much more efficient.

k.konwalin@techwork.at

 

 

Advertisements

ITRP monitor+ mail subscription package

automator-logo

Prerequisites:

  • You already have an ITPR demo account or a production account. If not, you can easily request one with demo data.
  • You already signed up for a techwork automator demo account. If not, goto the registration blog post.
  • You already configured the ITRP monitor+ in your demo environment. If not, goto the ITRP monitor+ blog post.

Business case:

ITRP currently does not provide a function to send out updates on a request to a person who is not involved at all. However, sometimes C-level managers want to be updated on any changes of major incidents/requests because of its significance. The package below sends out an email to every subscriber. The beauty of the implementation is that the package does not send out an email if subscribers changes.

$request = request;
mergeAudit($request);
$sOld = $request.audit_old_custom_data.monitor_subscribers;
$sNew = $request.audit_new_custom_data.monitor_subscribers;

$mailData = createTemplateHTMLMail('request-watch-all-notes');

if ($sNew && $sOld === $sNew) {
 for($item of $sNew) {
   $mailData.to = $item;
   sendMail($mailData);
 }
}

The email the subscriber gets

ITRP_Monitor_email

The code with comments

$request = request;
mergeAudit($request);

//check who is in the custom data field
//the old value(s) and the updated one(s)
$sOld = $request.audit_old_custom_data.monitor_subscribers;
$sNew = $request.audit_new_custom_data.monitor_subscribers;

$mailData = createTemplateHTMLMail('request-watch-all-notes');

//if new is equal to old then the mail(s) are sent
//
//the line below prevents sending out an email if someone
//subscribes or unsubscribes
if ($sNew && $sOld === $sNew) {
 foreach($sNew) {
   $mailData.to = $item;
   sendMail($mailData);
 }
}

Interesting to note

The mail is not sent, if someone subscribes or unsubscribes even though it is an update of the request. To get that done the “mergeAudit” function is of great help. This function merges audit information into an ITRP object. In our particular case it allows to send the email if anything changes except changes within the monitor_subscribers custom data field.

k.konwalin@techwork.at

 

 

ITRP monitor+ demo configuration

Prerequisites:

  • You already have an ITPR demo account or a production account. If not, you can easily request one with demo data.

Enabling the ITRP monitor+ in your demo environment:

  • Login as “howard.tanner@widget.com”
  • Password “itrp”
  • Goto Settings / Custom Links

ITRP_monitor_Plus_demo_env

Enable the subscription function:

ITRP_monitor_Plus_demo_settings1

The subscription function is not enabled by default. To enable the subscription function you need to go to settings.

ITRP_Monitor_settings1_1

In order to send out real emails you need to add a webhook and a techwork automator package (or just use one of the the already implemented “ITRP Monitor Subscription…” packages in the techwork automator demo environment). For an explanation please read the ITRP monitor+ mail subscription package blog post.

Preparing the Webhhook

A “request.update” webhook needs to be added if you don’t have already one.

If not or you don’t know how to do that please follow the instruction in the registration blog post.

k.konwalin@techwork.at

 

 

 

Cancel unnecessary tasks

automator-logo

Prerequisites:

  • You already have an ITPR demo account. If not, you can easily request one with demo data.
  • You already signed up for a techwork automator demo account. If not, goto the registration blog post.

Working with the “Personal computer for new employee” template:

IT user

  • Login to your ITRP demo account
  • Login as beatrice.baldwin@widget.com
    Pwd: itrp
  • Click “Submit new request”
  • Select Service “Personal computing”
  • Select “Personal computer for new employee”

PC_for_new_employee_SelfService

  • Press “Save”

IT operations – Change manager

  • Login to your ITRP demo account
  • Login as howard.tanner@widget.com
    Pwd: itrp
  • Go to the Records console / Changes

Records_changes

  • Click on the change “Purchase Request for “Beatrice Baldwin”

Tasks_are_automatically_cancelled

 

 

 

 

 

 

 

 

Without the automator:

Without_the_automator

Without the automator 5+ manual steps are necessary.

Effect:

The unnecessary tasks, “Security badge” and “SAP account” are automatically canceled. The change goes immediately to “implementation” without the delay of manual interference.

Standard approach ITRP workflow automation benefit Potential saving
Change manager has to check the request or change description n/a
Compare it with the tasks of the change n/a
Cancel tasks that are not required n/a
Complete theCancel unnecesary taskstask n/a 4 manual steps saved. Potential manual errors eliminated. Potential time delay (CM most likely does not act instantly) eliminated.
Change runs through automatically

Registration

techwork-automator

1 Goto: https://automator-demo.techwork.at

2 Sign up for a demo account

automator-sign-up

automator-sign-up2

3 After you signed up you get an email from automator-support@techwork.at

4 Sign in within 60 minutes
The mail includes your initial password. Please login within 60 minutes otherwise your
registration expires.

5 Copy the Webhook URL

copy-webhook1

6 Paste the Webhook URL to your ITRP demo account

https://demo.itrp.com/
your instance and password
email: howard.tanner@widget.com
pwd: itrp

copy-webhook2.jpg