General Functional Discussions for Service

Get Involved. Join the Conversation.

Topic

    Geetha Amrutha
    Trigger CPM on Incident Queue Auto-AssignmentAnswered
    Topic posted May 10, 2019 by Geetha AmruthaBronze Trophy: 5,000+ Points, last edited May 10, 2019 
    107 Views, 4 Comments
    Title:
    Trigger CPM on Incident Queue Auto-Assignment
    Summary:
    Trigger CPM on Incident Round-Robin Queue Auto-Assignment
    Content:

    Hi,

    When auto-assignment is set up and incident gets assigned automatically, the Business Rules or CPM are not getting triggered. We would want to do some tasks based on the incident assignee change. So trying to write a rule like 'If Assigned modified this edit, do this'.

    And on Incident Create/Update CPM, unable to fetch the the auto-assigned Account value. The Account value is still NULL when the CPM runs on incident create or Acocunt value still fetches the previous value when the CPM runs on incident update.

    So wanted to know, Can we trigger either Business Rule or CPM when incident is auto-assigned? 
    How to recognize that the system has auto-assigned and run customization thereafter.

     Appreciate your help.

    Thanks,
    Geetha

    Best Comment

    Dev Aditya

    Hi Geetha,

    'Modified this edit' is triggered only when changes are made manually from workspace.

    Try rule something like-

    if(Previous Assigned is Equal to 'Unspecified')

    &

    (Assigned is Not Equal to 'Unspecified')

    Then

    Call your event.

     

    I hope it helps.

     

    Thanks,

    Dev

    Comment

     

    • Dev Aditya

      Hi Geetha,

      'Modified this edit' is triggered only when changes are made manually from workspace.

      Try rule something like-

      if(Previous Assigned is Equal to 'Unspecified')

      &

      (Assigned is Not Equal to 'Unspecified')

      Then

      Call your event.

       

      I hope it helps.

       

      Thanks,

      Dev

      • Geetha Amrutha

        Hi Aditya, 

        Thanks for the comment. But that didn't exactly solve our issue in all scenarios.

        P.S.: I have selected you answer as Best Answer by mistake. Below is the answer how we resolved the issue.

        Regards,
        Geetha

    • Geetha Amrutha

      Hi,

      We have resolved this by fetching the record again in the CPM instead of using the object retrieved for the first time. This helped to fetch the auto-assigned value to CPM.

      Code like below -

      // ......code.....
      $inc->save();
      $inc2 = RNCPHP\Incident::fetch($inc->ID);
      $acct = $inc2->AssignedTo->Account->ID;
      //......

      Hope this helps anyone with a similar issue.

      Thanks,
      Geetha