Agent Desktop

Get Involved. Join the Conversation.

Topic

    Manal Abou+Nader
    Restore Archived IncidentsAnswered
    Topic posted March 5, 2018 by Manal Abou+NaderGreen Ribbon: 100+ Points 
    308 Views, 11 Comments
    Title:
    Restore Archived Incidents
    Content:

    Hello everyone, I have a critical question. 

    After a year, the closed incidents have been archived. However, the client wishes to restore this data. 
    I can see these incidents in the (Archived Incidents Console). However, I do not know from which tables the data is fetched. 
    The data displayed in the main table is fetched from the (Achived_Incidents) table. However, I was not able to find from where we are fetching the other information (Details, Audit Log, SLA instance) etc... 
    Can you please tell me which tables are being used to fetch this data because I either need to display it in a report or restore the archived data?

    Version:
    Service Cloud (ORN)
    Image:

    Best Comment

    Marcus Zoeller

    I'm performing a similar function for one of our clients. They have about 40,000 Archived Incidents to restore.

    Right now the extraction is the problem. The "Archived Incidents" tool in the Agent Console only lets me download 100 at a time, which is too manual and tedious. Instead, I was able to write a custom script to extract the XML files all at once. If you use Fiddler while you download some Incidents in the Agent Console, you will see how it's done.

    Once extracted, we'll use SOAP APIs to create new incidents. There are some fields you cannot set, like Created, Created By, and Reference Number. We have workarounds for those and will be able to report on the incidents still using their original reference numbers, just as if they were never archived. More details on that in this post: http://communities.rightnow.com/comment/82944

    Comment

     

    • Asia Johnson

      Hi Manal,

      We have adjusted our configuration settings for both PURGE_DELETE_INCIDENT_PHRASES and ARCHIVE_INCIDENTS to allow for year over year reporting.

      I hope this helps!

       

    • Pavol Procka

      As far as I am aware the archived incidents are saved in an xml file and the only table that you can report on is indeed the Archived_Incidents table (doesn't even join anywhere). There is no out-of-the-box way to restore them en-mass.
      Our dev. team is actually currently working on a way to automate the extraction (we mainly require the Incident threads and dates) in house as it is really tedious work to extract this manually for multiple incidents.

      I would love to be corrected by someone on this.

    • Sean Montgomery

      Manal,

      Archived incidents are saved external to the database in an XML file.  The XML file contains all the data you see in the Archive Console about the incident.  Archiving combines the incident, contact information, threads and transactions into a single XML file removing that data from the relational components of the database, so there are no associations back to other data tables.  By archiving, you are packaging up the incident and associated data into a single file to be stored on file attachment storage.  The archived_incidents table logs the incidents that are archived.

      It is not possible to restore archived incidents back into the database.  Currently, this functionality is not on our roadmap, but feel free to suggest it in the Idea Lab so it can be considered and prioritized.

    • Suresh Thirukoti

      Nice info @Sean!! Somebody in the forum has created an excel marco to read the XML file and give some logical structure....maybe you can check it...

      ~Suresh

    • Pavol Procka

      Hi Suresh, do you know who to approach for the excel macro? This is what we are working on too.

    • Marcus Zoeller

      I'm performing a similar function for one of our clients. They have about 40,000 Archived Incidents to restore.

      Right now the extraction is the problem. The "Archived Incidents" tool in the Agent Console only lets me download 100 at a time, which is too manual and tedious. Instead, I was able to write a custom script to extract the XML files all at once. If you use Fiddler while you download some Incidents in the Agent Console, you will see how it's done.

      Once extracted, we'll use SOAP APIs to create new incidents. There are some fields you cannot set, like Created, Created By, and Reference Number. We have workarounds for those and will be able to report on the incidents still using their original reference numbers, just as if they were never archived. More details on that in this post: http://communities.rightnow.com/comment/82944

    • Suresh Thirukoti

      Gr8 share Marcus!! Good to know about this shortcut yes as lot of requests come on how to extract archived incidents.....any idea on attachments related to this archived incidents?

    • Sebastiaan Draaisma

      I had a customer who accidentally enabled archiving. Luckilly he had all incidents of 2017 left on his test site.

    • Manal Abou+Nader
      Marcus Zoeller said:

      I'm performing a similar function for one of our clients. They have about 40,000 Archived Incidents to restore.

      Right now the extraction is the problem. The "Archived Incidents" tool in the Agent Console only lets me download 100 at a time, which is too manual and tedious. Instead, I was able to write a custom script to extract the XML files all at once. If you use Fiddler while you download some Incidents in the Agent Console, you will see how it's done.

      Once extracted, we'll use SOAP APIs to create new incidents. There are some fields you cannot set, like Created, Created By, and Reference Number. We have workarounds for those and will be able to report on the incidents still using their original reference numbers, just as if they were never archived. More details on that in this post: http://communities.rightnow.com/comment/82944

      View original

      Hi Marcus, 

      Can you please explain how you managed to export the archived incidents programmatically?

      Thank you. 

    • Marcus Zoeller

      I can't share the exact code I used, but I did use Fiddler to figure out what I needed to do. Hopefully that is enough guidance. Similarly, to answer Suresh Thirukoti, the same approach can be done to extract all of the file attachments, for uploading them to the newly-restored Incidents.

    • Janusz Jasinski

      I can't install fiddler but I get you can view archived incidents by going to something like

      cgi-bin/my_interface.cfg/php/admin/archive/idp.php?p_xsl=idp.xsl&p_file=2018/351aa/18.5.0.1.0.274/171216-000074_1513432487.xml

      However when digging around, I can seem to see to be able to find the underlying XML file