SFMC Core
This section provides API reference details for SFMC Core module in React Native unified plugin.
Sets the profile identifier for the device user.
| Parameter | Type | Description |
|---|---|---|
profileId | string | The profile ID (contact key) for the device user. Use a stable identifier, such as a CRM user ID or email-based key, so the same user is recognized across sessions. |
void
Returns the profile identifier currently set on the device.
Promise<string \| null>- A promise that resolves to the current profile ID.
Sets an attribute value in the device user’s registration profile.
| Parameter | Type | Description |
|---|---|---|
key | string | The attribute name in the registration profile. |
value | string | The attribute value to assign to key in the registration profile. |
void
Sets multiple attribute values in the device user’s registration profile in one call.
| Parameter | Type | Description |
|---|---|---|
attributes | object | The key-value map of identity attributes to set in one call. Each key is an attribute name and each value is a string attribute value. |
void
Clears an attribute value from the device user’s registration profile.
| Parameter | Type | Description |
|---|---|---|
key | string | The attribute name whose value is cleared from the registration profile. |
void
Clears all attributes from the device user’s registration profile.
void
Returns the attributes currently set in the device user’s registration profile.
Promise<object \| null>- A promise that resolves to the attribute key-value map.
Sets the party identification name in the device user’s identity profile.
| Parameter | Type | Description |
|---|---|---|
name | string | The party identification name for the device user. |
void
Sets the party identification number in the device user’s identity profile.
| Parameter | Type | Description |
|---|---|---|
numberValue | string | The party identification number for the device user. |
void
Sets the party identification type in the device user’s identity profile.
| Parameter | Type | Description |
|---|---|---|
type | string | The party identification type for the device user. |
void
Returns the party identification name currently set on the device.
Promise<string \| null>- A promise that resolves to the current party identification name.
Returns the party identification number currently set on the device.
Promise<string \| null>- A promise that resolves to the current party identification number.
Returns the party identification type currently set on the device.
Promise<string \| null>- A promise that resolves to the current party identification type.
Tracks an event, which can trigger SDK actions such as in-app message display.
| Parameter | Type | Description |
|---|---|---|
event | object | The SFMCEvent payload to track. Valid event types are CustomEvent, EngagementEvent, IdentityEvent, SystemEvent, CartEvent, OrderEvent, and CatalogObjectEvent. |
void
Tracks an event and sends it immediately without waiting for the next batch cycle.
| Parameter | Type | Description |
|---|---|---|
event | object | The SFMCEvent payload to track and send immediately. Valid event types are CustomEvent, EngagementEvent, IdentityEvent, SystemEvent, CartEvent, OrderEvent, and CatalogObjectEvent. |
void
Flushes all queued events to Marketing Cloud servers immediately.
void
Sets the log level for the native Marketing Cloud SDK and Unified SFMC SDK.
| Parameter | Type | Description |
|---|---|---|
level | string | The SDK log level. Valid values are DEBUG, WARN, ERROR, and NONE. |
void
Returns the current SDK state object for diagnostics and support troubleshooting.
Promise<object>- A promise that resolves to the SDK state object.