Skip to main content

Overview

Early AccessThis is an Early Access feature. To enable it for your account, contact your MoEngage Customer Success Manager (CSM) or the Support team.
The Unset User Attribute feature lets you remove a value from a specific user attribute, effectively restoring it to a “null” or “non-existent” state. Prior to this feature, if you wanted to clear the value of a user attribute, you might have set a value to 0, N/A, or an empty string. However, MoEngage still considers these “values”. Unsetting ensures the user attribute value is removed entirely, enabling more accurate segmentation and data hygiene.
Information
  • This feature applies only to standard and custom user attributes, not for derived user attributes and ID (customer_id).
  • This feature is not supported for event or device attributes.
  • The unset attribute functionality is supported only through data APIs, specifically the Track User API and the Bulk Import API (only for user attributes, not for event or device attributes).
  • The unset attribute functionality is not supported through SDKs, Warehouse Imports, and File based Imports.
  • You can unset PII encrypted and masked user attributes.

Use Cases

Enhanced segmentation accuracy: Enable precise targeting by removing obsolete status flags (for example, expired Loyalty Tier) from user profiles. This ensures that users correctly qualify for ‘Does Not Exist’ segments, eliminating data noise caused by residual empty or null values. Precise data removal: Unlike setting a value to 0 or null (which keeps the attribute key present on the profile), unsetting the attribute removes the attribute value. This allows you to precisely delete individual attributes (such as PII or outdated contact details) to maintain data hygiene without impacting the broader user profile. Data compliance and GDPR: Satisfy partial data deletion requests (for example, removing a phone number or specific PII due to a user request or GDPR compliance) by erasing specific user attributes while preserving the remainder of the user’s profile and historical data.

Supported Data Types

You can unset attributes of the following data types:
  • String (Text)
  • Numeric (Integers, Decimals)
  • DateTime
  • Boolean (True/False)
  • All Array types By default, when an array is to be unset, all the attribute elements inside the array are unset. If you want to partially remove a specific element from an array, you should use the removeValueFromArrayField functionality. For more information, refer to User Property as Array cURL in the Track User API.

Unsetting the User Attributes

To unset an attribute, pass an unset_attributes object within your JSON payload of the supported Data APIs. MoEngage uses a condition-based approach to identify which attributes to remove. The unset_attributes object must contain the following unset attribute details:

Sample cURL

Below is a sample JSON payload for the Track User API. For the Bulk Import API, the logic remains the same to unset an attribute, but applies only to the Customer payload (type: customer):
Information
  • Requests to unset attributes that are Blocked in the Data Management dashboard are ignored.
  • Requests to unset Hidden attributes in the Data Management dashboard are processed successfully.
  • If an attribute is defined in both the attributes and unset_attributes object within the same API payload, the Unset operation takes precedence. The attribute value is removed.
  • The unset operation can only be performed on attributes that are already registered or present within the workspace.