How do I import attachments?

You can import attachments associated with any supported object.

Supported Objects and File Types

The following objects support importing attachments:

  • Account

  • Activity

  • Asset

  • Business Plan

  • Contact

  • Custom Object

  • Deal Registration

  • Household

  • Message

  • Objective

  • Opportunity

  • Opportunity Revenue

  • Partner

  • Partner Program

  • Product

  • Sales Lead

  • Sales Lead Product

  • Service Request

The following file types are supported for attachment files:

  • CSV

  • DOC

  • DOCX

  • JPG

  • PDF

  • PNG

  • PPTX

  • TIF

  • TEXT

  • XLSX

  • XML

  • ZIP

How to Create ZIP File

To import an attachment, you must create a ZIP file that contains the source data file and optionally one or more attachment files. Make sure you always name the source file as 'Attachment.CSV'. You must mention each of the attachment file names in the Attachment.CSV file. The Attachment.zip file has the structure shown in the following image:

Attachment file structure

Here are the examples for the attachment.csv file shown in purple box in the image above:

Pk1Value

ObjectPuid

FileName

Url

100100004247330

http://www.yahoo.com

100100004247330

Clouds.jpg

100100004247330

Taxdocs.docx

CDRM_6493

http://www.google.com

CDRM_6493

Holidays.pdf

Note:
  • Pk1Value and ObjectPuid column values uniquely identify an existing object record. FileName indicates the name of attachment files. Url indicates the value of URL attachment to import.
  • The exact file name must exist in the zip file such as Document.pdf
  • The attachment ZIP file name can include characters such as parenthesis (), ampersand (&), dots (.), and apostrophe (') only. You shouldn't have more than one period (.) in your attachment name. Also, the rootname.extension shouldn't be more than 80 characters.
  • An attachment can only be associated with an existing record of the object. A single record can be associated with multiple attachments by having multiple rows in the CSV file. You can import any number of attachments in an import job, but the ZIP file should not exceed 250 MB in size.
  • A record in the CSV file can't have values for both FileName and Url columns. You can pass either the Primary key or the PUID for an object record. If you pass both Primary key and PUID values, then Primary key will be considered and PUID will be ignored.
  • The AttachedDocumentId should be left blank.
  • The DatabaseTitle shouldn't be higher than 79 character.

How to Import Attachments

To import attachments:

  1. Click Tools > Import Management.

  2. On the Manage Imports page, click Create Import Activity.

  3. On the Enter Import Options page, enter a name for your import. From the Object drop-down list select Attachments.

  4. In the Attachment Object drop-down list that appears, select the object associated with the attachment.

  5. Select the ZIP file that you created in the previous section.

  6. Click Next. On the Map Fields page, click the Apply button next to the Import Mapping drop-down list to map the source and target attributes automatically.

  7. Click Next to navigate to the Review and Submit page.

Review the import activity configuration and click Submit to activate the import. The Manage Imports page shows the status of the submitted import. The topic Import Data in the related topics section contains more details about the import process.