Examples of Loading Document Types

This topic provides examples showing how to load and manage Document Type objects using HCM Data Loader.

Creating Document Types Using Source Keys

This example DocumentType.dat file creates one global and one country-specific document type. The document types are identified using source keys.

METADATA|DocumentType|SourceSystemOwner|SourceSystemId|DocumentType|Description| LegislationCode|CategoryCode|AuthorizationRequiredFlag|MultipleOccurencesFlag|ActiveInactiveFlag|PublishRequiredFlag|HierarchyCode|DocumentNameRequired|DocumentNumberRequired|DateFromRequired|DateToRequired|IssuingCountryRequired|IssuingLocationRequired|IssuingAuthorityRequired|IssuedDateRequired|CommentsRequired
MERGE|DocumentType|VISION|DTYPETest001|RS Global DocType1|RS Global DocType1 Description||PAYROLL|Y|Y|N|Y|GENERAL|R|R|Y|Y|Y|Y|Y|Y|Y
MERGE|DocumentType|VISION|DTYPETest003|RS US DocType1|RS US DocType1 Description|US|AUDIT|Y|Y|N|Y|PAYROLL|R|R|Y|Y|Y|Y|Y|Y|Y

Creating Document Types Using User Keys

This example DocumentType.dat file creates one country-specific document type. The document type is identified using user keys.

METADATA|DocumentType|DocumentType|Description|Country|CategoryCode|AuthorizationRequiredFlag|MultipleOccurencesFlag|ActiveInactiveFlag|PublishRequiredFlag|HierarchyCode|DocumentNameRequired|DocumentNumberRequired|DateFromRequired|DateToRequired|IssuingCountryRequired|IssuingLocationRequired|IssuingAuthorityRequired|IssuedDateRequired|CommentsRequired
MERGE|DocumentType|US Audit Doc Type|US Audit Doc Type Description|United States|AUDIT|Y|Y|Y|Y|PAYROLL|R|R|Y|Y|Y|Y|Y|Y|Y
Note: If the document type were global, you would have to provide a source key rather than a user key. This requirement exists because Country is a required attribute of the user key.

Creating Document Types with Delivery Preferences

This example DocumentType.dat file creates a country-specific document type with delivery preferences for the document type, payroll statutory unit, and department. The document type and delivery preferences are identified using source keys.

METADATA|DocumentType|SourceSystemOwner|SourceSystemId|DocumentType|Description| LegislationCode|CategoryCode|AuthorizationRequiredFlag|MultipleOccurencesFlag|ActiveInactiveFlag|PublishRequiredFlag|HierarchyCode|DocumentNameRequired|DocumentNumberRequired|DateFromRequired|DateToRequired|IssuingCountryRequired|IssuingLocationRequired|IssuingAuthorityRequired|IssuedDateRequired|CommentsRequired
MERGE|DocumentType|VISION|DTYPETest003|RS US DocType1|RS US DocType1 Description|US|AUDIT|Y|Y|N|Y|PAYROLL|R|R|Y|Y|Y|Y|Y|Y|Y
METADATA|DeliveryPreference|SourceSystemOwner|SourceSystemId|DocumentTypeId(SourceSystemId)|InitialConsentValueFlag|OnlineConsentRequiredFlag|OnlineEnabledFlag|PaperEnabledFlag|AllowWorkerOverrideFlag|EmailEnabledFlag|LegislationCode|LevelCodeName|DocumentTypeCountry|DocumentTypeLegislationCode|PayrollStatutoryUnitName|DepartmentName
MERGE|DeliveryPreference|VISION|DTYPETest003_Pref0|DTYPETest003|N|N|Y|Y|N|N|US||US|US||
MERGE|DeliveryPreference|VISION|DTYPETest003_Pref1|DTYPETest003|N|N|Y|Y|N|N|US|Payroll Statutory Unit|US|US|GBI HCM Widgets USA|
MERGE|DeliveryPreference|VISION|DTYPETest003_Pref2|DTYPETest003|N|N|Y|Y|N|N|US|Department|US|US|GBI HCM Widgets USA|HCM-1001-Corporate

Loading Translated Document Types and Descriptions

This example DocumentTypeTranslation.dat file translates an existing document type and its description. It identifies the document type using source keys.

METADATA|DocumentTypeTranslation|SourceSystemOwner|SourceSystemId|BaseDocumentType|LegislationCode|SourceLang|Language|DocumentType|Description
MERGE|DocumentTypeTranslation|VISION|DTYPETest001|RS Global DocType1||US|JP|RS Global DocType1 JP|RS Global DocType1 DESC JP
MERGE|DocumentTypeTranslation|VISION|DTYPETest003|RS US DocType1|US|US|JP|RS US DocType1 JP|RS US DocType1 DESC JP

Deleting Document Types

You can delete a document type only if no document records of that type exist. When you delete a document type, any associated delivery preferences are also deleted. This example DocumentType.dat file deletes a document type that's identified by its source key.

METADATA|DocumentType|SourceSystemOwner|SourceSystemId
DELETE|DocumentType|VISION|DTYPETest001
DELETE|DocumentType|VISION|DTYPETest003

This example DocumentType.dat file deletes a document type that's identified by its user key.

METADATA|DocumentType|DocumentType|Description|Country
DELETE|DocumentType|US Audit Doc Type|US Audit Doc Type Description|United States