Purpose
The Pattern SFTP has 3 primary functions:
Bulk Case Creation and Updates
Creating cases in bulk requires populating a CSV template with the necessary data points and saving that CSV within the SFTP.
The specification for the CSV import is as follows:
| Column Name | Description | Data Type | Required |
| case_id | A unique identifier for the case/row in the spreadsheet. Must be unique across your entire Pattern account. Different cases in different lenses or litigations cannot share this ID. | Text |
True |
| litigation | The name of the litigation/project that the case is being loaded to. Determines what lens the case will be loaded to. Cases created with an incorrect litigation may be created, but be hidden in Pattern. Please submit a support request if you upload with the incorrect litigation name. If you are not sure what the correct litigation name is, support request and Pattern's support team will let you know. | Text |
True |
| cocounsel | Optional name of a cocounsel or interested party for the case. | Text | False |
| claimant_given_name | The given/first name for the case | Text | True |
| claimant_middle_name | The middle name for the case | Text | False |
| claimant_surname | The last/surname for the case | Text | True |
| claimant_dob | The date of birth for the case. Valid formats are YYYY-MM-DD. | Date | False |
| claimant_dod | The date of death for the case. Valid formats are YYYY-MM-DD. | Date | False |
| assignee | If the case is assigned to a manager or analyst, the name of the person to whom the case is assigned | Text | False |
| state_of_residence | Two letter state or territory abbreviation | Text | False |
Note that even optional fields require a header in the CSV in order to be processed. To upload files in bulk:
- Populate a CSV according to the above specification. Column names must match exactly.
- Save the CSV file in the SFTP in the folder "drop/case_upload"
- Pattern will attempt to upload the case data within the CSV
- Any cases that do not exist in Pattern will be inserted
- Any cases that already exist in Pattern will be updated based on the data provided. For cases that are updated, blank fields are not processed. If you wish to delete the values in a field in bulk (e.g. removing dates of death or middle names), submit a support request.
- When processing is completed, a result file will appear in the main drop folder, titled "results_YYYY-MM-DD_HH MM.txt". This result file will provide details on what cases were successfully inserted or updated, and if any cases had errors that prevented them from processing. Correct these errors and resubmit the file if necessary.
A folder structure with 1 result file for a completed upload, and 1 new pending upload, would look like this:
Case Upload Directory Structure
Bulk File Upload
Pattern’s SFTP uses your case numbers to map documents posted to the SFTP. Your SFTP directory is structured as follows:
File Upload Directory Structure
Underneath the root directory there is a directory called “drop”. Underneath the drop folder, Pattern expects sub-directories which correspond to your case numbers. Any documents added to the SFTP underneath a case number are automatically added to the corresponding case in pattern. It is important that your case numbers match exactly. To upload documents:
- Create a sub-directory underneath “drop” named as the case ID you are uploading
- Add files underneath the case sub-directory
Pattern sweeps the SFTP for new files every 2 hours. Upon successful import, case documents will be deleted from the SFTP folder. Documents that fail to import will not be removed. As documents are processed by Pattern, successful or not, results will be reported via human readable plaintext files in the root of the SFTP directory.
Note that the SFTP upload can only add documents to cases which have already been created in Pattern’s system. Attempts to upload documents to cases which are not yet created will fail indefinitely.
Common reasons for document errors are below:
- Unsupported File Type (supported file types are PDF, JPG, JPEG, PNG, TXT, TIF, TIFF, or DOCX).
- Encrypted PDF.
- File is a duplicate of previously loaded document.
- Size Limit.
- File name includes special characters or extra spaces (avoid unicode, slashes, periods, and whitespace).
General File Transfer
Standard Export Directories
If programmatic bulk exports are enabled for your account, you will see a directory called "exports" in your SFTP root directory. Underneath that "exports" directory, there are 3 subdirectories:
- data
- profiles
- packets
In each of these export subdirectories, there will be a folder for each lens.
Data
For any lenses where bulk exports are enabled, full profile data in csv form is available in this directory. There is a csv file for each question in profile with full data for all cases within this directory. Data is updated daily.
Profiles
If enabled, the profiles directory contains case profile pdf exports for any cases that were reviewed the previous day, organized by date. File names are set up as "<lastname>, <firstname> - <case_id>.pdf". Exports created this way will also be visible in the "Exports" section of the application and appear as created by "Pattern Data".
Packets
Custom packet exports with custom criteria are located in the "packets" directory. The structure within each lens directory varies depending on the specifications of the custom export content.
Other file Exchange
If you need to exchange some files with Pattern that fall outside of the standard case/document upload or download, Pattern recommends using the SFTP to do so securely. Examples of some situations where this is helpful include:
- You would like Pattern to backfill profile data on cases that you reviewed prior to purchasing Pattern. In that case, you would create a support request and Pattern would create a folder for you to drop that file.