Target event reference
This event reference document is applicable to ACPTarget 2.x.

Events handled

The following events are handled by the Target extension:

Target Content Request

This event is created when an API is called to send a Target request for the associated mbox location or to prefetch locations.
The event is generated by the API in the following situations:
    When a new Target request needs to be sent (loadRequests or retrieveLocationContent)
    When a Target prefetch is initiated (prefetchContent)
    When the Target preview restart deeplink is set (setPreviewRestartDeepLink)
    When a click notification needs to be sent to Target (locationClicked)
    When a display notification needs to be sent to Target (locationsDisplayed)

Data payload definition

Here are the key-value pairs in this event:
Key
Value Type
Optional
Description
restartdeeplink
String
Yes
Populated when the setPreviewRestartDeepLink API is called.
profileparams
StringMap
Yes
Populated when the prefetchContent/ loadRequests API is called.
islocationclicked
Boolean
Yes
Populated when locationClicked API is invoked.
islocationdisplayed
Boolean
Yes
Populated when locationsDisplayed API is invoked.
The locationClicked API parameters are also sent in the event, as described below:
1
{
2
"islocationclicked": <Boolean>
3
"mboxname": <String>
4
"mboxparameters": <StringMap>
5
"productparameters": <StringMap>
6
"orderparameters": <VariantMap>
7
"profileparams": <StringMap>
8
}
Copied!
Key
Value Type
Optional
Description
prefetch
VariantVector
Yes
Populated when the prefetchContent API is called.
The prefetch key contains a list of objects, each with the following content:
1
{
2
"mboxname": <String>
3
"mboxparameters": <VariantMap>
4
"profileparams": <VariantMap>
5
"productparameters": <VariantMap>
6
"orderparameters": <VariantMap>
7
}
Copied!
Key
Value Type
Optional
Description
request
VariantVector
Yes
Populated when loadRequests is called.
The request key contains a list of target requests, each with the following content:
1
{{
2
"mboxname": <String>
3
"mboxparameters": <VariantMap>
4
"profileparams": <VariantMap>
5
"productparameters": <VariantMap>
6
"orderparameters": <VariantMap>
7
}
8
"defaultcontent": <String>
9
"responsepairid": <String>
10
}
Copied!

Target Identity Request

This event is a request to retrieve Target identities, such as third-party IDs and TNT IDs, or to set the third-party ID.
This event will be generated by the API that is:
    Requesting a Target Identity (getThirdPartyId, getTntId).
    Setting the third-party ID (setThirdPartyId).

Data payload definition

Here are the key-value pairs in this event:
Key
Value Type
Optional
Description
thirdpartyid
String
Yes
Populated when the setThirdPartyId API is called.

Target Reset Request

This event is created by customers who use the API to reset the Target parameters.
This event is generated by the API in the following scenarios:
    From the customers to clear Target parameters (resetExperience).
    To clear the prefetch cache (clearPrefetchCache).

Data payload definition

Here are key-value pairs in this event:
Key
Value Type
Optional
Description
resetexperience
Boolean
Yes
Present in the event generated by the resetExperience API.
clearcache
Boolean
Yes
Present in the event generated by the clearPrefetchCache API.

Configuration Response Content

The data property in the Configuration Response Content event is used by each extension to modify its current settings. Each extension is responsible to read out the part of the data property for which it is concerned.
The Target extension will read the following keys from the configuration event:
Key
Value Type
Optional
Description
target.clientCode
String
No
The Target Client Code that is obtained during provisioning with the Target Adobe solution.
target.environmentId
Integer
Yes
The Target Environment ID.
target.timeout
Integer
Yes
This value is used for Target request connection timeouts (in seconds). If the value is not set, a default value of 5 seconds is used.
global.privacy
String
Yes
This contains the mobile privacy status settings.
target.previewEnabled
Boolean
Yes
Boolean value to determine whether Target Preview should be enabled. If not set, then Preview is enabled by default.

Events dispatched

The following events are dispatched by the Target extension:

Target Content Response

This event is created when the Target server response is received, and the prefetch or load request operation is completed. Network responses are generated from the Target server for prefetch or load request calls.
This event is dispatched in the following scenarios:
    In response to an API prefetch content request. This event contains a prefetchresult key of type boolean, which signals the success or failure of the prefetch request.
    In response to an API batch load requests, where one event is dispatched per request.
    This event contains a content key of type string that contains mbox content.

Data payload definition

Here are the key-value pairs in this event:
Key
Value Type
Optional
Description
content
String
Yes
Response content is returned by the Target server for a load request with valid locations.
prefetchresult
Boolean
Yes
Prefetch status returned after a Target prefetch request.
prefetcherror
String
Yes
Prefetch response error if any, otherwise null

Target Identity Response

This event delivers the Target identities to the following:
    The original requester.
    To any extension that might be listening for updates.
This event is generated by the Target extension as a response to the Target Identity Request event.

Data payload definition

Here are the key-value pairs in this event:
Key
Value Type
Optional
Description
tntid
String
Yes
The Target Identifier retrieved from Target server.
thirdpartyid
String
Yes
Current Third Party ID that is set from the API.

Target Preview Response

This event is generated when Target Preview is started or stopped by the marketer. It can be used to trigger any custom workflows or API calls based on the preview flag by the following:
    The original requester.
    To any extension that might be listening for updates.

Data payload definition

Here are the key-value pairs in this event:
Key
Value Type
Optional
Description
ispreviewinitiated
Boolean
No
Value indicating whether Target preview is initiated or stopped.

Shared states

MODULE_NAME: com.adobe.module.target
Shared state for this module is updated when the IDs are set or reset from public or Target servers.
Key
Type
Description
tntid
String
This is the primary identifier in Target for a user and is also known as PCID or mboxPCID. The tntId is not returned in the Target API response when a thirdPartyId or experienceCloudVisitorId is provided in the request.
thirdpartyid
String
Client-provided visitor ID for Target.
Last modified 1mo ago