Best Answer

Automated deactivation based on expiration date

  • 29 November 2023
  • 6 replies
  • 88 views

hi.

just noticed yesterday that there is no logical linkage between the expiration date and the user status, so technically, unless manually updated, a user can still remain active despite their passed expiration date.

business wise i don’t see any coherence in that, but anyway, did anyone manage to create such automation between the expiration date and the user status? 

i’d like all users whose expiration date is reached to change their user status to deactivated.

Expiration date is updated via HR interface based on daily batch file and using docebo connect.

thanks for the help,

ben.

icon

Best answer by alekwo 4 December 2023, 08:57

View original

6 replies

Userlevel 7
Badge +1

@benzion you can create a flow in Docebo Connect to periodically review accounts and deactivate those that are past the expiration date.

@benzion you can create a flow in Docebo Connect to periodically review accounts and deactivate those that are past the expiration date.

thanks @alekwo.

do you have a recipe of such automation that i can use as a reference by any chance?

i assumed this has already been done by other clients as this would be the reasonable behaviour of the system.

Userlevel 7
Badge +1

@benzion our use case is different, so I don’t have anything to share. 

You need to fetch the list of users - GET /manage/v1/user

then select the users that should be deactivated (using a Collection is probably the easiest way, as you can query it using SQL)

and then you can deactivate all users that are past the expiration date with a single API call to PUT /manage/v1/user/change_status sending the list of IDs - { "user_ids": “<user_ids>" ], "status": "0" }

@benzion our use case is different, so I don’t have anything to share. 

You need to fetch the list of users - GET /manage/v1/user

then select the users that should be deactivated (using a Collection is probably the easiest way, as you can query it using SQL)

and then you can deactivate all users that are past the expiration date with a single API call to PUT /manage/v1/user/change_status sending the list of IDs - { "user_ids": “<user_ids>" ], "status": "0" }

 

Hi Alek.

Thanks for the answer. It certainly gave me some direction. 

As mentioned before, I already have a working batch-file interface on Docebo Connect that already gets the users whose termination date has reached everyday and updates their expiration date. I thought that on the same instance I will add an action that also updates their user status to Deactivated.

I created a custom action and set Method and Path according to your instructions, but got stuck at the step where I need to supply the User_Id in Docebo for the action.

Can you please guide me how I incorporate this syntax { "user_ids": “<user_ids>" ], "status": "0" } in the following action fields? Docebo’s User_Id are pulled in a loop from a Get Users action (Picture at the end).

 

 

 

This is the recipe for the expiration date update. i added step 8 to update the user status as well. i get the Docebo User_Id at step 5.

 

Userlevel 7
Badge +1

I don’t use the Docebo connector (we have a plain Workato, not Docebo Connect), so in a generic HTTP connector it looks like this:

You need to define the Request body schema. With an array of employee ids, and the status field.

you can use this JSON sample to define the request schema:

{
"user_ids": [
"12345",
"12346",
"12457"
],
"status": 0
}

 

I have successfully managed to set that step.

for those who use Docebo Connect i will share the recipe:

  1. you add a custom step with the following Method and Path:
  1. in the request schema you define a field called the user_ids to be an array and status to be a number.
    In the  request data you put the User_Id from the relevant Get Users step and 0 in the Status field

     

Checked it and it works.

 

Thanks again @alekwo.

Ben.

Reply