Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Following NavPageAttribute needs to be added to configure user Importer. Where “NIUserCsvIntegrator“ will be replaced by the name of any other user integrator.

  • IsTestMode: Itdefines It defines whether the user Importer is in a test mode or not.
    Enable Integrator on non-live environments

    Code Block
    AddNavPageAttribute /Root/NI System.Customer.Integrator.IsTestMode.NIUserCsvIntegrator True

    App.config

    Code Block
    <add key="Core.SiteType" value="Test" />
  • CsvDelimiter: This attribute is optional and if not set the default delimiter (,) is used. (i.e. '|' for CCL)

  • ImportFilePath: This path links to the file path that the customer will drop the new user files to be uploaded and processed.

  • ImportFileBackupPath: Location where CSVs will be moved after processing is completed.

  • SchedulePeriod: Schedule period in seconds.

  • PollingInterval: This defines an interval an Integrator will poll to check if it should do work (in seconds). If unset, it will default to 5 minutes.

  • CsvTranslations: To Get translations from csv column to user property (used for collecting data).

Followings are the available user scaler properties:

  • Deactivate (X): If the column DeactivateX (aka ‘Deactivate (X)’) exists, leaving the value empty (‘’) would reactivate a user. Use ANY value for DeactivateX to deactivate a user.

  • OrgLoginId: is optional, Don't update if empty. This is unique within an Organization.

  • Password: if the user already exists and left empty - the password is not updated

  • FirstName: will not be updated if empty

  • LastName: will not be updated if empty
    EmailAddress: will not be updated if empty

  • ContactEmail: will not be updated if empty

  • ForcePasswordChange: 'True' or 'False'. Anything not 'True' (e.g. empty) for new users will be interpreted as 'False'. For updates, will not be updated if not 'True' or 'False'.

  • CanViewReports: 'True' or 'False'. Anything not 'True' (e.g. empty) for new users will be interpreted as 'False'. For updates, will not be updated if not 'True' or 'False'.

*Along with these scaler properties all active OPF fields can be used in translation.

Sample CsvTranslations:
"OrgLoginId=UniqueUserID,FirstName=FirstName,LastName=LastName,Password=DateOfBirth,ContactEmail=PersonalEmailAddress,Deactivate (X)=Deactivate (X)"

Here Left side of '=' sign is the MLS user property and right side is the csv column name.

[MLS user property]=[csv column name]

  • UserImportMode: This configuration is mandatory. Possible values are ‘Partial’ or ‘Full’. Partial mode may allow to create user with invalid regular fields.

Example NavPage Attribute Configuration

Code Block
--AddNavPageAttribute /Root/NI System.Customer.NIUserCsvIntegratorIntegrator.IsTestMode.NIUserCsvIntegrator True

AddNavPageAttribute /Root/NI System.Customer.Integrator.NIUserCsvIntegrator.CsvDelimiter ","
AddNavPageAttribute /Root/NI System.Customer.Integrator.NIUserCsvIntegrator.ImportFilePath "E:UserImporter\incomingFile\incomingFile"
AddNavPageAttribute /Root/NI System.Customer.Integrator.NIUserCsvIntegrator.ImportFileBackupPath "E:UserImporter\incomingFile\backupFile"
AddNavPageAttribute /Root/NI System.Customer.Integrator.NIUserCsvIntegrator.SchedulePeriod "1"
AddNavPageAttribute /Root/NI System.Customer.Integrator.PollingInterval.NIUserCsvIntegrator.PollingInterval "1"
AddNavPageAttribute /Root/NI System.Customer.Integrator.NIUserCsvIntegrator.CsvTranslations "OrgLoginId=UniqueUserID,FirstName=FirstName,LastName=LastName,Password=DateOfBirth,ContactEmail=PersonalEmailAddress"
AddNavPageAttribute /Root/NI System.Customer.Integrator.NIUserCsvIntegrator.UserImportMode "Partial"

...

If a user field value needs to be mapped to a different value then this section can be configured. Value mapping is only available for OPFs (Only ScS field)single-choice-string OPFs.

FieldName: Name of the field to be mapped (Case Sensitivecase-sensitive).

MappingMode: It can be three different types.

  • Complete (default): For ScS field, all All the OPF values must be present as target value have a mapping in the value mapping file. Otherwise it will be considered as configuration error.

  • WarnIfMappingIsMissing: For ScS field, Ignores Ignore any missing OPF value mapping and try to set the OPF value as is. Add a warning to the notificationIgnoreMissingMappings: For ScS field, Ignore any missing mapping and .

Note

If many OPF choices are missing in the mapping, it can result in a lot of warning messages (one per missing choice). This mapping mode is meant for small sets of OPF choices.

  • IgnoreMissingMappings:Ignore any missing mapping and try to set the OPF value as is - without mapping. Don’t add a warning/error to the notification.

MappingFileName:This property points to the location of the file that contains the mapping of SourceValue and TargetValue. (SourceValue/ and TargetValue is are case-sensitive) .

Info

The location of the mapping JSON file will be inside organization file collection. (i.e E:\LiveCanada\File_Collection\NI\NI\1\Configuration\Integration\User\ValueMapping-Rank.json)

...

If there are multiple email address provided for one user AND those are separated by the MultipleEmailsDelimiter only the first email is imported if this configuration is present.

...

Data Formatting Configuration (

...

Optional)

Sample Configuration:

Code Block
languagejs
  "ResetFieldsToDefaultIfEmptyConfigurationDataFormattingConfiguration" : {
	"FieldFormatting" : [
		{
			"ResetFieldsToDefaultIfEmptyFieldName" : ["DateOfBirth",
			"Vessel"Type" : "DateTime",
			"Rank"InputFormat" : "MM-dd-yyyy",
			"EmbarkmentDateOutputFormat" : "dd-MM-yyyy"				
		}
 	]
 
}

If no value (null/empty) is provided for a user property AND that property is part of the ResetFieldsToDefaultIfEmpty array, it resets any existing value to its default value (dependent on the data type - see below).

Info

The user property must be part of the DataValidationConfiguration except except for any Primary Identifying Field)

Default value for different user property types is as follows:

  • User scalar property (string): empty string (except any Primary Identifying Field)

  • OPF (single-choice-string): first choice

  • OPF (string): empty string

  • OPF (int): not supported yet (we don’t have a default value for int yet)

Info

If ResetFieldsToDefaultIfEmptyConfiguration is not required ResetFieldsToDefaultIfEmptyarray can be left empty like this. But configuration section must exists.

Code Block
  "ResetFieldsToDefaultIfEmptyConfiguration": {
    "ResetFieldsToDefaultIfEmpty": [
    ]
  }

Data Formatting Configuration (Optional)

Sample Configuration:

Code Block
languagejs
"DataFormattingConfiguration" : {
	"FieldFormatting" : [
		{
			"FieldName" : "DateOfBirth",
			"Type" : "DateTime",
			"InputFormat" : "MM-dd-yyyy",
			"OutputFormat" : "dd-MM-yyyy"				
		}
	]
}

Data formatting takes an input value and formats it according to the configuration. For every field which needs formatting the expected input format and output format is needed. The expected input format may be optional and that depends on the data type. Above configuration shows formatting of a date field.

Supported data types:

  • String

  • DateTime

  • Number

Data Assembler Configuration (Optional)

Sample Configuration:

Code Block
languagejs
"DataAssemblerConfiguration": {
	"FieldConfigurations" : [ 
		{
			"FieldName" : "OrgLoginId",
			"Segments" : [
				{	
					"IsField" : "true", 
					"Value" : "Operating Line"
				},
				{
					"IsField" : "false", 
					"Value" : "-"
				},
				{
					"IsField" : "true",
					"Value" : "OrgLoginId"
				}
			]
		}
	]
}

The data assembler activity is able to modify user property fields dynamically or create values using other user property fields. Every user property can be used to aggregate data for another or the same field.

For example, Above configuration adds a prefix to an user property "OrgLoginId" which consists of 3 different segments, “Operation Line” “-“ & “OrgLoginId“. If IsField=true, that means it will get the value provided in the csv, Otherwise whatever the value provided in the configuration value property it will consider that. Please consider that any previous data manipulation will have taken effect (i.e. DataSanitization). It may not be the original value from the CSV anymore.Data formatting takes an input value and formats it according to the configuration. For every field which needs formatting the expected input format and output format is needed. The expected input format may be optional and that depends on the data type. Above configuration shows formatting of a date field.

Supported data types:

  • String

  • DateTime

  • Number

Data Assembler Configuration (Optional)

Sample Configuration:

Code Block
languagejs
"DataAssemblerConfiguration": {
	"FieldConfigurations" : [ 
		{
			"FieldName" : "OrgLoginId",
			"Segments" : [
				{	
					"IsField" : "true", 
					"Value" : "Operating Line"
				},
				{
					"IsField" : "false", 
					"Value" : "-"
				},
				{
					"IsField" : "true",
					"Value" : "OrgLoginId"
				}
			]
		}
	]
}

The data assembler activity is able to modify user property fields dynamically or create values using other user property fields. Every user property can be used to aggregate data for another or the same field.

For example, Above configuration adds a prefix to an user property "OrgLoginId" which consists of 3 different segments, “Operation Line” “-“ & “OrgLoginId“. If IsField=true, that means it will get the value provided in the csv, Otherwise whatever the value provided in the configuration value property it will consider that. Please consider that any previous data manipulation will have taken effect (i.e. DataSanitization). It may not be the original value from the CSV anymore.

Reset Fields To Default If Empty Configuration (Mandatory)

Sample Configuration:

Code Block
  "ResetFieldsToDefaultIfEmptyConfiguration": {
    "ResetFieldsToDefaultIfEmpty": [
		"Vessel",
		"Rank",
		"EmbarkmentDate"
    ]
  }

If no value (null/empty) is provided for a user field listed in the ResetFieldsToDefaultIfEmpty array, it resets the user property (from no value) to the field’s default value (dependent on the data type - see below).

Any field not included in ResetFieldsToDefaultIfEmpty and no value was provided (null/empty), will not be updated (ignored).

 

If we want to set null/empty value to any field, those fields must be included in ResetFieldsToDefaultIfEmptyConfiguration. That means, if any organization uses deactivation field (Deactivate (X)) that needs to included in this configuration.

Info

The user property must be part of the DataValidationConfiguration except for any Primary Identifying Field)

Default values for different user property types:

  • User scalar property (string): empty string (except any Primary Identifying Field)

  • OPF (single-choice-string): first choice

  • OPF (string): empty string

  • OPF (int): not supported yet (we don’t have a default value for int yet)

Data Validation Configuration (Mandatory)

...