Step 4: Create an Import Job

The code in this section shows you how to create the import job using the Saint.ImportCreateJob() method with the parameters specified in Table 1.




Boolean value that specifies whether to check report suites for compatible divisions. Supported values are:

  • 0: Do not check report suite compatibility
  • 1: Check report suite compatibility (default)


A description of the import job.


The email address to receive the report.


Boolean value that specifies whether to automatically perform an export when the import job finishes processing. Supported values include:

  • 0: Do not export (default)
  • 1: Export when the import job completes.


An array of column values for classification.


Boolean value that specifies whether to overwrite data when conflicts occur. Supported values include:

  • 0: Do not rewrite data on conflicts (default)
  • 1: Overwrite data on conflicts


The relation ID. You got this ID as a return value from Saint.GetCompatibilityMetrics() method.


The list of report suites to receive the import job.

The first header column in the header parameter is always named Key, is mandatory, and must be unique across the entire system. For this article’s JJ. Esquire demo application, the Key value in each data record is the product SKU collected during Analytics JavaScript tagging.

PHP Code

/* Saint.ImportCreateJob */ 
$relation_id = ''; 
$header = array( 
'Key', // This is mandatory 
$importParams = array( 
'description'=>'Classifying data for JJEsquire', 
'export_results'=>0, // export_results = 0, meaning do not export following the import
$response = sendRequest('Saint.ImportCreateJob', $importParams ); 

$job_id = (int) $response; 

Java Code

/* Use Saint.ImportCreateJob to specify the parameters for the Import job and the header columns to be classified */ 
String emailAddress = ""; 
int relationId = ""; 
String[] header = new String[3]; 
/* Refer to the note of the Key column*/ 
header[0] = "Key"; // This is mandatory 
header[1] = "Category"; 
header[2] = "Brand"; 

int importJobID = port.saintImportCreateJob(0, "Classifying data for JJEsquire", emailAddress, 0, header, 0, relationId, report_suite_array); 
System.out.println("Value of reportID from saintImportCreateJob is: "+importJobID);

The Saint.ImportCreateJob() method returns the ID of the newly created import job. You will use this ID to populate the import job in the next step.