Agent Desktop

Get Involved. Join the Conversation.

Topic

    Dev Aditya
    Update SLA of an incident using connect PHPAnswered
    Topic posted October 30, 2018 by Dev AdityaGold Trophy: 10,000+ Points 
    63 Views, 1 Comment
    Title:
    Update SLA of an incident using connect PHP
    Summary:
    Update SLA of an incident using connect PHP
    Content:

    Hi Experts,

    Is it possible to update SLA of a bunch of closed incidents using connect PHP?

    If yes, then what will be the syntax for it?

    I found similar post in idea lab- http://communities.rightnow.com/posts/f625e311de , however, I am not sure if it is feasible now or not.

     

    Many Thanks,

    Dev

    Best Comment

    Allan Schrum

    Yes, with constraints. There is an object called AssignedSLAInstance which can be filled in and then can be set against Incident->SLAInstance (which is of type AssignedSLAInstance). The logic will allow an assignment providing that the "AssignedSLAInstance" identifies an appropriate, existing SLAInstance that could be used for that Incident. Setting the ID or NameOfSLA to NULL implies to remove the SLAInstance currently assigned.

    If the ID field is assigned, that specific SLAInstance is considered. Otherwise, the NameOfSLA is expected to be set which means all the possible SLAInstances from that SLA are considered. The PrimaryContact's Organization, or the PrimaryContact if it doesn't belong to an OrganizatIon, is used to limit which SLAInstances are considered. The candidate SLAInstance must be active, must have the ActiveDate set before the CreatedTime of the Incident, must have ExpireDate set to NULL or greater than "now", and have counts remaining in the SLAInstance. If any of those conditions are not met, then the SLAInstance is not chosen and an exception is thrown.

    That's about it. The API was constructured for managing active Incidents rather than old incidents. Given that you are updating old Incidents this process may not work for you. If there is a change desired please submit it to the Idea Lab for consideration and post the reference here.

    Regards,

    -Allan

    Comment

     

    • Allan Schrum

      Yes, with constraints. There is an object called AssignedSLAInstance which can be filled in and then can be set against Incident->SLAInstance (which is of type AssignedSLAInstance). The logic will allow an assignment providing that the "AssignedSLAInstance" identifies an appropriate, existing SLAInstance that could be used for that Incident. Setting the ID or NameOfSLA to NULL implies to remove the SLAInstance currently assigned.

      If the ID field is assigned, that specific SLAInstance is considered. Otherwise, the NameOfSLA is expected to be set which means all the possible SLAInstances from that SLA are considered. The PrimaryContact's Organization, or the PrimaryContact if it doesn't belong to an OrganizatIon, is used to limit which SLAInstances are considered. The candidate SLAInstance must be active, must have the ActiveDate set before the CreatedTime of the Incident, must have ExpireDate set to NULL or greater than "now", and have counts remaining in the SLAInstance. If any of those conditions are not met, then the SLAInstance is not chosen and an exception is thrown.

      That's about it. The API was constructured for managing active Incidents rather than old incidents. Given that you are updating old Incidents this process may not work for you. If there is a change desired please submit it to the Idea Lab for consideration and post the reference here.

      Regards,

      -Allan