Clause Validations and Migration Constraints

Validation rules, data model constraints, and known migration behaviors that affect clause records during migration. Review this reference to understand sequencing, status handling, and dependency requirements that can impact migration success.

Clause Migration Validations 

These validations apply during insert, update, and delete operations on clause records. Operations fail when a validation is violated.

OperationValidationDescription
InsertDraft-only creationAllows only Draft clauses during initial insert operations.
InsertVersion conflict preventionPrevents inserting a clause when a Draft version exists for the same clause.
InsertClause set requirementRequires each clause to reference a valid DocumentClauseSet that exists in the target org.
InsertMain and alternate clause hierarchyRequires an existing main clause before inserting alternate clauses and allows only one main clause per clause group or Allows only one main clause per language within a clause set, and allows multiple alternate clauses for the same language.
UpdateRestricted fieldsPrevents updating the DocumentClauseSet, Language, IsAlternateClause, and Version fields after clause creation.
UpdateStatus transition rulesAllows changing an Active clause only to Draft (without modifying other fields) or to Archived.
UpdateArchived clause immutabilityPrevents updates to Archived clauses.
UpdateContent requirement for activationRequires clause content before changing status to Active.
DeleteStatus-based deletionAllows deletion of Draft and Archived clauses only.
DeleteMain clause protectionPrevents deleting a main clause while alternate clauses still exist.

Clause Status Mapping During Migration 

Clauses insert only in Draft status, regardless of their source status. Run a subsequent migration with status mapping to update the clause statuses. For example, a clause in the source org has three versions: Version 1 is Archived, Version 2 is Active, and Version 3 is Draft. When the clause is inserted, all three versions are created in Draft status in the target org. Perform a follow-up upsert migration with status mapping to align each clause version with its source org status.

Source Org Status (Pre-Migration)Guidance
ArchivedArchived clauses insert as Draft. Run a subsequent migration with status mapping to restore the Archived status. After a clause is archived, you can’t change its status.
ActiveActive clauses insert as Draft. Run a subsequent migration with status mapping to restore the Active status.
DraftDraft clauses insert as Draft, so no status change is required.
In ApprovalYou must not migrate In Approval clauses because their workflows don’t migrate. However, if In Approval clauses are migrated, they’re inserted in Draft status, and the approval process must be reinitiated from the UI.

Clause Migration Constraints 

These constraints describe behavioral rules, sequencing requirements, and tooling limitations that affect clause migration, especially during iterative and incremental migrations.

CategoryConstraintDescription
ToolingNo automated migrationRequires that you use supported data migration tools, such as Data Loader, because no automated clause migration utility exists.
ToolingAuthentication requirements for Data LoaderRequires OAuth-based authentication. Enforcing OAuth, Proof Key for Code Exchange (PKCE), or IP restrictions requires completing additional connected app and access configuration.
Data ModelClause category limitationsPrevents adding custom fields to Clause Category Configuration because it’s a setup object.
Data ModelManual ID creationCreation of an external ID field in the target org to store source org IDs for upsert operations on clause sets and clause records.
Data ModelManual ID mappingRequires manually mapping clause category IDs between source and target orgs.
Data DependencyClause set dependencyRequires clause sets and clause category configuration to exist in the target org before importing clauses.
Iterative MigrationMigration order dependencyRequires that you update existing clauses before you insert newly created clauses. Also, insert main clauses before alternate clauses.
Template DependencyMissing clause referencesPrevents template migration when referenced clauses, versions, or languages don’t exist in the target org.
Template DependencyDuplicate clausesCan cause clause reference mismatches during template migration when duplicate clauses exist in the target org.
Template DependencyOffice Open XML failuresCan cause template migration to fail when Office Open XML updates fail during document import.