---
schema_version: "1"
id: 4c4d8d649731e9cdf91e315cfed9badc3236996c31151bebb3614d3dcfd6905c
title: Capture Profile Data (Version 2.x)
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/data-cloud/data-cloud-engagement-mobile-sdk/guides/c360a-api-engagement-mobile-sdk-capturing-profile-data-v2.md
canonical_url: https://developer.salesforce.com/docs/data/data-cloud-engagement-mobile-sdk/guide/c360a-api-engagement-mobile-sdk-capturing-profile-data-v2.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 2be97f57b2b5fde1a0e8b901874330ef10477073586c14d11d4ecca9172a1754
products:
  - Data 360 Engagement Mobile SDK
  - Data 360 Developer Documentation
---
# Capture Profile Data (Version 2.x)

The Data 360 Module for the Engagement Mobile SDK enables collection of profile data through the SDK's Identity APIs.

## Prerequisites

Before engagement data can be sent to Data 360:

- The Data 360 Module for the Engagement Mobile SDK must be configured and [initialized](https://developer.salesforce.com/docs/data/data-cloud-engagement-mobile-sdk/guide/c360a-api-engagement-mobile-sdk-initialization.md).
- [Consent](https://developer.salesforce.com/docs/data/data-cloud-engagement-mobile-sdk/guide/c360a-api-engagement-mobile-sdk-consent-management.md) to track profile data must be granted.

## Set Profile Attributes

```
import Cdp
import SFMCSDK

...

let profileAttributes = [
  "email": "user@domain.com",
  "username": "user01"
]
SFMCSdk.identity.setProfileAttributes([.cdp: profileAttributes])
```

```
import com.salesforce.marketingcloud.sfmcsdk.SFMCSdk
import com.salesforce.marketingcloud.sfmcsdk.modules.ModuleIdentifier.CDP

...

val profileAttributes = mapOf(
  "email" to "user@domain.com",
  "username" to "user01"
)
SFMCSdk.requestSdk { sdk ->
  sdk.identity.setProfileAttributes(profileAttributes, CDP)
}
```

When a profile attribute changes, the Data 360 Module triggers an `identity` profile event containing all set attributes. You can set any name-value pair for profile attributes.

## Supported Customer 360 Data Model

The Identity Schema provided by the recommended Mobile Connector schema for Data 360 contains profile attributes that support identity resolution features when mapped to the appropriate Customer 360 Data Model.

Each `identity` event contains mappable fields.

- Individual
  - `firstName`
  - `lastName`
- Software Application
  - `registrationId`
  - `softwareApplicationName`
- Device
  - `advertiserId`
  - `deviceType`
  - `osName`
- Contact Point App
  - `registrationId`

## Device advertiserId

Starting with Android 13 (API level 33), [permission is required to request the device's `advertiserId`](https://developer.android.com/about/versions/13/behavior-changes-13#ad-id). In [Data 360 2.0.2](https://github.com/salesforce-marketingcloud/mobile-sdk-cdp-android/releases/tag/2.0.2), this permission is included by default. To [prevent this permission from getting merged into your app](https://developers.google.com/android/reference/com/google/android/gms/ads/identifier/AdvertisingIdClient.Info#public-methods), add this element to your AndroidManifest.xml:

```xml
<uses-permission android:name="com.google.android.gms.permission.AD_ID" tools:node="remove"/>
```

### Contact Points

Each supported contact point has required attributes that must be provided to the SDK's Identity API. After all attributes are provided, the Data 360 Module triggers a profile event with contact points and an identity event.

The contact points and required attributes that trigger them are:

- Contact Point Email Schema
  - `email`
- Contact Point Phone Schema
  - `phoneNumber`
- Contact Point Address Schema
  - `addressLine1`
  - `city`
  - `postalCode`
  - `stateProvince`
  - `country`

## Anonymous and Known Users

In the Data 360 Module, all customers are considered known by default. To mark a customer as anonymous, set the `isAnonymous` profile attribute to `"1"`. Setting `isAnonymous` to `"0"` ensures customers are considered known.

```
import Cdp
import SFMCSDK

...

// treat a profile as anonymous
SFMCSdk.identity.setProfileAttributes([.cdp: ["isAnonymous": "1"]])
// or use this convenience function
CdpModule.shared.setProfileToAnonymous()

// treat a profile as known
SFMCSdk.identity.setProfileAttributes([.cdp: ["isAnonymous": "0"]])
// or use this convenience function
CdpModule.shared.setProfileToKnown()
```

```
// treat a profile as anonymous
SFMCSdk.requestSdk { sdk ->
  sdk.identity.setProfileAttribute("isAnonymous", "1", CDP)
}

// treat a profile as known
SFMCSdk.requestSdk { sdk ->
  sdk.identity.setProfileAttribute("isAnonymous", "0", CDP)
}
```

## Shared Party Identifiers

The Engagement Mobile SDK supports sharing identifiers between modules for integration with other Salesforce systems. For example, match an individual using a mobile application with both Data 360 and MobilePush modules to send push notifications to specific anonymous mobile users.

### Anonymous MobilePush User

The `identity` event contains fields that can be mapped to the Party Identification model.

- `registrationId`: Identification Number

### Known MobilePush User

When the MobilePush module obtains a resolved identity for a mobile customer, it sets a `profileId` using the SDK's Identity API. The Data Cloud Module is notified and sends a `partyIdentification` event with these fields:

- `userId`: Identification Number
- `IDName`: Party Identification Name
- `IDType`: Party Identification Type
