Skip to main content

Problem

You update a user attribute that should remove a user from the target segment of a campaign, but the user continues to see the in-app or on-site message.

Why This Happens

For campaigns that target a user-attribute-based segment, MoEngage evaluates in-app and on-site message eligibility against a cached segment state rather than against the live attribute value. A recent attribute change is not reflected in real time, so a user can stay eligible for a period after the update. This is expected behavior for the default configuration.

Get Real-Time Eligibility for In-App Campaigns

Turn on Re-evaluate campaign eligibility before displaying when you create the in-app campaign. With this toggle on, the SDK checks the current attributes of the user with the backend at the moment the campaign is triggered, and drops the campaign if the user is no longer eligible. For more information, refer to Re-evaluate Campaign Eligibility.
You can turn on re-evaluation for a maximum of five in-app campaigns at a time.

Suppress the Message With Jinja

Use this approach when re-evaluation is not available for your campaign — for example, when you have reached the limit of five campaigns. Target the campaign at all users, and use Jinja on the user attribute to decide whether the content displays:
When the condition resolves to MOE_NOT_SEND, MoEngage does not deliver the message. Jinja is evaluated when the message renders, so it reads the current attribute value instead of the cached segment. This approach works in both HTML and non-HTML campaigns. For more information, refer to Personalize Content Using the Jinja Templating Language.