Announcing the Saviynt Knowledge Exchange unifying the Saviynt forums, documentation, training,
and more in a single search tool across platforms. Read the announcement here.

Invalid Record not Processed Error: ServiceNow Rest Account Import

GOE
Regular Contributor
Regular Contributor

Hello,

I'm getting this error message "Invalid Record not Processed" while importing accounts from ServiceNow via a rest connector. I do see the records in the logs but they're not getting imported.

I have set the accountid as the keyfield and the accountID is mapped to sys_id. I've also set the pagination to both this;

"pagination": {
    "nextUrl": {
      "nextUrlPath": "${response.completeResponseMap.next_page==null?'':response.completeResponseMap.next_page}"
    }
  }

and this;

"pagination": {
"nextUrl": {
"nextUrlPath": "${headers?.Link?.split(',').size()==4?headers.Link.split(',')[2].replace('<', '').replace('>;rel="next"','').trim():(headers?.Link?.split(',')?.size()==3 && headers?.Link.contains('next'))?headers.Link.split(',')[1].replace('<', '').replace('>;rel="next"','').trim():null}"
}
}
}

and neither worked.

As a note, I have tested an api url for just one user and it worked.

Any idea why this is this happening?

1 REPLY 1

rushikeshvartak
All-Star
All-Star

Try below json

Spoiler
{
"accountParams": {
"connection": "userAuth",
"processingType": "SequentialAndIterative",
"call": {
"call1": {
"callOrder": 0,
"stageNumber": 0,
"http": {
"url": "https://devrushi.service-now.com/api/now/table/sys_user?sysparm_query=sysparm_limit=1000",
"httpHeaders": {
"Authorization": "${access_token}"
},
"httpContentType": "application/x-www-form-urlencoded",
"httpMethod": "GET"
},
"lockedStatusConfig": {
"active": "2",
"inactive": "1"
},"statusConfig": {
"active": "true",
"inactive": "false"
},
"listField": "result",
"keyField": "accountID",
"colsToPropsMap": {
"name": "user_name~#~char",
"status": "active~#~char",
"accountID": "sys_id~#~char",
return isActive}~#~char"
},
"pagination": {
"nextUrl": {
"nextUrlPath": "${headers?.Link?.split(',')?.size()==4?headers?.Link?.split(',')[2]?.replace('<', '')?.replace('>;rel=\"next\"','')?.trim():headers?.Link?.split(',')?.size()==3&&headers?.Link?.split(',')[1]?.contains('next')?headers?.Link?.split(',')[1]?.replace('<', '')?.replace('>;rel=\"next\"','')?.trim():null}"
}
}
}
}
},
"entitlementParams": {
"processingType": "SequentialAndIterative",
"entTypes": {
"Group": {
"entTypeOrder": 0,
"entTypeLabels": {},
"call": {
"call1": {
"connection": "userAuth",
"callOrder": 0,
"stageNumber": 0,
"http": {
"httpHeaders": {
"Authorization": "${access_token}"
},
"url": "https://devrushi.service-now.com/api/now/table/sys_user_group?sysparm_display_value=true&sysparm_fie...",
"httpContentType": "application/json",
"httpMethod": "GET"
},
"listField": "result",
"keyField": "entitlementID",
"disableDeletedEntitlements": true,
"colsToPropsMap": {
"entitlementID": "sys_id~#~char",
"status": "active~#~char",
"customproperty2": "sys_id~#~char",
"description": "description~#~char",
"entitlement_value": "name~#~char"
},
"nextUrl": {
"nextUrlPath": "${headers?.Link?.split(',')?.size()==4?headers?.Link?.split(',')[2]?.replace('<', '')?.replace('>;rel=\"next\"','')?.trim():headers?.Link?.split(',')?.size()==3&&headers?.Link?.split(',')[1]?.contains('next')?headers?.Link?.split(',')[1]?.replace('<', '')?.replace('>;rel=\"next\"','')?.trim():null}"
}
}
},
"entMappings": {
"Group": {
"listPath": "parent",
"idPath": "value",
"idColumn": "entitlementID",
"mappingTypes": [
"ENTMAP"
]
}
}
}
}
},
"acctEntParams": {
"entTypes": {
"Group": {
"call": {
"call1": {
"processingType": "http",
"connection": "userAuth",
"http": {
"url": "https://devrushi.service-now.com/api/now/table/sys_user_grmember?sysparm_fields=sysid%2Cgroup%2Cuser",
"httpContentType": "application/json",
"httpMethod": "GET",
"httpHeaders": {
"Authorization": "${access_token}"
}
},
"listField": "result",
"acctKeyField": "accountID",
"entKeyField": "entitlementID",
"acctIdPath": "user.value",
"entIdPath": "group.value",
"pagination": {
"nextUrl": {
"nextUrlPath": "${headers?.Link?.split(',')?.size()==4?headers?.Link?.split(',')[2]?.replace('<', '')?.replace('>;rel=\"next\"','')?.trim():headers?.Link?.split(',')?.size()==3&&headers?.Link?.split(',')[1]?.contains('next')?headers?.Link?.split(',')[1]?.replace('<', '')?.replace('>;rel=\"next\"','')?.trim():null}"
}
}
}
}
}
}
}
}

Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.