Skip to content

Latest commit

 

History

History
18 lines (8 loc) · 1.57 KB

02-additional-development-information.md

File metadata and controls

18 lines (8 loc) · 1.57 KB

Additional development information.

To create a Custom Importer, the developer needs to define their own DataReader and DataWriter, and define Settings and Validation rules, if necessary. Currently, as a help, the Module provides the ability to use the CSV Reader as part of the VirtoCommerce.ImportModule.CsvHelper package, but does not restrict the developer from writing their own Readers for any data sources.

Note: As an example, the process of implementing a Custom Importer using CsvHelper is detailed here.

The following Module services are also available for developers, which can be used in the UI:

  • IImportRunService is the main service for managing the execution of the import process. The service provides access to methods for previewing (PreviewAsync), launching an import (RunImportAsync), and creating a similar import task in the form of a BackgroundJob (RunImportBackgroundJob).

  • Services IImportProfilesSearchService and IImportRunHistorySearchService - provide search capabilities for ImportProfiles and ImportRunHistory, respectively.

  • Services IImportProfileCrudService and IImportRunHistoryCrudService - provide facilities for CRUD operations on ImportProfiles and ImportRunHistory.

For developers, the possibility of extending authorization for newly created Importers is available. The DataImporterBuilder has WithAuthorizationReqirement and WithAuthorizationPermission methods to set custom permissions if necessary.