and more in a single search tool across platforms. Read the announcement here. |
02/19/2024 06:16 AM - last edited on 02/19/2024 09:46 PM by Sunil
Im trying to import accounts and entitlement for an application using REST connector. However the response for the account import is in XML format. I tried using the below JSON for account import , job seems to be successfully but the objects arent imported. What am I missing here ? Is the list field correct as I mentioned in the JSON ?
Import Account JSON:
{
"accountParams": {
"connection": "userAuth",
"processingType": "SequentialAndIterative",
"call": {
"call1": {
"callOrder": 0,
"http": {
"url": "removed",
"httpHeaders": {
"Content-Type": "application/json",
"Accept": "text/xml"
},
"httpParams":{"retrieveBulkUserDetailsInput":{"userToken":"IAMUSR"}},
"httpContentType": "application/json",
"httpMethod": "POST"
},
"listField": "Envelope.Body.retrieveBulkUserDetailsResult.userList",
"keyField": "accountID",
"colsToPropsMap": {
"name": "userId~#~char",
"accountID": "userId~#~char",
"customproperty31": "STORE#ACC#ENT#MAPPINGINFO~#~char"
}
}
},
"acctEntMappings": {
"userRoles": {
"listPath": "SOAP-ENV:Envelope.SOAP-ENV:Body.ns0:retrieveBulkUserDetailsResult.ns0:userList.ns0:userRoles",
"idPath": "ns0:userRole.ns0:roleId",
"keyField": "entitlementID"
}
}
},
"entitlementParams":{
"connection":"userAuth",
"processingType":"SequentialAndIterative",
"entTypes":{
"userRoles":{
"entTypeOrder":0,
"call":{
"call1":{
"callOrder":0,
"stageNumber": 0,
"http":{
"url":"rempved ",
"httpHeaders":{
"Content-Type": "text/xml"
},
"httpContentType":"text/xml",
"httpMethod":"POST"
},
"listField":"SOAP-ENV:Envelope.SOAP-ENV:Body.ns0:retrieveBulkUserDetailsResult.ns0:userList.ns0:userRoles",
"keyField":"entitlementID",
"colsToPropsMap":{
"entitlementID":"ns0:userRole.ns0:roleId~#~char",
"entitlement_value":"ns0:userRole.ns0:roleDesc~#~char",
"displayname":"ns0:userRole.ns0:roleDesc~#~char"
}
}
}
}
}
},
"acctEntParams": {
"processingType": "acctToEntMapping"
}
}
Logs:
Postman Response:
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<ns0:retrieveBulkUserDetailsResult xmlns:ns0="https://****/formcentre/schema/boomi/bulkUserDetails">
<ns0:userList>
<ns0:userId>1 </ns0:userId>
<ns0:userDetails>
<ns0:firstName>System</ns0:firstName>
<ns0:lastName/>
<ns0:lastUpdatedby>1 </ns0:lastUpdatedby>
<ns0:lastUpdatedDate>23/11/2007 08:42</ns0:lastUpdatedDate>
</ns0:userDetails>
<ns0:userRoles>
<ns0:userRole>
<ns0:roleId>57</ns0:roleId>
<ns0:roleDesc>NCM-Role</ns0:roleDesc>
</ns0:userRole>
</ns0:userRoles>
</ns0:userList>
<ns0:userList>
<ns0:userId>A25390</ns0:userId>
<ns0:userDetails>
<ns0:firstName>Thomas</ns0:firstName>
<ns0:lastName>Woods</ns0:lastName>
<ns0:lastUpdatedby>IAMUSR</ns0:lastUpdatedby>
<ns0:lastUpdatedDate>11/10/2023 16:05</ns0:lastUpdatedDate>
</ns0:userDetails>
<ns0:userRoles/>
</ns0:userList>
<ns0:userList>
<ns0:userId>A29788</ns0:userId>
<ns0:userDetails>
<ns0:firstName>Vanessa</ns0:firstName>
<ns0:lastName>Williams</ns0:lastName>
<ns0:lastUpdatedby>IAMUSR</ns0:lastUpdatedby>
<ns0:lastUpdatedDate>11/10/2023 16:04</ns0:lastUpdatedDate>
</ns0:userDetails>
<ns0:userRoles>
<ns0:userRole>
<ns0:roleId>1</ns0:roleId>
<ns0:roleDesc>System Administrator</ns0:roleDesc>
</ns0:userRole>
</ns0:userRoles>
</ns0:userList>
</ns0:retrieveBulkUserDetailsResult>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
XML to JSON:
[This message has been edited by moderator to mask url]
02/19/2024 05:34 PM