Web Service Connector not fetching results

Hi,

I configured a web service connector to fetch all workers from Oracle Fusion Cloud HCM in IdentityNow. I added two operation types for testing the connection and for Account Aggregation. The issue is that when I run the aggregation I get zero results back. Also, the schema is define. This is the current configuration on our identitynow tenant. Can you please advise.





Hi @adyer,

It will helpful if you can share a dummy JSON response you are receiving when you are executing this get all workers API so that we can identify if there is any issue in mapping the response attributes with schema attributes on IDN. Also, please validate if the root path is configured correctly in the response information.

1 Like

Hi

Use postman to get the json output of your get accounts api.

Then by using below json path validator find the attributes response path and accordingly change in your configuration.

Hi Shanmukh,

Attached is a dummy json from oracle fusion api response. Also I tested tried doing a get call for to get all workers i’m able to get a response. Also in the url i need to be able to get multi value fields for some reason i’m only able to get the only first value key pair. In the context url i have the following

/hcmRestApi/resources/11.13.18.05/workers?expand=names&expand=emails&expand=workRelationships.assignments%offset=0&limit=100

The root path configure is $.items[*]

OracleFusionDummyDataResponse (8.0 KB)

Hi Alex
Thank you for raising the question and sharing the json response.
I believe you can try once with $.items as the root path. IdentityNow should be able parse the array and then populate the values to the each accounts element properly.
If still does not work, then can you please share us the account schema configuration. I think having a look at the id field and name field of the account schema should be helpful too.
I hope this helps.

Kind regards
Vikas

thanks Vikas, i fixed the context url and updated the rootpath to $.items and no results after aggregation. See account schema.
Schema (4.4 KB)

1 Like

Hi Alex
Thank you for the response.
I see you are using PersonNameId attribute as the identity attribute and identity displayname in the account schema.
But I did not find this attribute in the response mapping configuration.
Can you please add this attribute in the response mapping for aggregation operation and map it to the corresponding json path.
Please let me know how it goes then.

Thank you
Kind regards
Vikas

If you configured your root path as $.items[*] and based on the dummy json.

Your first key is Items which is a list and inside that list you have “workRelationships”: which has a key Items and it’s a list aswell and inside that list you have the key PeriodOfServiceId so to retrive this value you would do something like that:
PeriodOfServiceId - Attribute Path: workRelationships.items.[*].PeriodOfServiceId

Hi Vikas,

I updated the account schema and included the PersonId and PersonNumber and was able to get the results however when I tried to pull other data such as EmailAddressId, and EmailAddress i’m not able to parse the data. In addition, i updated the attribute path to the corresponding json. I suspect the issue is with the attribute paths. Also, i tested by setting the attribute paths for EmailAddress, EmailAddressId to emails and i’m able to get the data but in an unstructured format it brings everything in the emails json path.

Hi Yan,

Thanks, I tried this approach and it did not work. However when I changed the attribute path to point to just workRelationships the entire list was populated in the PeriodOfServiceId attribute, the data was not parsed properly.

Can you validate if this json is correctly formated?

{    
  "items":[
        {
            "PersonId": 300100215315227,
            "PersonNumber": "960000000000900",
            "CorrespondenceLanguage": null,
            "BloodType": null,
            "DateOfBirth": null,
            "DateOfDeath": null,
            "CountryOfBirth": null,
            "RegionOfBirth": null,
            "TownOfBirth": null,
            "ApplicantNumber": null,
            "CreatedBy": "VMOSS",
            "CreationDate": "2019-04-23T10:25:40+00:00",
            "LastUpdatedBy": "VMOSS",
            "LastUpdateDate": "2019-04-23T10:25:44.457+00:00",
            "workRelationships": {
                "items": [
                    {
                        "PeriodOfServiceId": 300100215315230,
                        "LegislationCode": "US",
                        "LegalEntityId": 100000011593283,
                        "LegalEmployerName": null,
                        "WorkerType": "E",
                        "PrimaryFlag": true,
                        "StartDate": "2018-01-01",
                        "LegalEmployerSeniorityDate": null,
                        "EnterpriseSeniorityDate": null,
                        "OnMilitaryServiceFlag": false,
                        "WorkerNumber": null,
                        "ReadyToConvertFlag": null,
                        "TerminationDate": null,
                        "NotificationDate": null,
                        "LastWorkingDate": null,
                        "RevokeUserAccess": null,
                        "RecommendedForRehire": "ORA_NS",
                        "RecommendationReason": null,
                        "RecommendationAuthorizedByPersonId": null,
                        "CreatedBy": "VMOSS",
                        "CreationDate": "2019-04-23T10:25:40.075+00:00",
                        "LastUpdatedBy": "VMOSS",
                        "LastUpdateDate": "2019-04-23T10:25:45.295+00:00",
                        "assignments": {
                            "items": [
                                {
                                    "AssignmentId": 300100215315237,
                                    "AssignmentNumber": "E960000000000900",
                                    "AssignmentName": "E960000000000900",
                                    "ActionCode": "HIRE",
                                    "ReasonCode": null,
                                    "EffectiveStartDate": "2018-01-01",
                                    "EffectiveEndDate": "4712-12-31",
                                    "EffectiveSequence": 1,
                                    "EffectiveLatestChange": "Y",
                                    "BusinessUnitId": 100010025072009,
                                    "BusinessUnitName": "GBI HCM-Financials USA BU",
                                    "AssignmentType": "E",
                                    "AssignmentStatusTypeId": 100010026278977,
                                    "AssignmentStatusTypeCode": "ACTIVE_PROCESS",
                                    "AssignmentStatusType": "ACTIVE",
                                    "SystemPersonType": "EMP",
                                    "UserPersonTypeId": 100010025072012,
                                    "UserPersonType": "Employee",
                                    "ProposedUserPersonTypeId": null,
                                    "ProposedUserPersonType": null,
                                    "ProjectedStartDate": null,
                                    "ProjectedEndDate": null,
                                    "PrimaryFlag": true,
                                    "PrimaryAssignmentFlag": true,
                                    "PositionId": null,
                                    "PositionCode": null,
                                    "SynchronizeFromPositionFlag": false,
                                    "JobId": null,
                                    "JobCode": null,
                                    "GradeId": null,
                                    "GradeCode": null,
                                    "GradeLadderId": null,
                                    "GradeLadderName": null,
                                    "GradeStepEligibilityFlag": true,
                                    "GradeCeilingStepId": null,
                                    "GradeCeilingStep": null,
                                    "DepartmentId": null,
                                    "DepartmentName": null,
                                    "ReportingEstablishmentId": null,
                                    "ReportingEstablishmentName": null,
                                    "LocationId": null,
                                    "LocationCode": null,
                                    "WorkAtHomeFlag": false,
                                    "AssignmentCategory": null,
                                    "WorkerCategory": null,
                                    "PermanentTemporary": null,
                                    "FullPartTime": null,
                                    "ManagerFlag": false,
                                    "HourlySalariedCode": null,
                                    "NormalHours": null,
                                    "Frequency": null,
                                    "StartTime": null,
                                    "EndTime": null,
                                    "SeniorityBasis": "ORA_PER_SNDT_DAYS",
                                    "ProbationPeriod": null,
                                    "ProbationPeriodUnit": null,
                                    "ProbationEndDate": null,
                                    "NoticePeriod": null,
                                    "NoticePeriodUOM": null,
                                    "WorkTaxAddressId": null,
                                    "ExpenseCheckSendToAddress": null,
                                    "RetirementAge": null,
                                    "RetirementDate": null,
                                    "LabourUnionMemberFlag": null,
                                    "UnionId": null,
                                    "UnionName": null,
                                    "BargainingUnitCode": null,
                                    "CollectiveAgreementId": null,
                                    "CollectiveAgreementName": null,
                                    "InternalBuilding": null,
                                    "InternalFloor": null,
                                    "InternalOfficeNumber": null,
                                    "InternalMailstop": null,
                                    "DefaultExpenseAccount": null,
                                    "PeopleGroup": null,
                                    "CreatedBy": "VMOSS",
                                    "CreationDate": "2019-04-23T10:25:40.216+00:00",
                                    "LastUpdatedBy": "VMOSS",
                                    "LastUpdateDate": "2019-04-23T10:25:45.812+00:00",
                                    "links": []
                                }
                            ]
                        }
                    }
                ]                    
            },
            "names": {
                "items": [
                    {
                        "PersonNameId": 300100215315228,
                        "EffectiveStartDate": "2018-01-01",
                        "EffectiveEndDate": "4712-12-31",
                        "LegislationCode": "US",
                        "LastName": "Doe",
                        "FirstName": "John",
                        "PreNameAdjunct": null,
                        "Suffix": null,
                        "MiddleNames": null,
                        "DisplayName": "John Doe",
                        "OrderName": "John Doe",
                        "ListName": "John Doe",
                        "FullName": "John Doe",
                        "NameLanguage": "US",
                        "CreatedBy": "VMOSS",
                        "CreationDate": "2019-04-23T10:25:40.022+00:00",
                        "LastUpdatedBy": "VMOSS",
                        "LastUpdateDate": "2019-04-23T10:25:44.464+00:00",
                        "LocalPersonNameId": 300100215315229,
                        "LocalEffectiveStartDate": "2018-01-01",
                        "LocalEffectiveEndDate": "4712-12-31",
                        "LocalLegislationCode": "US",
                        "LocalLastName": "Doe",
                        "LocalFirstName": null,
                        "LocalPreNameAdjunct": null,
                        "LocalSuffix": null,
                        "LocalMiddleNames": null,
                        "LocalDisplayName": "John Doe",
                        "LocalOrderName": "John Doe",
                        "LocalListName": "John Doe",
                        "LocalFullName": "John Doe",
                        "LocalNameLanguage": "US",
                        "LocalCreatedBy": "VMOSS",
                        "LocalCreationDate": "2019-04-23T10:25:40.022+00:00",
                        "LocalLastUpdatedBy": "VMOSS",
                        "LocalLastUpdateDate": "2019-04-23T10:25:44.465+00:00",
                        "links": []
                    }
                ]
            }
        }
    ]
}```

If it’s correct then your path should be a little different, assuming that your root path is $.items[*]
PersonNumber = PersonNumber
PersonId = PersonId
PeriodOfServiceId = workRelationships.items.[*].PeriodOfServiceId
DisplayName = names.items.[*].DisplayName

Hi Alex,

Thank you for confirmation. Really glad at the least the accounts have started to pop up that means we are on right track and now as you mentioned, we just need to update the mapping for emailAddress attributes. But unfortunately, I am not able to see the attribute email in the dummy json payload you have shared so it is bit difficult for me to identify where the issue could be.
So is it possible to please share the exact schema information (please remove the data from the payload and replace it with some dummy values as the data is always sensitive and i do not recommend to share it here :blush: ) but having the information about email schema will be helpful.

Some suggestions (just trying my luck and hope it work for you :blush:),

You can see if the email.items is indeed a list, then i believe there should be some other attribute that should determine whether the email is primary email if you need only this one, then you can use json filter expressions like
emails.items.[?(@.isPrimary==true] here i am assuming that isPrimary attribute will be set as true for the primary email (but in your case it could be different so please feel free to replace the attribute and value according to your needs) and it will only give you the required email instead of all the emails.

If you need all the emails (which you are already getting), then i suggest you to please configure emailAddress attribute as multiValue attribute in account schema and then it shall store all the emails as multiValue attributes.

In case the approach does not work out, please share with me the detailed schema information of json body with dummy data or perhaps include the email information in the existing dummy example you have shared above in the same format so that i can assist you further.

Thank you for the feedback on it, please keep us posted.

Regards
Vikas.

Hi Vikas,

Thanks, I was able to figure it out. I actually had to set attribute path as following as per screenshot. After doing this I’m able to parse the json data in the proper format.

Hi Yan,

I was able to fix it by setting the attribute path differently, for example: [‘workRelationships’][0][‘PeriodOfServiceId’].

1 Like

Hi Alex

Great :+1: and thank you for confirming . Glad I could assist you. Good luck with the further development :blush:

Cheers
Kind Regards
Vikas.

Hi,

I set up a account creation operation on the webservice connector and getting the following error while trying to create an account via access profile.

Errors:

Exception occurred while performing ‘Create’ operation on identity ‘null’: Url: hcmRestApi/resources/11.13.18.05/workers, Message: 400 : Bad Request, HTTP Error Code: 400

Create Account Body:

{
“names”: [
{
“LastName”:“$plan.LastName$”,
“FirstName”: “$plan.FirstName$”
}
],
“emails”: [
{
“EmailAddress”: “$plan.email$”
}
],
“workRelationships”: [
{
“LegalEmployerName”: “$plan.LegalEmployerName$”
“assignments”: [
{
“BusinessUnitName”: “$plan.BusinessUnitName$”,
“UserPersonType”: “$plan.UserPersonType$”
}
]
}
]
}



Hi Alex

I see couple of issues here at first look.

  1. I see you are using $plan. email but in the create profile you have a variable emailAddress so either you will need to change it to $plan.emailAddress as created in create profile which is easier to do than updating the provisioning policy for create. Probably in your case email is the unique identifier in backend application and due to this email is always pushed blank so you are getting the errror as 404.

  2. I also did not see the response mapping. I believe you will need to set that up as that will fetch the exact information of created user and then update it on account schema.

Please try to do the above changes and let me know if that helps.

Thank you

Hi Vikas,

I did the following now getting a different the following error message:

Provisioning Error:

Exception occurred while performing ‘Create’ operation on identity ‘[email protected]’: Url: https://test.com/hcmRestApi/resources/11.13.18.05/workers, Message: 400 : Bad Request, HTTP Error Code: 400

Here’s what I have configured in the response body:
{
“names”: [
{
“LastName”:“$plan.LastName$”,
“FirstName”:“$plan.FirstName$”,
“LegislationCode”:“$plan.LegislationCode$”
}

],
“emails”: [
{
“EmailType”:“$plan.EmailType$”,
“EmailAddress”:“$plan.EmailAddress$”
}

],
“workRelationships”: [
{
“LegalEmployerName”:“$plan.LegalEmployerName$”,
“WorkerType”:“$plan.WorkerType”,
“assignments”: [
{
“ActionCode”:“$plan.ActionCode”,
“BusinessUnitName”:“$plan.BusinessUnitName”,
“UserPersonType”:“$plan.UserPersonType”
}
]
}
]
}

Response Mapping:

Create Profile:



I realized i attached the incorrect json body, here’s the updated one.

{
“names”: [
{
“LastName”:“$plan.LastName$”,
“FirstName”:“$plan.FirstName$”,
“LegislationCode”:“$plan.LegislationCode$”
}

],
“emails”: [
{
“EmailType”:“$plan.EmailType$”,
“EmailAddress”:“$plan.EmailAddress$”
}

],
“workRelationships”: [
{
“LegalEmployerName”:“$plan.LegalEmployerName$”,
“WorkerType”:“$plan.WorkerType$”,
“assignments”: [
{
“ActionCode”:“$plan.ActionCode$”,
“BusinessUnitName”:“$plan.BusinessUnitName$”,
“UserPersonType”:“$plan.UserPersonType$”
}
]
}
]
}

HI Alex,

Using this same payload, you succeed to create a user using postman or just a curl?

From the error you provided it was the System that denied the requests. You can enabled Debug mode and get the payload that IDN built and compare with a valid payload that you already know that works.