We are delighted to share our new EIC Delivery Methodology for efficiently managing Saviynt Implementations and delivering quick time to value. CLICK HERE.

How to exclude inactive/disabled accounts in Entitlement Owner campaign?

johnson
New Contributor
New Contributor

I have an endpoint, Active Directory, with entitlements A, B, C, and D. I want to create an entitlement owner campaign to include entitlements A, B, and C but I want to exclude inactive/disabled accounts for A & B but not C. I also want to exclude any entitlements that have zero accounts associated with them. I am running into an issue where the inactive/disabled accounts are not being excluded for A and B even though my Accounts query should be excluding them. Below are the following queries I am using in the Advanced Campaign Configuration. 

Account Entitlement1 Query
ae1.accountkey IS NOT NULL

Entitlements Query
entitlement_value LIKE 'A' OR entitlement_value LIKE 'B' OR entitlement_value LIKE 'C'

Accounts Query
name IN (SELECT a.name FROM accounts a JOIN account_entitlements1 m ON a.accountkey = m.accountkey
JOIN entitlement_values e ON m.entitlement_valuekey = e.entitlement_valuekey
WHERE ((e.entitlement_value LIKE 'A' OR e.entitlement_value LIKE 'B') AND a.status IN ('1', 'Active', 'Manually Provisioned')) OR (e.entitlement_value LIKE 'C))

Note: I have to use LIKE operator in the queries because we are filtering entitlements by the first few characters of the string. 

4 REPLIES 4

dgandhi
All-Star
All-Star

Can you try below?

name IN (SELECT a.name FROM accounts a JOIN account_entitlements1 m ON a.accountkey = m.accountkey
JOIN entitlement_values e ON m.entitlement_valuekey = e.entitlement_valuekey
WHERE (((e.entitlement_value LIKE 'A' OR e.entitlement_value LIKE 'B') AND a.status IN ('1', 'Active', 'Manually Provisioned')) AND ((e.entitlement_value LIKE 'C') AND a.status IN ('1', '2','Inactive','Active', 'Manually Provisioned','Manually Suspended')))

 

Thanks,
Devang Gandhi
If this reply answered your question, please Accept As Solution and give Kudos to help others who may have a similar problem.

Hi Devang,

I am a little confused by your query. The issue I am having is that inactive/disabled accounts are not being excluded for A and B. So when I run the entitlement owner campaign I am still seeing inactive/disabled accounts for entitlement A (wrong), B (wrong), and C (correct).

With above query, you still see inactive accounts for Ent A and Ent B?

Thanks,
Devang Gandhi
If this reply answered your question, please Accept As Solution and give Kudos to help others who may have a similar problem.

No. It actually didn't retrieve any accounts at all. I am getting zero accounts for all three entitlements. I believe it's because of the AND highlighted below:

WHERE (((e.entitlement_value LIKE 'A' OR e.entitlement_value LIKE 'B') AND a.status IN ('1', 'Active', 'Manually Provisioned')) AND ((e.entitlement_value LIKE 'C') AND a.status IN ('1', '2','Inactive','Active', 'Manually Provisioned','Manually Suspended')))