Source system variable reference
These variables are used in various PowerShell scripts in Source systems, including the Persons import script and Departments import script.
$configuration
Direction: input
Datatype: JSON
Contains values from the source system's input form, if one exists. See Input forms.
Example
{ "text": { "required": "Example text", "multiline": "Example multiline text" }, "password": "Fh6%@gX^ZP8zM2", "email": "[email protected]", "switch": false, "radio": "one" }
$departments
Direction: output
Datatype: JSON
You build the $departments
array in the Departments import script by making API calls to the external source system. At the end of the script, you must return the array to HelloID via Write-Output $departments | ConvertTo-Json
.
The hash tables should conform to this format:
@{ ExternalId = "ADMINISTR_$i" DisplayName = "Administration $i" Name = "Administration $i" ManagerExternalId = "JohnD-0" }
$dryRun
Direction: input
Datatype: Boolean
Indicates whether the import is running in preview or in production.
When you preview the Persons import script or the Departments import script, HelloID sets this variable to true
. When an actual import occurs, HelloID sets this variable to false
.
Warning
All your API calls must be wrapped in the script's if (-Not($dryRun -eq $true)) { }
block. Otherwise, your production code will run during script previews.
$persons
Direction: output
Datatype: JSON
You build the $persons
array in the Persons import script by making API calls to the external source system. At the end of the script, you must return each hash table in this array to HelloID, sequentially, via Write-Output $person | ConvertTo-Json
.
The hash tables should conform to this format:
@{ ExternalId = "JohnD-$i" DisplayName = "John Doe" FirstName = "John" LastName = "Doe" Convention = "B" Contracts = @( @{ SequenceNumber = "1" DepartmentName = "Administration" DepartmentCode = "ADMINISTR" TitleName = "Manager" TitleCode = "Man" StartDate = Get-Date("2018-01-01") -Format "o" EndDate = $null } ) }