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

Account Variables - CreateTicket JSON

afauquem
New Contributor III
New Contributor III

Hi,

I need to use some user account attributes in the CreateTicketJSON.

In the documentation, I seen that AccountsObj are available but I don’t find the syntax to use.

I tried : ${account.customproperty1}, ${task?.accountKey?.customproperty1} but it doesn’t work. Any idea please ?

Thanks

7 REPLIES 7

rushikeshvartak
All-Star
All-Star

Account yet not created hence object won't be available


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

Hi @rushikeshvartak ,

Let me explain the context. I use dynamics attributes when creating and modifying accounts, which I pass into the CreateTicketJSON.
But for the "enable account" / « Disable Account » Tasks, these dynamics attributes are empty because there is no access request, but the account already exists. So I want to set a condition to retrieve the attribute stored in the account's customproperty when the task type is "enable account » / « disable account ».

The only part that's blocking me is the retrieval of the account's attributes in the createTicket JSON, the account does exist (I'm disabling/enabling it).

Any Idea to retrieve these account attributes ?

I already tried ${account.customproperty1} / ${task?.accountKey?.customproperty1} but it doesn’t work.

Thanks 

Hi @afauquem  during the createTicket scenario, what is the account status in your system? Ideally the account status should be "Active" to access the account object. Please share the logs for the scenario. 

 

Regards,
Naveen Sakleshpur
If this reply answered your question, please click the Accept As Solution button to help future users who may have a similar problem.

CR
Regular Contributor III
Regular Contributor III

you can try like belwo

\"P_M_EMAIL_ADDRESS\":\"${account?.customproperty9}\"


Thanks,
Raghu
If this reply answered your question, Please Accept As Solution and hit Kudos.

afauquem
New Contributor III
New Contributor III

Hi, 

@CR I've tried and It doesn't work

@naveenss I share the logs but I see nothing special. I try both situations. Disable the account and Enable it. Even if it is active and I disable it, I didn't retrieve the account attributes.

Thanks

Hi @afauquem  upon checking the logs, the account object is null in the binding objects. 

"2024-03-12T07:19:19.576+00:00","ecm-worker","rest.RestProvisioningService","quartzScheduler_Worker-4-42css","DEBUG","combinedAccountRequestbinding: [ServiceAccountOwnerMap:[:], endpointsObj:XXX XXX, entitlementValuesObj:null, mockapi:testafa2, approvers:[Afauquembert], allEntitlementsValues:, usersManagerObj:Afauquembert, usermanager:Afauquembert, endpoint:XXX XXX, password:******, benefeciary:testafa2, requestedByDate:2024-03-12T07:19:19+00:00, REQUESTORIGIN:ECMV6, ACCOUNTKEY:500461, reqAttrs:[:], arstasksObj:com.saviynt.ecm.task.ArsTasks : 1473, accountsObj:[:], taskObjList:[com.saviynt.ecm.task.ArsTasks : 1473], usersObj:testafa2, userManager:Afauquembert, taskIds:[1473], requestor:Afauquembert, managerAccount:null, Saviynt For Saviynt:testafa2, userAttributesMap:[:], task:com.saviynt.ecm.task.ArsTasks : 1473, requestid:1774677, userAccount:[:], name:null :: testafa2@XXX.com.uat, ENDPOINT:27, Test - endpoint - mockApi:testafa, businessJustification:, requestAccessAttributes:[:], user:testafa2, account:null :: testafa2@XXX.com.uat]"

That is the reason, you are unable to use ${account?.customproperty9}. 

In the meantime, can you try below?

\"givenName\":\"${com.saviynt.ecm.identitywarehouse.domain.Accounts.get(ACCOUNTKEY)?.customproperty9}\"

Let me know if this helps!

 

Regards,
Naveen Sakleshpur
If this reply answered your question, please click the Accept As Solution button to help future users who may have a similar problem.

CR
Regular Contributor III
Regular Contributor III

try

${requestAccessAttributes.get("customproperty1")}

or

${if((reqAttrs?.customproperty20)=='Admin Right - MAC'){endpoint.customproperty1 +' ' + user.firstname +' ' + user.lastname} else {endpoint.customproperty6+' ' +user.firstname+' ' +user.lastname}}


Thanks,
Raghu
If this reply answered your question, Please Accept As Solution and hit Kudos.