Are you receiving SNAP/EBT benefits? The Expensify.org/SNAP-VAX campaign is live and accepting new members. Learn more about receiving $50 for submitting a SNAP receipt and $50 for getting your COVID-19 vaccine here and join today!

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

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": "[email protected]", 
            "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