Creating Import Sources
An Import Sources record ties an Import Source Type with a target entity. You can also specify your own business logic for handling the matching and posting processes in an Import Run.
Before you can import data into an entity, you must have an appropriate Import Source configured. Follow these steps to create a new Import Source:
- If desired, a developer writes and compiles code that implements the appropriate Aptify interface to define matching or posting behavior.
- To develop new matching logic, a developer writes and compiles code that implements Aptify's IImportRecordMatch interface.
- To develop new posting logic, a developer writes and compiles code that implements Aptify's IImportRecordPost interface.
- Creating new code is beyond the scope of this document. Refer to the Aptify Software Development Kit (SDK) for information on these interfaces.
Â
- If a developer have defined new matching or posting behavior, the developer or an administrator adds the matching and/or posting object file to the Object Repository.
- See Creating Object Repository Objects for more information on adding new items to the repository.
Â
- See Creating Object Repository Objects for more information on adding new items to the repository.
- Open a new record from the Import Sources service (found under the Aptify Framework Administration application).
- Enter a Name for the import source.
- Enter a source type in the Import Source Type link box.
- In the Mapping Entity link box, enter the entity that you want to import data to.
- In the Record Template link box, enter an existing Record Template for the entity you specified in the Mapping Entity field, if desired.
- This field is optional. If you specify a record template, records created by the Import Runs posting function will use the default specified in the template if the import file does not specify a value for a particular field. This is particularly useful if your entity has a required field that does not have a mapped field in the import file.
- For example, if your entity contains a required Category field that is not in your source data, the import fails since new records cannot be saved without specifying a category. However, if you use a Record Template that specifies a default category, the import succeeds since the posting process uses the information in the Record Template if not provided by the import file.
Â
- For example, if your entity contains a required Category field that is not in your source data, the import fails since new records cannot be saved without specifying a category. However, if you use a Record Template that specifies a default category, the import succeeds since the posting process uses the information in the Record Template if not provided by the import file.
- See the Working with Record Templates and Administering Pending Changes for more information on Record Templates. Â
- This field is optional. If you specify a record template, records created by the Import Runs posting function will use the default specified in the template if the import file does not specify a value for a particular field. This is particularly useful if your entity has a required field that does not have a mapped field in the import file.
- Configure the Record Match and/or Record Post fields if a developer has written code that modifies the standard matching and/or posting behavior.
- If you leave these fields blank, the system uses the default matching and posting logic.
- Follow these steps to specify your own matching logic:
- Enter the .NET assembly name for the Record Match file in the Record Match Assembly Name field.Â
- Enter the Object Repository location of the Record Match object in the Record Match Object field. (Alternatively, you can click the plus (+) icon to the right of the field to open the Select Object Repository Object dialog. You can use this dialog to browse for an existing object or to add a new object to the repository.)
- Enter the class within the .NET assembly that defines the matching logic in the Record Match Class field.Â
Â
- Follow these steps to specify your own posting logic:Â
- Enter the .NET assembly name for the Record Post file in the Record Post Assembly Name field.
- Enter the Object Repository location of the Record Post object in the Record Post Object field. (Alternatively, you can click the plus (+) icon to the right of the field to open the Select Object Repository Object dialog. You can use this dialog to browse for an existing object or to add a new object to the repository.)
- Enter the class within the .NET assembly that defines the posting logic in the Record Post Class field.
- Enter any applicable Comments in the field provided.
Â
- Click the Import Source Columns tab.
- Create an Import Source Columns sub-type record for each column that is contained in the import file.
- Create one entry for each column in the import file, even if you do not intend to import a particular column.
- The Import Source Columns sub-type records must appear in the same order that the columns appear within the import file.
- Follow these steps to create an Import Source Columns sub-type record:Â
- Open a new sub-type record.
- Enter the name of the column in the Column Name field.
- In the Default Mapping Field, enter the name of the field in the Mapping Entity to which data from this column will be imported. Leave this field blank if you do not want to import data from this column into Aptify.
- Select the Show In Display check box if you want this column's data to appear in the Import Run Details record's Display Data field. If you select the check box for multiple columns, the columns' data is separated by dashes in the Display Data field.
- Enter a Description, if desired.
- If the column is a field that should not be imported, uncheck the Import Default. For example, if a column is an ID field.
- If you want to allow a user to define the default matching criteria for a particular column in the import source file when running the Generic Import wizard, check the Match Column option. Â
 - Click OK to save and close the sub-type record. Â
Â
- Save and close the Import Sources record.
Â
Copyright © 2014-2019 Aptify - Confidential and Proprietary