Versions Compared

Key

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

Goals

To direct push D365 Employee Information to the Adonis database.

AdonisWebServices - Consume example Step by step guide on how to consume using Adonis API calls.

Methods

FL_Dynamics_Create

This is the main method to use if you wanted to upload a person from Dynamics to Adonis for the first time. You may use the example JSON script below.

FL_Dynamics_Update

For the update method, you may eliminate a parameter that you don’t want to update.

Parameter Details

Parameters / ItemsCorrespondents from Adonis

Evaluation

Location

Error Code/ Text

ExternalEmployeeIDPW001P01_XREF.XREF_PIN

  • Not Null or not "" (001)

 

  • 001: <ExternalEmployeeID> is mandatory cannot be NULL.

NAME

FirstName

MiddleName

LastName

PW001P01.FIRSTNAME

PW001P01.MIDDLENAME

PW001P01.LASTNAME

 

  • FirstName, LastName Not Null or not "" (001)

  • MiddleName can be Null or ““

 

  • 001: <FirstName> is mandatory cannot be NULL.

  • 001: <LastName> is mandatory cannot be NULL.

JobIDPW001P0P.POSITIONID

  • Not Null or not "" (001)If the JobID do not exist in the cross-reference table (007)

General Codes > Personal Details > Ranks

  • 001: <JobID> is mandatory cannot be NULL.007: <JobID> not found in the <Ranks> cross-reference table

ADDRESS

Address1

Address2

Address3

PW001P01.ADDRESS1

PW001P01.ADDRESS2

PW001P01.ADDRESS3

 

  • Address1 Not Null or not "" (001)

  • Address2, Address3 can be Null or ““

 

  • 001: <Address1> is mandatory cannot be NULL.

CountryPW001P01.ADDRESS_COUNTRY

  • If Address1 is not Null then Country is not Null ELSE Null or ““ (001)

 

  • 001: <Country> is mandatory cannot be NULL.

ZipCode

PW001P01.POSTCODE

  • If Address1 is not Null then ZipCode is not Null ELSE Null or ““ (001)

 

  • 001: <ZipCode> is mandatory cannot be NULL.

EmailPW001P0T.TELENO

  • If email is incorrect email format (003)

 

  • 003: <Email> incorrect email format

TelephonePW001P0T.TELENO

  • Numeric characters only (002)

 

  • 002: <Telephone> numeric characters only.

BirthDate

PW001P01.BIRTHDATE

  • Not Null or not "" (001)

  • if format of date different than ‘YYYY-MM-DD' (004)

 

  • 001: <BirthDate> is mandatory cannot be NULL.

  • 004: <BirthDate> ‘YYYY-MM-DD' wrong date format

GenderPW001P01.SEX

It can be Null or ““

 

 

LegalEntity

PW001P01.CLIENT

  • Not Null or not "" (001)

  • If the LegalEntity do not exist in the cross-reference table (007)

Setup > Organization StructureSELECT FROM WHERE PW001P01.CLIENT=(SELECT NUMORGID FROM PWORG WHERE PWORG.ORGCODE='LegalEntity')

  • 001: <LegalEntity> is mandatory cannot be NULL.

  • 007: <LegalEntity> not found in the <Organization Structure> cross-reference table

EmploymentStartDatePW001P01.EMPLOYMENTSTARTDATE

  • Not Null or not "" (001)

  • if format of date different than ‘YYYY-MM-DD' (004)

  • If EmploymentStartDate date exceeds EmploymentEndDate date (005)

 

  • 001: <EmploymentStartDate> is mandatory cannot be NULL.

  • 004: <EmploymentStartDate> ‘YYYY-MM-DD' wrong date format

  • 005: <EmploymentStartDate> date cannot exceeds <EmploymentEndDate> date.

EmploymentEndDate

PW001P01.EMPLOYMENTENDDATE

Not Null or not "" (001)

  • if format of date different than ‘YYYY-MM-DD' (004)

  • If EmploymentEndDate date is less than EmploymentStartDate date (006)

 

001: <EmploymentEndDate> is mandatory cannot be NULL.

  • 004: <EmploymentEndDate> ‘YYYY-MM-DD' wrong date format

  • 006: <EmploymentEndDate> date cannot be less than <EmploymentStartDate> date.

ContractTypePW001P01.CONTRACTTYPE

  • Not Null or not "" (001)

  • If the ContractType do not exist in the cross-reference table (007)

General Codes > Contracts > Contract Type

  • 001: <ContractType> is mandatory cannot be NULL.

  • 007: <ContractType> not found in the <Contract Type> cross-reference table

TerminationCode

PW001P01.STOPREASON

Not Null or not "" (001)

  • If the TerminationCode do not exist in the cross-reference table (007)

General Codes > Personal Details > Termination Reason

001: <TerminationCode> is mandatory cannot be NULL.

  • 007: <TerminationCode> not found in the <Termination Reason> cross-reference table

ContactPerson

FirstName

MiddleName

LastName

PW001P06.FIRSTNAME

PW001P06.MIDDLENAME

PW001P06.LASTNAME

If the FirstName is not Null then

  • FirstName, LastName Not Null or not "" (001)

  • MiddleName can be Null or ““

else

leave it null

 

  • 001: <FirstName> is mandatory cannot be NULL.

  • 001: <LastName> is mandatory cannot be NULL.

Relationship

PW001P06.RELATION

If the ContactPerson is not Null then

  • If the Relationship do not exist in the cross-reference table (007)

  • Not Null or not "" (001)

else

leave it null

General Codes > Family > Relationship Codes

  • 007: <Relationship> not found in the <Relationship Codes> cross-reference table

  • 001: <Relationship> is mandatory cannot be NULL.

ContactPhonePW001PT6.TELENO

If the ContactPhone is not Null then

  • incorrect format (002)

  • Not Null or not "" (001)

else

leave it null

 

  • 002: <ContactPhone> numeric characters only.

  • 001: <ContactPhone> is mandatory cannot be NULL.

ContactAddress

Address1

Address2

Address3

PW001P06.ADDRESS1

PW001P06.ADDRESS2

PW001P06.ADDRESS3

It can be Null or ““

 

 

ContactCountryPW001P06.COUNTRY

It can be Null or ““

 

 

ContactZipCode

PW001P06.POSTCODE

It can be Null or ““

 

 

ContactGenderPW001P06.SEX

It can be Null or ““

 

 

JSON Example

Code Block
{
    "request": {
        "ExternalEmployeeID": "10022",      
        "Name": [
        {
                "FirstName":"Bob",
                "MiddleName":"Smith",
                "LastName":"Cruz" 
        }
        ],        
        "Jobid": "0011",
        "Address": [
        {
                "Address1":"Østregata 12",
                "Address2":"Arendal",
                "Address3":"" 
        }
        ], 
        "Country": "NO",    
        "ZipCode": "4822",                            
        "Email": "name@email.com",                                
        "Telephone": "+47 76543210",
        "Birthdate": "1980-01-01",
        "Gender": "M",  
        "LegalEntity": 0,                      
        "EmploymentStartDate": "2022-06-01",
        "EmploymentEndDate": "2022-08-01",
        "ContractType": "1980-01-01",
        "TerminationCode": "1980-01-01",
        "ContactPerson": [
        {
                "FirstName":"John",
                "MiddleName":"Salvador",
                "LastName":"Cruz" 
        }
        ], 
        "Relationship": "Father",      
        "ContactPhone": "+4712342567",
        "ContactAddress": [
        {
                "Address1":"Barbu 22",
                "Address2":"Arendal",
                "Address3":"" 
        }
        ], 
        "ContactCountry": "NO",    
        "ContactZipCode": "4822",           
        "ContactGender": "M",  
        "Authentication_Token": "XXXX"
    }
}

Updating Tables

PW001P01 and PW001P0P - Personal Details

PW001P01_XREF - To cross-reference PIN to EmployeeID

PW001P06 - Next of Kin Details

...

Housekeeping

APM Adonis Personnel Manager

Need to set up the XREF (cross-reference) tables. i.e we will create an INTERFACE_XREF called “DYNAMICS” in the PW001C000_XREF Table. Each standard code in Dynamics will be defined in our system, so we can map what they are referring for. We set this up in the General Codes.

Parameters / Items

Location

Ranks

General Codes > Personal Details > Ranks

LegalEntity

Setup > Organization Structure

ContractType

General Codes > Contracts > Contract Type

TerminationCode

General Codes > Personal Details > Termination Reason

Relationship

General Codes > Family > Relationship Codes

...

Image Added

Image Added

Image Added

APP Adonis Administrator Portal

...