SharePoint 2010 Cookbook: Content Organizer for a Document Library

SharePoint 2010 delivers a comprehensive set of document management features. In this article, we continue our series dedicated to uncovering those features with a look at how the Content Organizer works.

Challenge:

We use SharePoint document libraries in our portal to manage all of our electronic documents.  The document libraries sometimes contain folders in a logical hierarchy structure to help us organize the documents.  In SharePoint 2010, the upload process is better in the sense that you can choose a folder to upload to, but many of our users don't really know to which folder a document should be uploaded.

Is there a way to automatically upload and store the electronic documents based on some criteria such as the contents of a metadata field?

Solution:

With the Content Organizer, a new feature of SharePoint 2010, you can create rules that will automatically move an uploaded document to the appropriate/designated location based on content type and site columns.   Follow these steps:

Step 1 – Activate the Content Organizer Feature

First, you need to activate this feature, and note that since this is a Site Scope feature, it is found under Site Actions > Site Settings menu on the Ribbon.

10-25-2010 10-51-29 PM

Click on Activate to make this feature available for your site:

Active Content Organizer

Step 2 – Content Organizer Settings

Once you have activated the Content Organizer feature for a site, you will find two new menu options under Site Settings: Content Organizer Settings and Content Organizer Rules.

10-25-2010 10-57-36 PM

The other thing that happens after the activation is that SharePoint will create a document library named DropOffLibrary along with a RoutingRules list.  The Drop Off Library will be the default destination when a user tries to upload a document to this site.  The Routing Rules list, as its name implies, contains the rules for how a document is to be routed to its final destination.

Next, configure your settings:

10-25-2010 11-19-11 PM

  • Redirect Users to the Drop Off Library: Set this check box to force all uploads to go to the Drop Off Document Library.   When an individual document is uploaded, the document properties window for Drop Off Library is displayed, at which point metadata properties can be filled in and the submission process completed. After submission, the routing rules are applied to route the document appropriately and the user is shown the final URL for the item.
  • Sending to Another Site:  Set this property to allow rules to be created that direct uploads in the current site to be sent to another site in your SharePoint Web app.   The destination site must also have the Content Organizer feature installed and activated. You can only route documents within a SharePoint Web application.
  • Folder Partitioning: This features allow you to create a threshold limit on how many documents can be stored in a document library.  SharePoint 2010 recommends a maximum of 5,000 documents per folder. Once the limit is reached, you can instruct SharePoint to automatically create a new folder, route documents to that new folder, and let the user know about the URLs of the final destination.
  • 10-25-2010 11-19-34 PM

  • Duplicate Submissions: Use this option to let SharePoint decide what to do when you upload an item that already exists in the library.  You have the option to create a new version (if versioning is enabled in the document library), or to append unique characters to the end of the new file.
  • Preserving Context: Set this check box to send the audit logs and properties of the documents along with the documents when you route the item to another site.
  • 10-25-2010 11-20-34 PM

  • Rule Managers: Add the users or groups that you want to be able to manage rules used by the Content Organizer. These users must also have Manage Web Site permission in order to edit rules.
  • Step 3 – Content Organizer Rules

    Next, click on the Content Organizer Rules link to go to the popup form where you specify the rules.

    10-29-2010 2-58-52 PM

  • Rule Name: Set a name.
  • Rule Status and Priority: Enable the rule and choose a priority for the rule, from 1 (highest priority) to 9 (lowest priority).  This is useful when you have more than one rule and want to be able to select which one should be applied first to the uploaded documents.
  •  

    10-29-2010 3-04-10 PM

  • Submission's Content Type: Select a Content Type to apply the rules.  The drop down list box only shows the content types that are based on the Document content type.  The alias check box allows you to define the same content types that were renamed in other sites.  When the document is uploaded and its content type matches the names, the rule will apply to them as well.
  •  

    10-29-2010 3-07-08 PM

  • Conditions: the Conditions setting is where the real power of this feature lies.  You can create up to six conditions where the properties of the items must meet certain values.  In this example, we will set a condition where a document begins with the prefix “SA12” in its title.
  • Target Location: Select a destination folder (it could be on the same site or a different document library in a different site) to route the document to when it has met all the criteria you set above. Note that you must enable cross-site routing (see settings in the section above) in order to see the site routing options in this form.  You can also set the folder naming convention if you choose to create a new folder.
  • Step 4 – Upload

    Let’s try it out.  Go to any document library on your site and use the Add new document link. 

    10-29-2010 3-29-51 PM

    Select a document to upload.  Once the document has been uploaded, you will see the properties form below. Note the title of the form where it says “Drop Off Library”?  Remember that when you add a Content Organizer rule to the site, it automatically adds any document to the Drop Off Library. 

    10-29-2010 3-43-04 PM

    This form also gives you a warning that the document will be moved. Fill in the properties for this document, and make sure you follow the rules.  In our exmaple, we will add a “SA12” prefix to the Title of the document.  Next, click the submit button:

    10-29-2010 3-45-54 PM

    You will then receive a notification indicating where the document was routed to.  Note that if the document cannot be moved, whether there is an issue or if your conditions are not met, SharePoint will leave the document in the Drop Off Library.

    In conclusion, the Content Organizer is a very cool feature in SharePoint 2010.  It allows you to capture a set of standard documents and route them to the proper destination, and the end user doesn't have to worry about where it should go.  This feature should be used in conjunction with Document IDs, Term Sets, and Metadata publishing in order to design an effective document management strategy for your SharePoint portal.

    Notes:

    The Content Organizer has the following limitations that you should beware of:

    • Content Organizer feature is only available in SharePoint 2010 Server and is not part of the SharePoint Foundation 2010.
    • Content Organizer will only work on content types that are of, or derive from the Document content type, so make sure that you inherit from this content type when creating a custom document library.
    • You cannot route documents to a Document Set.  This one should be on the wish list for the next release!
    • The routing action is performed using the App Pool account of your Web applications.
    • You cannot route the document outside of a Web app, farm, or SharePoint at all.  All of this could be done with workflow rules instead.  In fact, there are a lot of things that should be done with workflow instead of Content Organizer, which is designed to handle document uploads.
    • There are a whole bunch of events that effect a document library; you should beware the order of executions that could affect the handling of these documents:
      • Any workflow that is attached to a document library will be run first
      • Next to be executed is Event Receiver, although the actual priority can be set programmatically by the developers
      • Last is the Content Organizer.

     

    See Also:


    Posted Nov 03 2010, 01:00 PM by Lam

    Comments

    Conor wrote re: SharePoint 2010 Cookbook: Content Organizer for a Document Library
    on Thu, Nov 4 2010 6:42 AM

    Excellent blog. We're hoping to start producing some of these in the next few months at ERS.

    Add a Comment

    Please sign into Bamboo Nation to leave a comment.
    Bamboo Solutions Corporation, 2002-2014