Batch Update of Contract End Date for Non Employee (IdentityIQ)

Which IIQ version are you inquiring about?

Version 8.2

Please share any other relevant files that may be required (for example, logs).

updategenericaccount.csv (79 Bytes)

Share all details related to your problem, including any error messages you may have received.

We are trying to do a batch update on Contract End Date for about 1000+ Non-employee.
attributeName: contractEndDate
It’s an editable field

Tried putting epoch converter value and normal date but it’s not reading as a date or actual format.

Attached the sample excel sheet and sample out after the batch processed.

Note: No errors when uploading the batch request.

@pbobadil
What is the type of field in Object Config when you created this and also what is the type of column in database?

It’s a String Attribute Type on Identity Mappings.
I think it’s an extension attribute in DB.

Yes, extended attribute in DB understood but what type of column in DB, is it varchar or timestamp?

Just checked is not an extended attribute. It’s an actual column on DB.
image

Oh okay, Do you have sample data for existing users in right format, can you please provide a sample data for the same with format

1 Like

Sample format on the UI side:
image
Sample information on DB side:
image

I doubt you can do this Batch request as from Identity Update standpoint it is always a string or identity type attributes and even if you provide the value as above it should populate in debug page as below instead of having Date tags, can you once check in debug page if below is happening?

  <entry key="contract_end_date" value="1501502400000"/>

Also in this case you may have to modify your workflow being called during batch request to handle this particular attribute or have some independent workflow or code to update this particular attribute.

Please confirm if you are able to see in debug page in String format for your field.

Other experts can comment if they have any other approach.

1 Like

You can just write a small rule in beanshell to use identity.setAttribute(String attributeName, Object attributeValue) to set directly Date object and HBM will translate it to epoch

Of course if you dont expect any triggers to be fired on update. If you need to fire them then you can provision this value same way but you will have to build provisioning plan.

Just checked debug and below is the value:
image

@iamksatish - your right it’s setting up as a string value

@pbobadil
This is what exactly I am saying, I don’t think you will have a direct way to do this from Batch Request, either you come up with an independent rule or workflow which reads the file and update the value or update the associated Batch request workflow to handle this particular attribute separately

1 Like

Thank you Satish, will try that and see if that will work. Maybe you have a script that you use before that you can also share

@pbobadil
What is your exact use case here, you have different end dates for set of users and you wanted to update the same for them within Identity ? or do you have any post process to be done for the same.

If you just want to save the attribute at Identity level, you can set the attribute by getting identity object and save the object using below code
Note - You can place the csv file in server and read the file using basic Java code and then while iterating the identity and corresponding epoch time use the below code
Assuming identityName and epochMilliseconds are read already.

Identity iden=context.getObjectByName(Identity.class,identityName);
java.util.Date date1 = new java.util.Date(epochMilliseconds); 
iden.setAttribute("contractEndDate",date1);
context.saveObject(iden);
context.commitTransaction();
1 Like

Use Case 1**: 800+ Non-Employee with different Contract End Date, set one Contract End** Date for all the records

Use Case 2: 1600+ Generic Accounts without Contract End Date and I need to put one date for all the records

If you goal is just to set the common date and if you have list of user ids already you can follow the above approach.

For the end date as it is constant for all users, you can either have in file or just hard code in rule or have it as a task parameter.

Will follow this approach, and yes, I already have all the list of users that needs common date.

1 Like

Sure, please try and let me know if any other help needed here
If that resolved the issue, please mark the solution.

Thank you Satish, this work for us and were able to call a CSV file and use the script above with a few tweaks.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.