Rest Connection - Disable account

prachi
Regular Contributor
Regular Contributor

Hi,

I am working with rest connection and i want to pass the below attributes in my disable account JSON:  {\"loginId\":\"account.name\",\"email\":\"account.customproperty1\",\"lastName\":\"account.customproperty2\",\"timeZoneId\":\"account.customproperty3\",\"isActive\":false}.

My complete JSON looks like :

{
"call": [
{
"name": "call1",
"connection": "userAuth",
"url": "https://****************/${account.accountID}",
"httpMethod": "PUT",
"httpParams": "{\"loginId\":\"account.name\",\"email\":\"account.customproperty1\",\"lastName\":\"account.customproperty2\",\"timeZoneId\":\"account.customproperty3\",\"isActive\":false}",
"httpHeaders": {
"Authorization": "${access_token}"
},
"httpContentType": "application/json",
"successResponses": {
"statusCode": [
200
]
},
"unsuccessResponses": {
"statusCode": [
400,
401,
403,
404,
429,
500,
503
]
}
}
]
}

 

When I hardcode the value for each attribute it is working but not when using dynamic values for account's properties.

Could you pls help with what would be the right syntax or what could be the issue here?

Thanks,

Prachi

 

9 REPLIES 9

rushikeshvartak
All-Star
All-Star

Try task.accountkey.name

Thanks Rushikesh

I tried using the above parameter but still getting error :

prachi_0-1674365824427.png

Regards,

Prachi

task.accountKey.customproperty1

Thanks Rushikesh but still getting the same error:

 

prachi_0-1674403046506.png

Regards,

Prachi

Then account customproperties are not exposed.

if custom property value same as users email then use users email 

 

hi @rushikeshvartak, is this still not exposed or has anything changed since your last response?

 

prachi
Regular Contributor
Regular Contributor

I was able to acheive this using - 

"httpParams": "{\"loginId\":\"${user.username}\",\"email\":\"${account.customproperty1}\",\"lastName\":\"${account.customproperty2}\",\"timeZoneId\":${account.customproperty3},\"isActive\":false}",

Sunil
Community Manager
Community Manager

Hi @prachi , 

Thanks for updating the forum post with a solution. Can you please mark the relevant post/comment as a solution via ‘Accept As Solution’ to help other community users who may have a similar problem?

SowmithriV
New Contributor II
New Contributor II

Thank you for the response. I was able to use it too.