Important Notice: After July 31, 2024, the Expensify community will no longer be available. Help docs and resources can be found on help.expensify.com and you can message Concierge with any additional questions.

Employee Updater API isTerminated removes user from Domain, but not Policy

Options
len_devoted
len_devoted Expensify Customer Posts: 4

Pretty much what it says on the tin. I've run this for a number of users, cleaning up our account, and I realized that while I was getting a success back from the server, the user number was going down on our "Domain", but not the "Policy"

This is a screen cap of the Domain area showing one account starting with "+" and 1325 total users

And this is our policy, showing 5 user starting with "+" (4 of which I closed using the API 'isTerminated' value) and a total of 1335 policy members.


It's my understanding that you can't even have someone in a policy that's not part of a domain, so I'm really curious how this is happening.

My API is making a POST request to https://integrations.expensify.com/Integration-Server/ExpensifyIntegrations

And a typical request looks like:

{
    "Employees": [
        {
            "employeeEmail": "+<user>@expensify.sms", 
            "managerEmail": "manager@mycompany.com", 
            "policyID": "<my_policy>", 
            "employeeID": "", 
            "isTerminated": true
        }
    ]
}

According to: https://integrations.expensify.com/Integration-Server/doc/employeeUpdater.html?json#api-principles, if isTerminated is true, then the employee should be removed from the policy in policyID. But in my case, it's removing the user from the domain (which is also desired, but at least would make more sense) and leaving them in the policy.

What's going on here and how can it be fixed?

Best Answer

Answers