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

How to use task/account variables in rest connector for createticketjson

sbiswal
New Contributor II
New Contributor II

Hello,

We're trying to pass the account name (whether from the task table or account table, both works) and account's customproperty31 in a REST connector for Servicedesk. The customproperty isn't getting populated from any request, instead it comes from a db connector we have, so we can't use reqattr. 

So far, I've used these variables: ${task.accountName}, ${task.accountkey.customproperty31} and ${account.accountID} . While ticket gets created with no errors, in the ticket, we don't see the value in these attributes, we only see ${task.accountName} with no change.

Does anyone have any input on what variables I can use here? Attaching the whole createticketjson here code if that helps.

Thank you!

7 REPLIES 7

SB
Saviynt Employee
Saviynt Employee

Can you try with ${account.customproperty31} and ${account.accountName}


Regards,
Sahil

sk
All-Star
All-Star

Ideally ${task.accountName} and ${account.customproperty31} should work.

But try this as well ${account.name} and ${account.customproperty31}

Also looking your call I see below can you please explain what is that your are trying to do here? Are you trying to concatenate? If so then 

\"additional_comments\": \"Application name: ${task.accountName} || Revocations: ${task.accountkey.customproperty31}\"

 try below

\"additional_comments\": \"Application name: \" + ${task.accountName} + \" || \" + \"Revocations: \" ${account.customproperty31}\"


Regards,
Saathvik
If this reply answered your question, please Accept As Solution and give Kudos to help others facing similar issue.

amit_krishnajit
Saviynt Employee
Saviynt Employee

You may want to try the following:

${task?.accountKey?.customproperty31}

 

Thanks,
Amit

Hey Amit,

This one gives an error on task level and doesn't let the ticket be created.

@sbiswal : Did you try the suggestion I gave?


Regards,
Saathvik
If this reply answered your question, please Accept As Solution and give Kudos to help others facing similar issue.

sbiswal
New Contributor II
New Contributor II

Hey Saathvik,

I tried the suggestions, however all gave error. finally got it to work with ${task?.accountKey.customproperty31}.

And even that variable fails when there are special characters like ",{,},:, but it works with simple texts.

Thanks

Could you share your JSON?

 

Thanks,
Amit