NetDocuments: Copy Documents to Clio Document storage from Clio integration linked folders

NetDocuments: Copy Documents to Clio Document storage from Clio integration linked folders

Clio has an integration with NetDocuments that creates folders in NetDocuments linked to Matters in Clio.  If a client making use of this integration wants to move their documents from NetDocuments to being stored in Clio you can use this procedure. 

Backup NetDocuments using Universal Migrator

First backup NetDocuments to a Universal Database using Universal Migrator

SQL Scripts to prepare for injection

The SQL statement below will create a reusable function that can back up the Clio Client and Matter Id from a string.

  1. --This function extracts the Clio Client and Matter from a value
  2. CREATE OR ALTER FUNCTION Extract_Clio_Id(
  3. @Id NVARCHAR(MAX)
  4. ) RETURNS @RESULT TABLE(
  5. ClientId NVARCHAR(MAX),
  6. MatterId NVARCHAR(MAX)
  7. ) AS BEGIN
  8. DECLARE @VALUES NVARCHAR(MAX) = @Id
  9. DECLARE @SEPARATOR CHAR = '|'

  10. --Remove the Clio- Prefixens
  11. SET @VALUES = REPLACE(@Values, 'Clio-', '')

  12. SET @VALUES = REPLACE(@VALUES, ' --- ', @SEPARATOR)

  13. DECLARE @CLIENTID NVARCHAR(MAX) = (SELECT COALESCE(value, '') from STRING_SPLIT(@VALUES, @SEPARATOR, 1) WHERE ordinal = 1)
  14. DECLARE @MATTERID NVARCHAR(MAX) = (SELECT COALESCE(value, '') from STRING_SPLIT(@VALUES, @SEPARATOR, 1) WHERE ordinal = 2)

  15. INSERT INTO
  16. @RESULT(ClientId, MatterId)
  17. VALUES
  18. (@CLIENTID, @MATTERID)

  19. RETURN
  20. END
  21. GO

 

The following SQL statement will back up the Contact Id and UPDATE the Result_Id on the __M_Contacts table

  1. --Update Result_Id to the correct contact ID in Clio
  2. UPDATE
  3. __M_Contacts
  4. SET
  5. Result_Id = (SELECT ClientId FROM Extract_Clio_Id(Id))
  6. WHERE 1=1
  7. AND Id like 'Clio-%'


The following SQL statement will back up the Matter Id and UPDATE the Result_Id on the __M_Matters table
  1. --Update Result_Id to the correct matter ID in Clio
  2. UPDATE
  3. __M_Matters
  4. SET
  5. Result_Id = (SELECT MatterId FROM Extract_Clio_Id(Id))
  6. WHERE 1=1
  7. AND Id like 'Clio-% --- Clio-%'

 

The following script will set the Final_Status to "Deleted" for Contacts that exist in NetDocuments, but aren't linked to Clio. This tells Universal Migrator to disregard these contacts.

  1. --For Contacts that don't exist in Clio, mark them Deleted so UM will disregard them.
  2. UPDATE
  3. __M_Contacts
  4. SET
  5. Final_Status = 'Deleted'
  6. WHERE 1=1
  7. AND Result_Id = ''

 

The following script will set the Final_Status to "Deleted" for Matters that exist in NetDocuments, but aren't linked to Clio. This tells Universal Migrator to disregard these matters.

  1. --For Matters that don't exist in Clio, mark them Deleted so UM will disregard them.
  2. UPDATE
  3. __M_Matters
  4. SET
  5. Final_Status = 'Deleted'
  6. WHERE 1=1
  7. AND Result_Id = ''

If the client wants document categories converted to folder paths (most do), run this command.

 If there are documents in NetDocuments that are orphaned from a matter, please reference the article named Synthesize: Missing Matters for Documents for instructions on synthesizing Matters for documents orphaned from Matters.

 You may also have Matters that are orphaned from contacts.  The article named Synthesize: Missing Client Contacts for Matters has instructions for synthesizing contacts for Matters that are orphaned from a Contact record.


    • Related Articles

    • NetDocuments Data Restore: Read Me First

      Create Profile Attributes The Universal Migrator requires certain profile attributes to exist in NetDocuments. Please create the following Profile Attributes. Property Value Client Name Client Type Text Maximum Length 50 Use Lookup Table True Hide ...
    • NetDocuments: Preparing Documents for Backup

      Disable the Notification Limit Log into NetDocuments and go to Admin: Then choose Information and Settings Then change the Activity Threshold to a big number: Then Click Save
    • Folder Migrations: Preparing Documents for Export

      Unlinked File Servers Only These instructions should be followed if you have documents you would like to transfer and they exist on file server that is not linked to a practice management system. Consistently Organize Documents by Matter Over time, ...
    • NetDocuments: Backup Settings

      In preparation to backup documents from NetDocuments, you should do the following. Disable Download Alerts First, login to NetDocuments as an admin user and select Admin: Then select the hamburger menu and choose Information and Settings: Finally, ...
    • Primafact: Preparing Documents for Backup

      Mapping Matters Prior to backing up documents from Primafact, each yellow folder that represents a matter should be converted to an actual matter folder. To do this, log into Primafact and find yellow folders that represent matters: Right-Click on ...