PARTNERS - Please join us for our upcoming webinar:
Leveraging Intelligent Recommendations for Operational Transformation.
AMS Partners click HERE | EMEA/APJ Partners click HERE

Error in account and entitlement import || Salesforce

Vidhimehta
Regular Contributor
Regular Contributor

Hello Team,

We are seeing the below errors while we are importing the accounts and entitlements for a Salesforce connection using the OTTB connecter:

Accounts: 

InvalidBatch : Failed to process query: MALFORMED_QUERY: unexpected token: 'Id,'

Entitlements: 

InvalidBatch : Failed to process query: MALFORMED_QUERY: unexpected token: 'Assignee.id,'

Postman response for Accounts:

{
    "totalResults": 765,
    "itemsPerPage": 10,
    "schemas": [
        "urn:ietf:params:scim:api:messages:2.0:ListResponse"
    ],
    "Resources": [
        {
            "schemas": [
                "urn:ietf:params:scim:schemas:core:2.0:User",
                "urn:ietf:params:scim:schemas:extension:enterprise:2.0:User",
                "urn:salesforce:schemas:extension:00Dd0000000gUz5EAE"
            ],
            "id": "0050V0000069N29QAE",
            "userName": "****",
            "name": {
                "formatted": "",
                "familyName": "",
                "givenName": ""
            },
            "displayName": "",
            "nickName": "",
            "emails": [
                {
                    "type": "work",
                    "primary": true,
                    "value": ""
                }
            ],
            "phoneNumbers": [
                {
                    "type": "mobile",
                    "value": "+"
                }
            ],
            "photos": [
                {
                    "type": "photo",
                    "value": ""
                },
                {
                    "type": "thumbnail",
                    "value": ""
                }
            ],
            "userType": "Standard",
            "preferredLanguage": "en_US",
            "emailEncodingKey": "ISO-8859-1",
            "locale": "en_US",
            "timezone": "America/New_York",
            "active": false,
            "entitlements": [
                {
                    "value": "",
                    "$ref": "/Entitlements/***",
                    "display": "Able Marketing (Global)",
                    "type": "Profile",
                    "primary": true
                }
            ],
            "groups": [
                {
                    "value": "",
                    "$ref": "/Groups/",
                    "display": "Able Marketing"
                },
                {
                    "value": "",
                    "$ref": "/Groups/",
                    "display": "All Users"
                }
            ],
            "roles": [
                {
                    "value": "",
                    "$ref": "/Roles/",
                    "display": "2017 Sales Director & VP (Level 1)"
                }
            ],
            "urn:ietf:params:scim:schemas:extension:enterprise:2.0:User": {
                "organization": "",
                "manager": {
                    "value": "",
                    "$ref": "/Users/",
                    "displayName": ""
                }
            },
            "urn:salesforce:schemas:extension:00Dd0000000gUz5EAE": {
                "My_Customer_Service_Site__c": "Toronto",
                "MPM4_BASE__Start__c": "6",
                "Manager_Full_Name__c": "",
                "End_Time__c": "23"
            },
            "urn:salesforce:schemas:extension:2.0": {
                "alias": "bsrik"
            },
            "meta": {
                "created": "2017-09-08T13:49:57Z",
                "lastModified": "2018-04-02T19:50:28Z",
                "location": "",
                "resourceType": "User",
                "version": "ff26060e4d536e82a3b49eef703d690776527baf"
            }
        },
        {
            "schemas": [
                "urn:ietf:params:scim:schemas:core:2.0:User",
                "urn:ietf:params:scim:schemas:extension:enterprise:2.0:User",
                "urn:salesforce:schemas:extension:"

 

Postman response for Entitlements: 

{
    "totalResults": 201,
    "itemsPerPage": 200,
    "schemas": [
        "urn:ietf:params:scim:api:messages:2.0:ListResponse"
    ],
    "Resources": [
        {
            "schemas": [
                "urn:salesforce:schemas:extension:1.0:Entitlement"
            ],
            "id": "00e0V000001hikvQAA",
            "displayName": "Commercial (Level 1) Director & VP",
            "type": "Profile",
            "members": [
                {
                    "value": "0050V000006AJSeQAO",
                    "display": "Jane Harper",
                    "$ref": "https://*****/services/scim/v2/Users/0050V000006AJSeQAO"
                },
                {
                    "value": "0050V000006yg0lQAA",
                    "display": "Brad Syracuse",
                    "$ref": "https://*****/services/scim/v2/Users/0050V000006yg0lQAA"
                },
                {
                    "value": "0053o00000Au2XAAAZ",
                    "display": "Nicola Croskery",
                    "$ref": "https://*****/services/scim/v2/Users/0053o00000Au2XAAAZ"
                }
            ],
            "meta": {
                "created": "2018-04-18T01:15:04Z",
                "lastModified": "2024-06-18T05:07:07Z",
                "location": "https://****/services/scim/v2/Entitlements/00e0V000001hikvQAA",
                "resourceType": "Entitlement",
                "version": "5c40aebaae6e1bb75145c69c9c54186b9465f4fa"
            }
        },
        {
            "schemas": [
                "urn:salesforce:schemas:extension:1.0:Entitlement"
            ],
            "id": "00e0V000001hkGtQAI",
            "displayName": "Customer Community User",
            "type": "Profile",
            "members": [],
            "meta": {
                "created": "2018-07-11T05:50:21Z",
                "lastModified": "2024-06-15T06:04:37Z",
                "location": "****services/scim/v2/Entitlements/00e0V000001hkGtQAI",
                "resourceType": "Entitlement",
                "version": "147bf3f7e8012de9da4ba2f5a6d6fed7221a6710"
            }
        },
        {
 
Connection Field mapping:
{"accountfield_mapping":{
"name":"UserName~#~char",
"customproperty2":"familyName~#~char",
"customproperty1":"givenName~#~char",
"displayName":"displayName~#~char",
"customproperty3":"CompanyName~#~char",
"customproperty4":"Email~#~char",
"status":"IsActive~#~bool",
"customproperty12":"IsActive~#~bool",
"customproperty5":"UserRoleId~#~char",
"customproperty6":"ProfileId~#~char",
"accounttype":"UserType~#~char",
"customproperty7":"ManagerId~#~char",
"lastlogondate":"LastLoginDate~#~date",
"lastpasswordchange":"LastPasswordChangeDate~#~date",
"CREATED_ON":"CreatedDate~#~date",
"creator":"CreatedById~#~char",
"customproperty8":"LastModifiedDate~#~date",
"updateUser":"LastModifiedById~#~char",
"updatedate":"SystemModstamp~#~date",
"customproperty9":"ContactId~#~char",
"customproperty10":"AccountId~#~char",
"customproperty13":"FederationIdentifier~#~char",
"customproperty20":"UserPermissionsSupportUser~#~bool",
"customproperty21":"featureLicense~#~char",
"customproperty45":"Fortive_ID__C~#~char"
},
"profilefield_mapping": {
"entitlementID": "Id~#~char",
"entitlement_value": "Name~#~char",
"customproperty4": "UserLicenseId~#~char",
"customproperty1": "UserType~#~char",
"description": "Description~#~char",
"customproperty7": "CreatedDate~#~date",
"customproperty8": "CreatedById~#~char",
"customproperty2": "LastModifiedDate~#~date",
"customproperty9": "LastModifiedById~#~char",
"updatedate": "SystemModstamp~#~date"
}
}
 
Please help on this as we did not see this issue in Dev and currently we are in go-live and need to sorted on priority.
 
Regards,
Vidhi.
 
13 REPLIES 13

rushikeshvartak
All-Star
All-Star

You have issue with query "ACCOUNT_FIELD_QUERY"

rushikeshvartak_0-1722443127168.png

 


Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.

Vidhimehta
Regular Contributor
Regular Contributor

Hello @rushikeshvartak,

I updated the values as below, but still facing the same error:

id, Username, familyName, givenName, Name, CompanyName, Email, IsActive, UserRoleId, ProfileId, UserType, ManagerId, LastLoginDate, LastPasswordChangeDate, CreatedDate, CreatedById, LastModifiedDate, LastModifiedById, SystemModstamp, ContactId, AccountId, FederationIdentifier, UserPermissionsSupportUser,Fortive_ID__C

Error: InvalidBatch : Failed to process query: MALFORMED_QUERY: unexpected token: 'id,'

 

Regards,

Vidhi.

i should be capital

Id, Username, familyName, givenName, Name, CompanyName, Email, IsActive, UserRoleId, ProfileId, UserType, ManagerId, LastLoginDate, LastPasswordChangeDate, CreatedDate, CreatedById, LastModifiedDate, LastModifiedById, SystemModstamp, ContactId, AccountId, FederationIdentifier, UserPermissionsSupportUser,Fortive_ID__C

 


Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.

Vidhimehta
Regular Contributor
Regular Contributor

Hello @rushikeshvartak,

Still facing the same issue while importing. Kindly note, some entitlements have got imported but not all and it is showing the same error. Any other issue cld be there?

Regards,

Vidhi.

Share logs 


Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.

Vidhimehta
Regular Contributor
Regular Contributor

Hello @rushikeshvartak,

Attached logs. I did not find anything in the logs.

Regards,

Vidhi.

Logs are not relevant not able to find salesforce query "familyName"


Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.

Vidhimehta
Regular Contributor
Regular Contributor

I re-ran the job searched via familyname in the logs and got the attached results.

Provide line above and below of logs click on right corner arrow


Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.

Vidhimehta
Regular Contributor
Regular Contributor

Hello @rushikeshvartak ,

I am getting only this details in sequential logs as well:

https://domain.service-now.com/nav_to.do?uri=%2Fhome_splash.do%3Fsysparm_direct%3Dtrue 

 

Regards,

Vidhi.

[This message has been edited by moderator to mask sensitive information]

‼️‼️⚠️Keep company-specific private information masked on public forums, such as the name and URL.⚠️‼️‼️

share logs in file


Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.

Vidhimehta
Regular Contributor
Regular Contributor

Hello @rushikeshvartak 

Kindly find the logs in attached file.

 

Regards,

Vidhi

logs  does not have any useful information


Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.