How to modify Identity Attribute value in Standard Before Provisioning Rule?

Hi All ,
i am updating my target application account attribute through "standard before provisioning rule ". For some attribute i am passing identity attribute value, which is working fine. Now i have requirement that i need to apply substring on identity attribute value and then update the account attribute. I need to do it with in before provisioning rule by using velocity script. I tried to achieve it but its not working for me .

Same velocity script is working in provisioning policy and other transform , but have no expected result in before provisioning rule. I am not sure what the exact syntax i need to use to get my expected result .
Below is the chunk of code which is working .Its return identity start date .
{
“Action”: “UpdateAttribute”,
“Attribute”: “u_start_date”,
“Value”: “#{identity.startDate}”
}

when i am trying to manipulate this date string to get first 10 chars its not return expected result .

{
“Action”: “UpdateAttribute”,
“Attribute”: “u_start_date”,
“Value”: “#{identity.startDate}.substring(0,10)”
}

suppose date is : 2024-10-13T00:00:00
expected result : 2024-10-13
actual result is :2024-10-13T00:00:00…substring(0,10)

Kindly let me know whats the right syntax we have to get substring value.

Hi @vchauhan89,

The Standard service before provisioning configuration does not work like a transform and will not support transform operations. It can only support what is given in the attached document.

Services Standard IdentityNow BeforeProvisioning Rule - README.pdf (68.5 KB)

You will need to transform the Identity data before passing it to the rule to achieve your use case.

Hi @jesvin90
Thanks to give your attention on my query.
I already have gone through this document .As per document we can use velocity script to get identity or account attribute value . even for date we can use (getDate().toString()) script . So on behalf of all these ,i am trying to look the possibility that how i can apply the substring on any “idenitty.attribute” value. I am not sure whether its supported or not .

@edmarks
Kindly assist if you have any experience about my query.

Hi @vchauhan89,

I dont know if the substring operation will work on this or not, but have you tried these options,

“Value”: “#{identity.startDate.substring(0,10)}”

or

“Value”: “#({identity.startDate}.substring(0,10))”

Hi @vchauhan89,

If you are referring to the below ones, they are not velocity formats. It’s calling functions that are already written inside the Standard services BP rule.

#{identity.attribute},#{manager.attribute},#{account.attribute},#{now.format}

So, I don’t think adding a substring function on these would work for you. As mentioned earlier, you will probably need to create a transform that takes care of the substring part before pushing it in the event configuration.