@Arshad this is my context url and version is require for the API i’m calling. The base url that i’m using to establish a connection is https://test.com/. Again this is a dummy url. I’m able to fetch the workers and relevant data. I created a create account operation, the idea is to create the account based on BusinessUnitName which is set as an entitlement and marked as requestable. Also, I created the provisioning policy for the create account for the web service connector. This is the error that i’m getting when attempting to create an account: Attach is my Schema. I’ve been stuck here for a couple of weeks really looking for some guidance.
“Provisioning
Exception occurred while performing ‘Modify’ operation on identity ‘[email protected]’: Error: No configuration found for’Update Account’. Please add at least one operation and try again.,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”
Schema:
[
{
“nativeObjectType”: “user”,
“identityAttribute”: “EmailAddress”,
“displayAttribute”: “EmailAddress”,
“hierarchyAttribute”: null,
“includePermissions”: false,
“features”: ,
“configuration”: {},
“attributes”: [
{
“name”: “PersonId”,
“type”: “STRING”,
“schema”: null,
“description”: “PersonId”,
“isMulti”: false,
“isEntitlement”: false,
“isGroup”: false
},
{
“name”: “PersonNumber”,
“type”: “STRING”,
“schema”: null,
“description”: “PersonNumber”,
“isMulti”: false,
“isEntitlement”: false,
“isGroup”: false
},
{
“name”: “EmailAddressId”,
“type”: “STRING”,
“schema”: null,
“description”: “EmailAddressId”,
“isMulti”: false,
“isEntitlement”: false,
“isGroup”: false
},
{
“name”: “EmailAddress”,
“type”: “STRING”,
“schema”: null,
“description”: “EmailAddress”,
“isMulti”: false,
“isEntitlement”: false,
“isGroup”: false
},
{
“name”: “PeriodOfServiceId”,
“type”: “STRING”,
“schema”: null,
“description”: “PeriodOfServiceId”,
“isMulti”: false,
“isEntitlement”: false,
“isGroup”: false
},
{
“name”: “UserPersonType”,
“type”: “STRING”,
“schema”: null,
“description”: “UserPersonType”,
“isMulti”: false,
“isEntitlement”: false,
“isGroup”: false
},
{
“name”: “BusinessUnitName”,
“type”: “STRING”,
“schema”: {
“type”: “CONNECTOR_SCHEMA”,
“id”: “dummy”,
“name”: “group”
},
“description”: “BusinessUnitName”,
“isMulti”: false,
“isEntitlement”: true,
“isGroup”: true
},
{
“name”: “JobCode”,
“type”: “STRING”,
“schema”: null,
“description”: “JobCode”,
“isMulti”: false,
“isEntitlement”: false,
“isGroup”: false
},
{
“name”: “DefaultExpenseAccount”,
“type”: “STRING”,
“schema”: null,
“description”: “DefaultExpenseAccount”,
“isMulti”: false,
“isEntitlement”: false,
“isGroup”: false
},
{
“name”: “LegalEmployerName”,
“type”: “STRING”,
“schema”: null,
“description”: “LegalEmployerName”,
“isMulti”: false,
“isEntitlement”: false,
“isGroup”: false
},
{
“name”: “FirstName”,
“type”: “STRING”,
“schema”: null,
“description”: “FirstName”,
“isMulti”: false,
“isEntitlement”: false,
“isGroup”: false
},
{
“name”: “LastName”,
“type”: “STRING”,
“schema”: null,
“description”: “LastName”,
“isMulti”: false,
“isEntitlement”: false,
“isGroup”: false
},
{
“name”: “DisplayName”,
“type”: “STRING”,
“schema”: null,
“description”: “DisplayName”,
“isMulti”: false,
“isEntitlement”: false,
“isGroup”: false
},
{
“name”: “LegislationCode”,
“type”: “STRING”,
“schema”: null,
“description”: “LegislationCode”,
“isMulti”: false,
“isEntitlement”: false,
“isGroup”: false
},
{
“name”: “EmailType”,
“type”: “STRING”,
“schema”: null,
“description”: “EmailType”,
“isMulti”: false,
“isEntitlement”: false,
“isGroup”: false
},
{
“name”: “ActionCode”,
“type”: “STRING”,
“schema”: null,
“description”: “ActionCode”,
“isMulti”: false,
“isEntitlement”: false,
“isGroup”: false
},
{
“name”: “WorkerType”,
“type”: “STRING”,
“schema”: null,
“description”: “WorkerType”,
“isMulti”: false,
“isEntitlement”: false,
“isGroup”: false
}
],
“id”: “dummy”,
“name”: “account”,
},
{
“nativeObjectType”: “group”,
“identityAttribute”: “”,
“displayAttribute”: “”,
“hierarchyAttribute”: null,
“includePermissions”: false,
“features”: ,
“configuration”: {},
“attributes”: ,
“id”: “dummy”,
“name”: “group”,
}
]
Provisioning Policy:
{
"name": "Account",
"description": null,
"usageType": "CREATE",
"fields": [
{
"name": "Username",
"transform": {
"type": "identityAttribute",
"attributes": {
"name": "email"
}
},
"attributes": {
"template": "$(firstname)$(lastname)$(uniqueCounter)",
"cloudRequired": "true"
},
"isRequired": false,
"type": "string",
"isMultiValued": false
},
{
"name": "FirstName",
"transform": {
"type": "identityAttribute",
"attributes": {
"name": "firstname"
}
},
"attributes": {
"cloudRequired": "true"
},
"isRequired": false,
"type": "string",
"isMultiValued": false
},
{
"name": "LastName",
"transform": {
"type": "identityAttribute",
"attributes": {
"name": "lastname"
}
},
"attributes": {
"cloudRequired": "true"
},
"isRequired": false,
"type": "string",
"isMultiValued": false
},
{
"name": "LegislationCode",
"transform": {
"type": "static",
"attributes": {
"value": "Dummy"
}
},
"attributes": {
"cloudRequired": "true"
},
"isRequired": false,
"type": "string",
"isMultiValued": false
},
{
"name": "EmailType",
"transform": {
"type": "static",
"attributes": {
"value": "Dummy"
}
},
"attributes": {
"cloudRequired": "true"
},
"isRequired": false,
"type": "string",
"isMultiValued": false
},
{
"name": "EmailAddress",
"transform": {
"type": "identityAttribute",
"attributes": {
"name": "email"
}
},
"attributes": {
"cloudRequired": "true"
},
"isRequired": false,
"type": "string",
"isMultiValued": false
},
{
"name": "LegalEmployerName",
"transform": {
"type": "static",
"attributes": {
"value": "Dummy"
}
},
"attributes": {
"cloudRequired": "true"
},
"isRequired": false,
"type": "string",
"isMultiValued": false
},
{
"name": "WorkerType",
"transform": {
"type": "static",
"attributes": {
"value": "Dummy"
}
},
"attributes": {
"cloudRequired": "true"
},
"isRequired": false,
"type": "string",
"isMultiValued": false
},
{
"name": "ActionCode",
"transform": {
"type": "static",
"attributes": {
"value": "Dummy"
}
},
"attributes": {
"cloudRequired": "true"
},
"isRequired": false,
"type": "string",
"isMultiValued": false
},
{
"name": "BusinessUnitName",
"transform": {
"type": "static",
"attributes": {
"value": "dummy"
}
},
"attributes": {
"cloudRequired": "true"
},
"isRequired": false,
"type": "string",
"isMultiValued": false
},
{
"name": "UserPersonType",
"transform": {
"type": "identityAttribute",
"attributes": {
"name": "workerType"
}
},
"attributes": {
"cloudRequired": "true"
},
"isRequired": false,
"type": "string",
"isMultiValued": false
}
]
}
Create Account Operation
CURL command:
curl --location ‘https://dummy.com/hcmRestApi/resources/11.13.18.05/workers’
–header ‘Content-Type: application/json’
–header ‘Authorization: Basic dummy==’
–request POST
–data-raw ‘{
“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: