Rules are defined in the Experience Platform Launch interface and can include data elements, events, conditions, and actions provided by extensions.
Your extension should publish the rules support that it provides to Experience Platform Launch. You can provide this support through the extension.json
file in your extensions base directory.
Data elements can be supported by publishing the shared state keys that you want to use in a rule. For more information, see Data Element Types.
"dataElements": [
{
"displayName": "My Custom Value",
"name": "customValue",
"schema": {
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"allOf": [{
"$ref": "https://assets.adobedtm.com/activation/reactor/schemas/1.0/extension-definitions-mobile.json#/definitions/dataElement"
}]
},
},
Conditions can be supported by publishing the shared state keys or events that you want to use in a rule. For more information, see Condition Types.
Here is an example:
"events":[
{
"displayName": "My Custom Event",
"name": "triggerEvent",
"schema": {
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"allOf": [{
"$ref": "https://assets.adobedtm.com/activation/reactor/schemas/1.0/extension-definitions-mobile.json#/definitions/events"
}]
}
}],
"conditions":[
{
"displayName": "My Custom Condition",
"name": "triggerCondition",
"schema": {
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"allOf": [{
"$ref": "https://assets.adobedtm.com/activation/reactor/schemas/1.0/extension-definitions-mobile.json#/definitions/conditions"
}]
}
}],
Conditions can be supported by publishing the events that you want to use in a rule. For more information, see Action Types.
Here is an example:
"actions": [
{
"displayName": "My Custom Action",
"name": "com.myCompany.eventType.doSomeWork",
"schema": {
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {},
"allOf": [{
"$ref": "https://assets.adobedtm.com/activation/reactor/schemas/1.0/extension-definitions-mobile.json#/definitions/consequence"
}]
},
}],
You should provide support for the events, actions, and conditions that you published to Experience Platform Launch at runtime.
A shared state that was published by your extension can be used as a condition
when configuring a rule in Experience Platform Launch. To learn how you can publish a shared state, see Updating the shared state.
An event that was dispatched by your extension can be used as a condition
when configuring a rule in Experience Platform Launch. To learn how you can dispatch an event, see Dispatching events from your extension.
For an event that your extension registered, a listener for can be used as an action
when configuring a rule in Experience Platform Launch. To learn how you can register a listener for your events, see Listening for events.