Solved

How to fire a cta when a task is closed - automatically.

  • 22 June 2020
  • 7 replies
  • 112 views

Userlevel 4
Badge

We are creating modular playbooks and all of them start with 2 or 3 of the same tasks. We would like to create one CTA with these tasks (assess situation) and then decide which CTA we should fire based on that assessment. Not all possible CTA/Playbooks will be fired, only the ones associated with a close task.

 

For example: one task could be called “Perform workspace audit” and when closed, we fire that specific CTA/Playbook. Another task could be called “Implement Access Policies”. we have about 5 scenarios, which would mean we would have 5 different tasks that could be closed and 5 different CTAs/Playbook would fire.

Is that possible and how?

 

Or maybe someone has a different way of implementing such a use case...

 

Thanks!
Lyne

 

icon

Best answer by jean.nairon 11 July 2020, 01:03

View original

7 replies

Userlevel 7
Badge +2

Hi @lyne_therien. It is possible to do using bionic rules. You may need a couple rules to get all the logic working and to also make it easier to maintain down the road.

What I would recommend is building a first rule that fires the first CTA with the assessment tasks. In your next rule, you query closed tasks that include the specific names (ex: Perform workspace audit). This rule will look for each time there is a closed task with that name and then fire the associated playbooks. 

If you have multiple logic, you can build a single rule and use the filters on the actions. So for example, if you have a series of logic like: 

  • If Task A is closed, assign Playbook A
  • If Task B is closed, assign Playbook B
  • If Task C is closed, assign Playbook C

Then, you can create a query for all closed tasks. In the Actions pane, you will need to create an action for each Playbook you want to fire. So for example, the first action could filter for Task Name = Task A, and then fire the associated playbook. This will allow you to build it all in one rule and might be easier to see all the logic in one place. 

Userlevel 4
Badge

Thanks Jean. I’ll probably have to query cstask to find which task is closed, right?

Userlevel 7
Badge +2

@lyne_therien - that’s correct. Just query the CSTask object. You should find all your tasks there. 

Userlevel 7
Badge +2

Thanks Jean. I’ll probably have to query cstask to find which task is closed, right?

 @lyne_therien did you get a chance to query the cstask object? Is your query solved? Please let us know if you need any help here. 

Userlevel 7
Badge +2

Hi @lyne_therien. It is possible to do using bionic rules. You may need a couple rules to get all the logic working and to also make it easier to maintain down the road.

What I would recommend is building a first rule that fires the first CTA with the assessment tasks. In your next rule, you query closed tasks that include the specific names (ex: Perform workspace audit). This rule will look for each time there is a closed task with that name and then fire the associated playbooks. 

If you have multiple logic, you can build a single rule and use the filters on the actions. So for example, if you have a series of logic like: 

  • If Task A is closed, assign Playbook A
  • If Task B is closed, assign Playbook B
  • If Task C is closed, assign Playbook C

Then, you can create a query for all closed tasks. In the Actions pane, you will need to create an action for each Playbook you want to fire. So for example, the first action could filter for Task Name = Task A, and then fire the associated playbook. This will allow you to build it all in one rule and might be easier to see all the logic in one place. 

@jean.nairon Thanks for the reply!

Userlevel 7
Badge +2

You’re welcome @sai_ram!

Userlevel 4
Badge

Thanks all. other projects took priority over this but I’ll follow your suggestions above when the time comes. Lyne.

Reply