06/19/2023 11:41 PM
Hi Team,
could you please help/advise me, on what I am doing wrong here? I am able to extract the user account along with roles and groups however, the Roles and groups are not mapped with the account.
Here is AccountImport JSON
{
"accountParams": {
"connection": "acctAuth",
"processingType": "SequentialAndIterative",
"statusAndThresholdConfig": {
"accountThresholdValue": 300,
"inactivateAccountsNotInFile": false,
"correlateInactiveAccounts": true,
"statusColumn": "customproperty42",
"activeStatus": [
"true"
]
},
"call": {
"call1": {
"callOrder": 0,
"stageNumber": 0,
"http": {
"url": "https://<Endpoint_URL>/api/v2/requesters?include_agents=true&per_page=100",
"httpParams": {},
"httpContentType": "application/json",
"httpMethod": "GET",
"httpHeaders": {
"Authorization": "${access_token}",
"Accept": "application/json",
"Content-Type": "application/json"
}
},
"listField": "requesters",
"keyField": "accountID",
"colsToPropsMap": {
"accountID": "id~#~char",
"name": "primary_email~#~char",
"customproperty42": "active~#~char",
"customproperty1": "address~#~char",
"customproperty2": "created_at~#~char",
"customproperty3": "custom_fields.employeenumber~#~char",
"customproperty4": "custom_fields.department_number~#~char",
"customproperty5": "custom_fields.company~#~char",
"customproperty6": "custom_fields.employee_type~#~char",
"customproperty7": "department_ids~#~char",
"customproperty8": "department_names~#~char",
"customproperty9": "first_name~#~char",
"customproperty10": "last_name~#~char",
"customproperty11": "has_logged_in~#~char",
"customproperty12": "id~#~char",
"customproperty13": "is_agent~#~char",
"customproperty15": "job_title~#~char",
"customproperty16": "language~#~char",
"customproperty17": "reporting_manager_id~#~char",
"customproperty18": "primary_email~#~char",
"customproperty19": "secondary_emails~#~char",
"customproperty21": "updated_at~#~char",
"customproperty22": "time_zone~#~char",
"customproperty31": "STORE#ACC#ENT#MAPPINGINFO~#~char"
},
"pagination": {
"nextUrl": {
"nextUrlPath": "${headers?.Link?.size()>0?headers.Link.replace('<', '').replace('>; rel=\"next\"','').trim():null}"
}
}
}
}
},
"entitlementParams": {
"connection": "acctAuth",
"processingType": "SequentialAndIterative",
"entTypes": {
"Roles": {
"entTypeOrder": 0,
"call": {
"call1": {
"callOrder": 0,
"stageNumber": 0,
"http": {
"url": "https://<Endpoint_URL>/api/v2/roles",
"httpHeaders": {
"Authorization": "${access_token}",
"Accept": "application/json",
"Content-Type": "application/json"
},
"httpParams": {},
"httpContentType": "application/json",
"httpMethod": "GET"
},
"listField": "roles",
"keyField": "entitlementID",
"colsToPropsMap": {
"entitlementID": "id~#~char",
"entitlement_value": "name~#~char",
"customproperty1": "created_at~#~char",
"customproperty2": "updated_at~#~char",
"customproperty3": "description~#~char",
"customproperty4": "default~#~char"
},
"makeProcessingStatus": false,
"disableDeletedEntitlements": "true",
"pagination": {
"nextUrl": {
"nextUrlPath": "${headers?.Link?.size()>0?headers.Link.replace('<', '').replace('>; rel=\"next\"','').trim():null}"
}
}
}
}
},
"Groups": {
"entTypeOrder": 1,
"call": {
"call1": {
"callOrder": 0,
"stageNumber": 0,
"http": {
"url": "https://<Endpoint_URL>/api/v2/groups",
"httpHeaders": {
"Authorization": "${access_token}",
"Accept": "application/json",
"Content-Type": "application/json"
},
"httpParams": {},
"httpContentType": "application/json",
"httpMethod": "GET"
},
"listField": "groups",
"keyField": "entitlementID",
"colsToPropsMap": {
"entitlementID": "id~#~char",
"entitlement_value": "name~#~char",
"customproperty1": "created_at~#~char",
"customproperty2": "updated_at~#~char",
"customproperty3": "description~#~char",
"customproperty4": "escalate_to~#~char",
"customproperty5": "agent_ids~#~char"
},
"makeProcessingStatus": false,
"disableDeletedEntitlements": "true",
"pagination": {
"nextUrl": {
"nextUrlPath": "${headers?.Link?.size()>0?headers.Link.replace('<', '').replace('>; rel=\"next\"','').trim():null}"
}
}
}
}
}
}
},
"acctEntParams": {
"connection": "acctAuth",
"entTypes": {
"Groups": {
"call": {
"call1": {
"callOrder": 0,
"stageNumber": 0,
"processingType": "acctToEntMapping",
"http": {
"httpHeaders": {
"Authorization": "${access_token}",
"Accept": "application/json"
},
"url": "https://<Endpoint_URL>/api/v2/groups/${id}/agents",
"httpParams": {},
"httpContentType": "application/json",
"httpMethod": "GET"
},
"listField": "",
"entKeyField": "entitlementID",
"acctIdPath": "",
"acctKeyField": "accountID",
"pagination": {
"nextUrl": {
"nextUrlPath": "${headers?.Link?.size()>0?headers.Link.replace('<', '').replace('>; rel=\"next\"','').trim():null}"
}
}
}
}
}
}
}
}
Groups
Role
06/20/2023 12:56 AM
Hi @navneetv ,
Can you please try the below JSON?
{
"accountParams": {
"connection": "acctAuth",
"processingType": "SequentialAndIterative",
"statusAndThresholdConfig": {
"accountThresholdValue": 300,
"inactivateAccountsNotInFile": false,
"correlateInactiveAccounts": true,
"statusColumn": "customproperty42",
"activeStatus": [
"true"
]
},
"call": {
"call1": {
"callOrder": 0,
"stageNumber": 0,
"http": {
"url": "https://<Endpoint_URL>/api/v2/requesters?include_agents=true&per_page=100",
"httpParams": {},
"httpContentType": "application/json",
"httpMethod": "GET",
"httpHeaders": {
"Authorization": "${access_token}",
"Accept": "application/json",
"Content-Type": "application/json"
}
},
"listField": "requesters",
"keyField": "accountID",
"colsToPropsMap": {
"accountID": "id~#~char",
"name": "primary_email~#~char",
"customproperty42": "active~#~char",
"customproperty1": "address~#~char",
"customproperty2": "created_at~#~char",
"customproperty3": "custom_fields.employeenumber~#~char",
"customproperty4": "custom_fields.department_number~#~char",
"customproperty5": "custom_fields.company~#~char",
"customproperty6": "custom_fields.employee_type~#~char",
"customproperty7": "department_ids~#~char",
"customproperty8": "department_names~#~char",
"customproperty9": "first_name~#~char",
"customproperty10": "last_name~#~char",
"customproperty11": "has_logged_in~#~char",
"customproperty12": "id~#~char",
"customproperty13": "is_agent~#~char",
"customproperty15": "job_title~#~char",
"customproperty16": "language~#~char",
"customproperty17": "reporting_manager_id~#~char",
"customproperty18": "primary_email~#~char",
"customproperty19": "secondary_emails~#~char",
"customproperty21": "updated_at~#~char",
"customproperty22": "time_zone~#~char",
"customproperty31": "STORE#ACC#ENT#MAPPINGINFO~#~char"
},
"pagination": {
"nextUrl": {
"nextUrlPath": "${headers?.Link?.size()>0?headers.Link.replace('<', '').replace('>; rel=\"next\"','').trim():null}"
}
}
}
},
"acctEntMappings": {
"Groups": {
"listPath": "groups",
"idPath": "",
"keyField": "entitlementID"
},
"Roles": {
"listPath": "roles",
"idPath": "",
"keyField": "entitlementID"
}
}
},
"entitlementParams": {
"connection": "acctAuth",
"processingType": "SequentialAndIterative",
"entTypes": {
"Roles": {
"entTypeOrder": 0,
"call": {
"call1": {
"callOrder": 0,
"stageNumber": 0,
"http": {
"url": "https://<Endpoint_URL>/api/v2/roles",
"httpHeaders": {
"Authorization": "${access_token}",
"Accept": "application/json",
"Content-Type": "application/json"
},
"httpParams": {},
"httpContentType": "application/json",
"httpMethod": "GET"
},
"listField": "roles",
"keyField": "entitlementID",
"colsToPropsMap": {
"entitlementID": "id~#~char",
"entitlement_value": "name~#~char",
"customproperty1": "created_at~#~char",
"customproperty2": "updated_at~#~char",
"customproperty3": "description~#~char",
"customproperty4": "default~#~char"
},
"makeProcessingStatus": false,
"disableDeletedEntitlements": "true",
"pagination": {
"nextUrl": {
"nextUrlPath": "${headers?.Link?.size()>0?headers.Link.replace('<', '').replace('>; rel=\"next\"','').trim():null}"
}
}
}
}
},
"Groups": {
"entTypeOrder": 1,
"call": {
"call1": {
"callOrder": 0,
"stageNumber": 0,
"http": {
"url": "https://<Endpoint_URL>/api/v2/groups",
"httpHeaders": {
"Authorization": "${access_token}",
"Accept": "application/json",
"Content-Type": "application/json"
},
"httpParams": {},
"httpContentType": "application/json",
"httpMethod": "GET"
},
"listField": "groups",
"keyField": "entitlementID",
"colsToPropsMap": {
"entitlementID": "id~#~char",
"entitlement_value": "name~#~char",
"customproperty1": "created_at~#~char",
"customproperty2": "updated_at~#~char",
"customproperty3": "description~#~char",
"customproperty4": "escalate_to~#~char",
"customproperty5": "agent_ids~#~char"
},
"makeProcessingStatus": false,
"disableDeletedEntitlements": "true",
"pagination": {
"nextUrl": {
"nextUrlPath": "${headers?.Link?.size()>0?headers.Link.replace('<', '').replace('>; rel=\"next\"','').trim():null}"
}
}
}
}
}
}
},
"acctEntParams": {
"processingType": "acctToEntMapping"
}
}
If you're using the acctEntParams as acctToEntMapping, then there is no need to specify other connection, http, listField, keyField, entKeyField, acctIdPath. Please refer to the developer handbook below:
https://docs.saviyntcloud.com/bundle/REST-v23x/page/Content/Developers-Handbook.htm
06/20/2023 01:38 AM
Hi @naveenss thank you for helping us, but still group and role are not being mapped with the account. Am I missing something? i used the above JSON which you have shared also I tried changing idlist and idpath but no luck
06/20/2023 02:16 AM
Hi @navneetv , can you please confirm if you're running the account import first and then the access import?
06/20/2023 05:41 AM
Yes , i Naveen, I am following the same sequence
06/20/2023 06:02 AM
Hi @navneetv can you confirm the below?
Are you getting the response of user-groups and user-roles in a single API call for each of the entitlement types respectively? If not, as I could see from your original JSON, you are using "https://<Endpoint_URL>/api/v2/groups/${id}/agents" url to get the membership for each groups. Is that correct? I have modified the JSON accordingly to have the "processingType" as "httpEntToAcct". Also, please refer to the REST connector developer handbook for the significance of different types of "processingType"
https://docs.saviyntcloud.com/bundle/REST-v23x/page/Content/Developers-Handbook.htm
{
"accountParams": {
"connection": "acctAuth",
"processingType": "SequentialAndIterative",
"statusAndThresholdConfig": {
"accountThresholdValue": 300,
"inactivateAccountsNotInFile": false,
"correlateInactiveAccounts": true,
"statusColumn": "customproperty42",
"activeStatus": [
"true"
]
},
"call": {
"call1": {
"callOrder": 0,
"stageNumber": 0,
"http": {
"url": "https://<Endpoint_URL>/api/v2/requesters?include_agents=true&per_page=100",
"httpParams": {},
"httpContentType": "application/json",
"httpMethod": "GET",
"httpHeaders": {
"Authorization": "${access_token}",
"Accept": "application/json",
"Content-Type": "application/json"
}
},
"listField": "requesters",
"keyField": "accountID",
"colsToPropsMap": {
"accountID": "id~#~char",
"name": "primary_email~#~char",
"customproperty42": "active~#~char",
"customproperty1": "address~#~char",
"customproperty2": "created_at~#~char",
"customproperty3": "custom_fields.employeenumber~#~char",
"customproperty4": "custom_fields.department_number~#~char",
"customproperty5": "custom_fields.company~#~char",
"customproperty6": "custom_fields.employee_type~#~char",
"customproperty7": "department_ids~#~char",
"customproperty8": "department_names~#~char",
"customproperty9": "first_name~#~char",
"customproperty10": "last_name~#~char",
"customproperty11": "has_logged_in~#~char",
"customproperty12": "id~#~char",
"customproperty13": "is_agent~#~char",
"customproperty15": "job_title~#~char",
"customproperty16": "language~#~char",
"customproperty17": "reporting_manager_id~#~char",
"customproperty18": "primary_email~#~char",
"customproperty19": "secondary_emails~#~char",
"customproperty21": "updated_at~#~char",
"customproperty22": "time_zone~#~char",
"customproperty31": "STORE#ACC#ENT#MAPPINGINFO~#~char"
},
"pagination": {
"nextUrl": {
"nextUrlPath": "${headers?.Link?.size()>0?headers.Link.replace('<', '').replace('>; rel=\"next\"','').trim():null}"
}
}
}
}
},
"entitlementParams": {
"connection": "acctAuth",
"processingType": "SequentialAndIterative",
"entTypes": {
"Roles": {
"entTypeOrder": 0,
"call": {
"call1": {
"callOrder": 0,
"stageNumber": 0,
"http": {
"url": "https://<Endpoint_URL>/api/v2/roles",
"httpHeaders": {
"Authorization": "${access_token}",
"Accept": "application/json",
"Content-Type": "application/json"
},
"httpParams": {},
"httpContentType": "application/json",
"httpMethod": "GET"
},
"listField": "roles",
"keyField": "entitlementID",
"colsToPropsMap": {
"entitlementID": "id~#~char",
"entitlement_value": "name~#~char",
"customproperty1": "created_at~#~char",
"customproperty2": "updated_at~#~char",
"customproperty3": "description~#~char",
"customproperty4": "default~#~char"
},
"makeProcessingStatus": false,
"disableDeletedEntitlements": "true",
"pagination": {
"nextUrl": {
"nextUrlPath": "${headers?.Link?.size()>0?headers.Link.replace('<', '').replace('>; rel=\"next\"','').trim():null}"
}
}
}
}
},
"Groups": {
"entTypeOrder": 1,
"call": {
"call1": {
"callOrder": 0,
"stageNumber": 0,
"http": {
"url": "https://<Endpoint_URL>/api/v2/groups",
"httpHeaders": {
"Authorization": "${access_token}",
"Accept": "application/json",
"Content-Type": "application/json"
},
"httpParams": {},
"httpContentType": "application/json",
"httpMethod": "GET"
},
"listField": "groups",
"keyField": "entitlementID",
"colsToPropsMap": {
"entitlementID": "id~#~char",
"entitlement_value": "name~#~char",
"customproperty1": "created_at~#~char",
"customproperty2": "updated_at~#~char",
"customproperty3": "description~#~char",
"customproperty4": "escalate_to~#~char",
"customproperty5": "agent_ids~#~char"
},
"makeProcessingStatus": false,
"disableDeletedEntitlements": "true",
"pagination": {
"nextUrl": {
"nextUrlPath": "${headers?.Link?.size()>0?headers.Link.replace('<', '').replace('>; rel=\"next\"','').trim():null}"
}
}
}
}
}
}
},
"acctEntParams": {
"connection": "acctAuth",
"entTypes": {
"Groups": {
"call": {
"call1": {
"callOrder": 0,
"stageNumber": 0,
"processingType": "httpEntToAcct",
"http": {
"httpHeaders": {
"Authorization": "${access_token}",
"Accept": "application/json"
},
"url": "https://<Endpoint_URL>/api/v2/groups/${id}/agents",
"httpParams": {},
"httpContentType": "application/json",
"httpMethod": "GET"
},
"listField": "",
"entKeyField": "entitlementID",
"acctIdPath": "member_of",
"acctKeyField": "accountID",
"pagination": {
"nextUrl": {
"nextUrlPath": "${headers?.Link?.size()>0?headers.Link.replace('<', '').replace('>; rel=\"next\"','').trim():null}"
}
}
}
}
}
}
}
}
Also, please specify the listField in the "acctEntParams". I couldn't see the full JSON response to populate this.
06/20/2023 09:55 AM - edited 06/21/2023 12:48 AM
Hi @naveenss
"https://<Endpoint_URL>/api/v2/groups/${id}/agents" url to get the membership for each group. Is that correct? Yes with this we get group'smembership.
I went through the Rest JSON developer KB. this is what I found and I tried with this getting error
Account Import Json
{
"accountParams": {
"connection": "acctAuth",
"processingType": "SequentialAndIterative",
"statusAndThresholdConfig": {
"accountThresholdValue": 300,
"inactivateAccountsNotInFile": false,
"correlateInactiveAccounts": true,
"statusColumn": "customproperty42",
"activeStatus": [
"true"
]
},
"call": {
"call1": {
"callOrder": 0,
"stageNumber": 0,
"http": {
"url": "https://<Endpoint_URL>/api/v2/requesters?include_agents=true&per_page=100",
"httpParams": {},
"httpContentType": "application/json",
"httpMethod": "GET",
"httpHeaders": {
"Authorization": "${access_token}",
"Accept": "application/json",
"Content-Type": "application/json"
}
},
"listField": "requesters",
"keyField": "accountID",
"colsToPropsMap": {
"accountID": "id~#~char",
"name": "primary_email~#~char",
"customproperty42": "active~#~char"
},
"pagination": {
"nextUrl": {
"nextUrlPath": "${headers?.Link?.size()>0?headers.Link.replace('<', '').replace('>; rel=\"next\"','').trim():null}"
}
}
},
"call2": {
"callOrder": 1,
"stageNumber": 3,
"http": {
"url": "https://<Endpoint_URL>/api/v2/agents/${accountName}",
"httpParams": {},
"httpContentType": "application/json",
"httpMethod": "GET",
"httpHeaders": {
"Authorization": "${access_token}",
"Accept": "application/json",
"Content-Type": "application/json"
}
},
"listField": "agents",
"keyField": "accountID",
"colsToPropsMap": {
"accountID": "id~#~char",
"name": "primary_email~#~char",
"customproperty42": "active~#~char",
"customproperty1": "address~#~char",
"customproperty2": "created_at~#~char",
"customproperty3": "custom_fields.employeenumber~#~char",
"customproperty4": "custom_fields.department_number~#~char",
"customproperty5": "custom_fields.company~#~char",
"customproperty6": "custom_fields.employee_type~#~char",
"customproperty7": "department_ids~#~char",
"customproperty8": "department_names~#~char",
"customproperty9": "first_name~#~char",
"customproperty10": "last_name~#~char",
"customproperty11": "has_logged_in~#~char",
"customproperty12": "id~#~char",
"customproperty13": "is_agent~#~char",
"customproperty15": "job_title~#~char",
"customproperty16": "language~#~char",
"customproperty17": "reporting_manager_id~#~char",
"customproperty18": "primary_email~#~char",
"customproperty19": "secondary_emails~#~char",
"customproperty21": "updated_at~#~char",
"customproperty22": "time_zone~#~char",
"customproperty23": "group_ids~#~char",
"customproperty24": "role_ids~#~char",
"customproperty31": "STORE#ACC#ENT#MAPPINGINFO~#~char"
}
}
},
"acctEntMappings": {
"Groups": {
"listPath": "group_ids",
"idPath": "",
"keyField": "entitlementID"
},
"Roles": {
"listPath": "role_ids",
"idPath": "",
"keyField": "entitlementID"
}
}
},
"entitlementParams": {
"connection": "acctAuth",
"processingType": "SequentialAndIterative",
"entTypes": {
"Roles": {
"entTypeOrder": 0,
"call": {
"call1": {
"callOrder": 0,
"stageNumber": 0,
"http": {
"url": "https://<Endpoint_URL>/api/v2/roles",
"httpHeaders": {
"Authorization": "${access_token}",
"Accept": "application/json",
"Content-Type": "application/json"
},
"httpParams": {},
"httpContentType": "application/json",
"httpMethod": "GET"
},
"listField": "roles",
"keyField": "entitlementID",
"colsToPropsMap": {
"entitlementID": "id~#~char",
"entitlement_value": "name~#~char",
"customproperty1": "created_at~#~char",
"customproperty2": "updated_at~#~char",
"customproperty3": "description~#~char",
"customproperty4": "default~#~char"
},
"makeProcessingStatus": false,
"disableDeletedEntitlements": "true",
"pagination": {
"nextUrl": {
"nextUrlPath": "${headers?.Link?.size()>0?headers.Link.replace('<', '').replace('>; rel=\"next\"','').trim():null}"
}
}
}
}
},
"Groups": {
"entTypeOrder": 1,
"call": {
"call1": {
"callOrder": 0,
"stageNumber": 0,
"http": {
"url": "https://<Endpoint_URL>/api/v2/groups",
"httpHeaders": {
"Authorization": "${access_token}",
"Accept": "application/json",
"Content-Type": "application/json"
},
"httpParams": {},
"httpContentType": "application/json",
"httpMethod": "GET"
},
"listField": "groups",
"keyField": "entitlementID",
"colsToPropsMap": {
"entitlementID": "id~#~char",
"entitlement_value": "name~#~char",
"customproperty1": "created_at~#~char",
"customproperty2": "updated_at~#~char",
"customproperty3": "description~#~char",
"customproperty4": "escalate_to~#~char",
"customproperty5": "agent_ids~#~char"
},
"makeProcessingStatus": false,
"disableDeletedEntitlements": "true",
"pagination": {
"nextUrl": {
"nextUrlPath": "${headers?.Link?.size()>0?headers.Link.replace('<', '').replace('>; rel=\"next\"','').trim():null}"
}
}
}
}
}
}
},
"acctEntParams": {
"processingType": "acctToEntMapping"
}
}
06/20/2023 10:06 PM
Hi @navneetv ,
The JSON looks to be fine. could you please share the logs with the error you're seeing? Also, can you please share the sample value from account's CUSTOMPROPERTY31 of one of the accounts?
06/21/2023 12:47 AM
Hi, @naveenss might be an issue can be with CP31. can we store two values in CP31 means one role and other groups
we have two API call, one for the requester's account detail which doesn't have a role and group, and 2nd API call for agent' account, which has a role and group
Requester API Response body
https://<endpoint_url>/api/v2/requesters?per_page=100
"requesters": [
{
"active": false,
"address": "Remote ",
"background_information": null,
"can_see_all_changes_from_associated_departments": false,
"can_see_all_tickets_from_associated_departments": false,
"created_at": "2023-04-20T01:00:33Z",
"custom_fields": {
"employeenumber": "",
"department_number": ,
"company": ".",
"it_support_level": null,
"desk_location": null,
"requester_group": null,
"start_date": null,
"employee_type": "Employee",
"department_custom": null
},
"department_ids": [],
"department_names": null,
"external_id": null,
"first_name": rohan",
"has_logged_in": false,
"id": 1500090771545645,
"is_agent": false,
"job_title": "engineer",
"language": "en",
"last_name": "Boggs",
"location_id": 15000340718,
"location_name": "WA",
"mobile_phone_number": null,
"primary_email": "<email>,
"reporting_manager_id": 150009039005676765645,
"secondary_emails": [],
"time_format": "24h",
"time_zone": "Pacific Time (US & Canada)",
"updated_at": "2023-06-16T11:18:02Z",
"vip_user": false,
"work_phone_number": ""
},
Agent response Body
https://<endpoint_url>/api/v2/agents?per_page=100
{
"agents": [
{
"active": true,
"address": "Remote",
"auto_assign_status_changed_at": null,
"auto_assign_tickets": true,
"background_information": null,
"can_see_all_tickets_from_associated_departments": false,
"created_at": "2023-04-20T01:00:35Z",
"custom_fields": {
"employeenumber": "",
"department_number": ,
"company": "",
"it_support_level": null,
"desk_location": null,
"requester_group": null,
"start_date": null,
"employee_type": "Employee",
"department_custom": null
},
"department_ids": [
],
"department_names": [
"
],
"email": "<email>,
"external_id": null,
"first_name": "John",
"has_logged_in": true,
"id": 1500242387723,
"job_title": "Manager",
"language": "en",
"last_active_at": null,
"last_login_at": null,
"last_name": "david",
"location_id": ,
"location_name": "Remote",
"mobile_phone_number": null,
"occasional": false,
"reporting_manager_id": ,
"role_ids": [
15000237509,
15000237510
],
"roles": [
{
"role_id": 15000237509,
"assignment_scope": "entire_helpdesk",
"groups": []
},
{
"role_id": 15000237510,
"assignment_scope": "member_groups",
"groups": []
}
],
"scopes": {
"ticket": null,
"problem": null,
"asset": null,
"solution": null
},
"scoreboard_level_id": null,
"scoreboard_points": null,
"signature": "<p><br></p>\n",
"time_format": "24h",
"time_zone": "Pacific Time (US & Canada)",
"updated_at": "2023-04-20T01:00:35Z",
"vip_user": false,
"work_phone_number": "",
"group_ids": [
15000746214
],
"member_of": [
15000746214
],
"observer_of": [],
"member_of_pending_approval": [],
"observer_of_pending_approval": []
},
06/21/2023 08:37 AM
Hi Everyone,
can you please advise or help here? above is the end system's response payload. not sure how to map the role and group with agent's account as the requester account doesn't have any role and group.
06/27/2023 10:50 PM
Hello Everyone,
could you please advise? I didn't understand what I am doing wrong and what change is required to IMportJSON.
Here is endsystem API response Payload
Requester API Response body
https://<endpoint_url>/api/v2/requesters?per_page=100
"requesters": [
{
"active": false,
"address": "Remote ",
"background_information": null,
"can_see_all_changes_from_associated_departments": false,
"can_see_all_tickets_from_associated_departments": false,
"created_at": "2023-04-20T01:00:33Z",
"custom_fields": {
"employeenumber": "",
"department_number": ,
"company": ".",
"it_support_level": null,
"desk_location": null,
"requester_group": null,
"start_date": null,
"employee_type": "Employee",
"department_custom": null
},
"department_ids": [],
"department_names": null,
"external_id": null,
"first_name": rohan",
"has_logged_in": false,
"id": 1500090771545645,
"is_agent": false,
"job_title": "engineer",
"language": "en",
"last_name": "Boggs",
"location_id": 15000340718,
"location_name": "WA",
"mobile_phone_number": null,
"primary_email": "<email>,
"reporting_manager_id": 150009039005676765645,
"secondary_emails": [],
"time_format": "24h",
"time_zone": "Pacific Time (US & Canada)",
"updated_at": "2023-06-16T11:18:02Z",
"vip_user": false,
"work_phone_number": ""
},
Agent response Body
https://<endpoint_url>/api/v2/agents?per_page=100
{
"agents": [
{
"active": true,
"address": "Remote",
"auto_assign_status_changed_at": null,
"auto_assign_tickets": true,
"background_information": null,
"can_see_all_tickets_from_associated_departments": false,
"created_at": "2023-04-20T01:00:35Z",
"custom_fields": {
"employeenumber": "",
"department_number": ,
"company": "",
"it_support_level": null,
"desk_location": null,
"requester_group": null,
"start_date": null,
"employee_type": "Employee",
"department_custom": null
},
"department_ids": [
],
"department_names": [
"
],
"email": "<email>,
"external_id": null,
"first_name": "John",
"has_logged_in": true,
"id": 1500242387723,
"job_title": "Manager",
"language": "en",
"last_active_at": null,
"last_login_at": null,
"last_name": "david",
"location_id": ,
"location_name": "Remote",
"mobile_phone_number": null,
"occasional": false,
"reporting_manager_id": ,
"role_ids": [
15000237509,
15000237510
],
"roles": [
{
"role_id": 15000237509,
"assignment_scope": "entire_helpdesk",
"groups": []
},
{
"role_id": 15000237510,
"assignment_scope": "member_groups",
"groups": []
}
],
"scopes": {
"ticket": null,
"problem": null,
"asset": null,
"solution": null
},
"scoreboard_level_id": null,
"scoreboard_points": null,
"signature": "<p><br></p>\n",
"time_format": "24h",
"time_zone": "Pacific Time (US & Canada)",
"updated_at": "2023-04-20T01:00:35Z",
"vip_user": false,
"work_phone_number": "",
"group_ids": [
15000746214
],
"member_of": [
15000746214
],
"observer_of": [],
"member_of_pending_approval": [],
"observer_of_pending_approval": []
},
07/06/2023 09:22 AM
Hi Saviynt Team,
can someone help or advise here? we are unable to map the role and group with the user account.
07/06/2023 10:52 AM
Can you confirm the below for me?
Does the application use 3 different urls for Users, Entitlements and User to Ent mapping or does the User or Entitlement url share the mapping information.
Please also share the response of the mapping url call highlighting the field that stores User and Entitlement value.
07/06/2023 10:46 PM
Hi @sahil
Thank you for taking a look into it. No separate URL for each.
Requester URL ( this user doesn't have role and group assignment ) -https://<endpoint_url>/api/v2/requesters?per_page=100
Agents URL( this user has role and group assignment) https://<endpoint_url>/api/v2/agents?per_page=100
Role Url : https://<Endpoint_URL>/api/v2/roles",
Group URL : https://<Endpoint_URL>/api/v2/group
Here is endsystem response payload
Requester API Response body
https://<endpoint_url>/api/v2/requesters?per_page=100
"requesters": [
{
"active": false,
"address": "Remote ",
"background_information": null,
"can_see_all_changes_from_associated_departments": false,
"can_see_all_tickets_from_associated_departments": false,
"created_at": "2023-04-20T01:00:33Z",
"custom_fields": {
"employeenumber": "",
"department_number": ,
"company": ".",
"it_support_level": null,
"desk_location": null,
"requester_group": null,
"start_date": null,
"employee_type": "Employee",
"department_custom": null
},
"department_ids": [],
"department_names": null,
"external_id": null,
"first_name": rohan",
"has_logged_in": false,
"id": 1500090771545645,
"is_agent": false,
"job_title": "engineer",
"language": "en",
"last_name": "Boggs",
"location_id": 15000340718,
"location_name": "WA",
"mobile_phone_number": null,
"primary_email": "<email>,
"reporting_manager_id": 150009039005676765645,
"secondary_emails": [],
"time_format": "24h",
"time_zone": "Pacific Time (US & Canada)",
"updated_at": "2023-06-16T11:18:02Z",
"vip_user": false,
"work_phone_number": ""
},
Agent response Body
https://<endpoint_url>/api/v2/agents?per_page=100
{
"agents": [
{
"active": true,
"address": "Remote",
"auto_assign_status_changed_at": null,
"auto_assign_tickets": true,
"background_information": null,
"can_see_all_tickets_from_associated_departments": false,
"created_at": "2023-04-20T01:00:35Z",
"custom_fields": {
"employeenumber": "",
"department_number": ,
"company": "",
"it_support_level": null,
"desk_location": null,
"requester_group": null,
"start_date": null,
"employee_type": "Employee",
"department_custom": null
},
"department_ids": [
],
"department_names": [
"
],
"email": "<email>,
"external_id": null,
"first_name": "John",
"has_logged_in": true,
"id": 1500242387723,
"job_title": "Manager",
"language": "en",
"last_active_at": null,
"last_login_at": null,
"last_name": "david",
"location_id": ,
"location_name": "Remote",
"mobile_phone_number": null,
"occasional": false,
"reporting_manager_id": ,
"role_ids": [
15000237509,
15000237510
],
"roles": [
{
"role_id": 15000237509,
"assignment_scope": "entire_helpdesk",
"groups": []
},
{
"role_id": 15000237510,
"assignment_scope": "member_groups",
"groups": []
}
],
"scopes": {
"ticket": null,
"problem": null,
"asset": null,
"solution": null
},
"scoreboard_level_id": null,
"scoreboard_points": null,
"signature": "<p><br></p>\n",
"time_format": "24h",
"time_zone": "Pacific Time (US & Canada)",
"updated_at": "2023-04-20T01:00:35Z",
"vip_user": false,
"work_phone_number": "",
"group_ids": [
15000746214
],
"member_of": [
15000746214
],
"observer_of": [],
"member_of_pending_approval": [],
"observer_of_pending_approval": []
},
the command thing is that between requester and agents, both have the same attribute value except role and group which generally map with agents' account
07/07/2023 09:53 AM
Lets take a step back and start from the beginning. Can you share the response in below format. For now I do not need the response but just the url info that you run in postman to fetch the data.
1. Accounts url
2. Entitlements Url
Enttype 1
Enttype 2
3. Account to Entitlement mapping url.
07/07/2023 10:23 AM
Hi Sahil,
Here are the details.
1. Accounts url : https://<endpoint_url>/api/v2/agents?per_page=100
2. Entitlements Url
Enttype 1
https://<Endpoint_URL>/api/v2/roles"
Enttype 2
https://<Endpoint_URL>/api/v2/groups"
3. Account to Entitlement mapping url.
https://<Endpoint_URL>/api/v2/roles/{$id}/agents
07/07/2023 11:30 AM - edited 07/07/2023 11:31 AM
Can you use the below in acctEntParams of your JSON and see if it maps the Roles to the desired accounts. For now, lets only work for the mapping of Roles and in case this works we can work towards mapping groups as well. If the below does not work, try changing the listfield value as "listField": "",
07/09/2023 02:39 AM
Hi @sahil i tried with the below format. Just minor changes, it is not role it is group but still account is not mapped with groups
https://<Endpoint_URL>/api/v2/groups/{$id}/agents",
"acctEntParams": {
"connection": "acctAuth",
"entTypes": {
"Roles": {
"call": {
"call1": {
"callOrder": 0,
"stageNumber": 0,
"processingType": "httpAcctToEnt",
"http": {
"httpHeaders": {
"Authorization": "${access_token}"
},
"url": "https://<Endpoint_URL>/api/v2/groups/{$id}/agents",
"httpMethod": "GET"
},
"listField": "[0]",
"entIdPath": "assetUsergroups.usergroups.id",
"entKeyField": "entitlementID",
"acctKeyField": "accountID"
}
}
}
}
}
Also, I got one post where the same kind of importJSON is used. we are using Freshservice and Saviynt has Freshdesk connector both have kind of similar API responses. I used the below one as well but no luck.
ImportAccountEntJSON
{
"accountParams": {
"connection": "acctAuth",
"processingType": "SequentialAndIterative",
"successResponses": {
"statusCode": [
200
]
},
"doNotChangeIfFailed": true,
"statusAndThresholdConfig": {
"accountsNotInImportAction": "Suspend",
"accountThresholdValue": 1000,
"deleteAccEntForActiveAccounts": true
},
"call": {
"call1": {
"callOrder": 0,
"stageNumber": 0,
"http": {
"url": "https://localdomain.freshdesk.com/api/v2/agents",
"httpHeaders": {
"Authorization": "${access_token}",
"Accept": "application/json"
},
"httpContentType": "application/json",
"httpMethod": "GET"
},
"listField": "",
"keyField": "accountID",
"colsToPropsMap": {
"accountID": "id~#~char",
"name": "contact.email~#~char",
"displayName": "contact.name~#~char",
"customproperty1": "contact.job_title~#~char",
"customproperty2": "contact.language~#~char",
"customproperty3": "contact.mobile~#~char",
"customproperty4": "contact.name~#~char",
"customproperty5": "contact.phone~#~char",
"customproperty6": "contact.time_zone~#~char",
"customproperty7": "contact.created_at~#~char",
"customproperty8": "contact.updated_at~#~char",
"customproperty9": "contact.active~#~char",
"customproperty13": "groups[0].name~#~char",
"customproperty31": "STORE#ACC#ENT#MAPPINGINFO~#~char"
}
}
}
},
"entitlementParams": {
"connection": "acctAuth",
"processingType": "SequentialAndIterative",
"entTypes": {
"groups": {
"entTypeOrder": 0,
"call": {
"call1": {
"callOrder": 0,
"stageNumber": 0,
"http": {
"url": "https://localdomain.freshdesk.com/api/v2/admin/groups",
"httpHeaders": {
"Authorization": "${access_token}",
"Accept": "application/json"
},
"httpContentType": "application/json",
"httpMethod": "GET"
},
"listField": "",
"keyField": "entitlementID",
"colsToPropsMap": {
"entitlementID": "id~#~char",
"entitlement_value": "name~#~char",
"description": "description~#~char",
"customproperty1": "description~#~char",
"customproperty2": "created_at~#~char",
"customproperty3": "updated_at~#~char",
"customproperty4": "group_type~#~char"
},
"disableDeletedEntitlements": true
}
}
},
"Role": {
"entTypeOrder": 1,
"call": {
"call1": {
"callOrder": 0,
"stageNumber": 0,
"http": {
"url": "https://localdomain.freshdesk.com/api/v2/roles",
"httpHeaders": {
"Authorization": "${access_token}",
"Accept": "application/json"
},
"httpContentType": "application/json",
"httpMethod": "GET"
},
"listField": "",
"keyField": "entitlementID",
"colsToPropsMap": {
"entitlementID": "id~#~char",
"entitlement_value": "name~#~char",
"customproperty1": "description~#~char",
"customproperty2": "created_at~#~char",
"customproperty3": "updated_at~#~char",
"customproperty4": "agent_type~#~char"
},
"disableDeletedEntitlements": true
}
}
}
}
},
"acctEntParams": {
"connection": "acctAuth",
"entTypes": {
"groups": {
"call": {
"call1": {
"callOrder": 0,
"stageNumber": 0,
"processingType": "httpEntToAcct",
"http": {
"httpHeaders": {
"Authorization": "${access_token}"
},
"url": "https://localdomain.freshdesk.com/api/v2/admin/groups/${id}/agents",
"httpContentType": "application/json",
"httpMethod": "GET"
},
"listField": "",
"entKeyField": "entitlementID",
"acctIdPath": "id",
"acctKeyField": "accountID"
}
}
}
}
}
}
07/19/2023 11:36 AM
Can you share the complete job log fil with the JSON format I shared with you. (also attach the JSON you used for it).
Also, can you check for the CP31 value of any account which should have the entitlements mapped and confirm if any value is populated there.
08/16/2023 10:25 AM
Hi Navvneet,
We are about to start integration with Freshservice. Are you able to get this fixed. If yes, could you share the working jsons?
Thanks,
Sai