
Files, rich-text images and knowledge articles
How attachments, inline images and knowledge articles move between orgs, why they cannot be treated as fields, and what a Salesforce Knowledge migration requires.
Three kinds of content are routinely underestimated in scope because they do not look like data: files attached to records, images embedded in rich-text fields, and knowledge articles. Each has a physical form (a binary, a rendered image, a versioned article with categories) that a field-level migration cannot carry, and each has a procedure of its own.
Files
Files exist in Salesforce as ContentVersion records, one for each version of a file, and each file is linked to its parent records through ContentDocumentLink; older orgs may also hold them as Attachment records. They move in three stages. First, the file metadata for each parent object is loaded into a working table. Next, the files themselves are downloaded to the migration server. Finally, a ContentVersion load table is built with the legacy identifier, title, extension, path on client (which must include the extension for preview to work), owner, original created date and first-publish location, which is the identifier of the new parent record. The migrating user needs permission to view all files in both orgs; otherwise, files outside its sharing are invisible to the query. The total size of the downloaded files shows how much storage the migration will use in the target, and it is checked against the org's file storage limit before loading.
Rich-text image migration
An image embedded in a rich-text field references a servlet path in the source org, so copying the field does not carry the image. Base64 encoding the image into the field is possible but can exceed the field's character limit. Instead, each rich-text field is parsed for image sources and hyperlinks; each image is downloaded and uploaded to the destination record as a file; the image source in the HTML is rewritten to reference the new file; and the destination field is updated with the corrected HTML. Legacy hyperlinks to records in the source org are rewritten in the same pass to their counterparts in the destination. Every original field and every reference found in it is recorded, so that each rewrite can be traced. Certain HTML tags are reformatted to render in Salesforce's rich-text editor.
Salesforce Knowledge migration
Articles in Salesforce Knowledge are replicated from three objects: the article, its versions and its data-category selections. Data-category values are exported separately where the category structure must be recreated. Versions are checked for inline images by searching the body for the servlet image path; where any exist, they are processed as above before the articles are loaded. Attachments related to articles are loaded after the articles. Data-category assignments are imported where necessary. Loading an article does not publish it: each version arrives as a draft and is published as a separate step.
The common thread is that content of this kind is migrated by a procedure that combines database work, downloading and uploading files and HTML rewriting, and that it is validated by spot-checking records to confirm that files, images and articles display correctly, not only by counting rows. Its scope is estimated at assessment by counting parent records with populated rich-text fields, files by parent object and article versions, so that the effort is planned rather than discovered.
Assess the data before the agents depend upon it
The first call is with the practitioners who would do the work, not a sales intermediary. The measures come first and the estimate follows.