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

Bulk change Account Name

haardik_verma
Regular Contributor
Regular Contributor

Hi,

We have a requirement where we want to change the account name of 200,000+ accounts of saalesforce.

Actually the naming rule in our system uses email ID as account name. And ACCOUNT_FILTER_QUERY was not added before, so we have many different types of accounts imported in saviynt, which have their confidential data i.e., email ID visible in saviynt.

We then later changed the ACCOUNT_FILTER_QUERY to UserType = 'Standard' , so now only standard accounts are imported.

But we would like suggestions on removing/renaming all those non-standard accounts that are already imported in saviynt.

If we are renaming, we can rename each account with same common name or if possible with a serial numbered name

So if account names are like abc@email.com, xyz@ymail.com and pqr@kmail.com

we want new names to be like bob1, bob2, bob3 etc.. or bob, bob, bob if serial numbering is not possible.

How can we achieve this?

I think one more solution is to move all these non-standard accounts to a new endpoint and make them not visible in saviynt (if this is possible?) 

Please give suggestions for the same

thanks

 

 


Thanks & Regards,
Haardik Verma
21 REPLIES 21

sk
All-Star
All-Star

Did you map usertype to accounttype? if so then you can use that attribute to make an update statement

update accounts set accountname='bob' where endpointkey=<salesforce endpointkey> and accounttype!='Standard'

If you didn't map then please share your ACCOUNT_FIELD_QUERY and FIELD_MAPPING_JSON JSON


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

haardik_verma
Regular Contributor
Regular Contributor

Hi @sk ,

Yes, usertype is mapped to accounttype in FIELD_MAPPING_JSON ("accounttype": "UserType~#~char",)

Thanks for sharing the update statement. This will be really helpful.

Also, if we also want to inactivate all those accounts on saviynt, can you please confirm if the below statement would work?

update accounts set accountname='bob',status=2 where endpointkey=<salesforce endpointkey> and accounttype!='Standard'

Is this syntax okay? and should it be 'name' or 'accountname' (because in the schema, the column name for account name is 'name'

Is there a way to serially name them? bob1, bob2, bob3? (this might come in handy for auditing purposes)

 


Thanks & Regards,
Haardik Verma

Darshanjain
Saviynt Employee
Saviynt Employee

Hi @haardik_verma ,

You can use the custom query job ( an Sql query to update the account names as you need ).

Apart from that there is no other way to update the account name as it is not allowed in the UI or via Api.

 

Thanks

Darshan

Hi @Darshanjain ,

Can you please shed some light on the process of shifting accounts to a new separate endpoint. What and how easy is the process. Can we make those accounts inaccessble/invisible after moving them to separate endpoint?


Thanks & Regards,
Haardik Verma

Hi @haardik_verma 

As anyways you are going to change the account name via sql query, you can update the endpointkey as well in that query to update for those accounts and make the status as you need inactive or suspended from import service.

Also there is no option to make it invisible from entitlements page , but suggestion would be to make it inactive and also once accounts are tagged then you can make the endpoint also to be inactive. then it will only be visible under Admin>Ident rep > Entitlements page and no where else 

Thanks

Darshan

Hi @Darshanjain ,

I am assuming that by 'Entitlements' you were meaning to say 'Accounts'.

I tried the below query in customqueryjob after creating a new endpoint (with key 43).

update accounts set name='bob',status='SUSPENDED FROM IMPORT SERVICE',endpointkey=43 where endpointkey=42 and accounttype!='Standard'

This worked perfectly! Thanks @sk and @Darshanjain 

Now after this, I disabled the newly created endpoint. 

The account was still visible in ADMIN >> Iden Repo >> Accounts page as you said it would be.

Can you please confirm, where else could the account be visible if I kept the new endpoint enabled (and also if disabled)?

Asking from an end user's point of view. (Having only the OOTB sav role ROLE_END_USER)


Thanks & Regards,
Haardik Verma

Hi @haardik_verma 

For ROLE_END_USER these accounts will not be visible as they wont have access to view other accounts at all ( Assuming these accounts are orphan if these are not then they will be able to see their own accounts if endpoint is enabled and requestable ).

So its better keep it as disabled which will achieve your requirement

 

Thanks

Darshan 

Hi @Darshanjain ,

No, not all of these accounts are orphan. Many are linked to users.

Okay, so they will be able to see their own accounts but not of others right? And this will be same even if endpoint is kept enabled.

Okay so no other way to see accounts. That's great.

Thanks.

 


Thanks & Regards,
Haardik Verma

Yes, Also as you have kept the account status as suspended from import service, even end users will.not able to see their own accounts or any other accounts of that endpoint.

 

Thanks

Darshan

 

Also @Darshanjain @sk , Am I right to assume that there is no way to mass update account names with a serial number

like bob1, bob2, bob3 etc ?


Thanks & Regards,
Haardik Verma

Yes for the existing accounts, for new accounts and if it's requested via ARS you can make use of account name rule.

 

Thanks

Darshan

So in our case of existing accounts, please suggest ways to achieve this.

Mass updation account name of 200,000+ salesforce accounts. New account name should be serially named.

Bob1, bob2 ....... bob213456...etc


Thanks & Regards,
Haardik Verma

Hi @haardik_verma 

No out of the box way as already said, you need achieve it externally and update via Custom query job only.

 

Thanks

Darshan

Hi @Darshanjain ,

How to do it externally? Can you please share the process


Thanks & Regards,
Haardik Verma

Hi @haardik_verma 

You can get all account names in xlsx and try to write some function in excel    ( check out google for some functions as per your requirements ) to update names . then you can create a sql query to udpate those.

 

 

Thanks

Darshan

.


Thanks & Regards,
Haardik Verma

Hi @Darshanjain ,

so suppose I extracted the non-standard account details 

for example

ACCOUNTKEYACCOUNTNAME
2Ramesh@email.com
49Suresh@bmail.com
987Mahesh@kmail.com

After using excel formulas, suppose I changed the names to below

ACCOUNTKEYACCOUNTNAME
2Bob1
49Bob233
987Bob7894

Now I have the excel ready with new update names of 200,000+ accounts.

What would be the next step?

" then you can create a sql query to udpate those." I did not understand what you meant by this. Can you please elaborate


Thanks & Regards,
Haardik Verma

Yes, sql query like

 

update accounts set accountname = 'Bob1' where accountkey = 2;  

So you can create all the queries and then run in batches in custom query job.

 

Thanks

Darshan

So you mean, 2 Lakh queries for 2lakh accounts?

How many queries can one customqueryjob can run?


Thanks & Regards,
Haardik Verma

You can try with 10k in one batch

Okay,

Thanks again for all the help @Darshanjain 


Thanks & Regards,
Haardik Verma