Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Journey context and delivery attributes in experience event #472

Merged
merged 6 commits into from
Aug 30, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,16 @@
"xdm:from": "no-reply@adobe.com",
"xdm:testEnabled": true,
"xdm:messageClass": "continuous",
"xdm:templateID": 1000
"xdm:templateID": 1000,
"xdm:deliveryName": "DM200",
"xdm:deliveryLabel": "Birthday Wishes"
},
"https://ns.adobe.com/experience/campaign/marketingCampaign": {
"xdm:id": 100
"xdm:id": 100,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ID isn't a number - it's a string.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here,"id" attribute is an integer as per the XDM schema.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is custom attribute xdm:id which is of type integer but not "@id" whose type is string

"xdm:campaignName": "CAMP2010"
},
"https://ns.adobe.com/experience/campaign/orchestration": {
"xdm:businessReason": "onJourneyEnter"
}
},
"https://ns.adobe.com/experience/campaign/containerID": "customer-stage"
}
54 changes: 54 additions & 0 deletions extensions/adobe/experience/campaign/experienceevent.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,18 @@
"type": "integer",
"description":
"The delivery template's ID used to initialize this delivery.\n\nThe type the template used in Adobe Campaign can be identified using the `messageClass`.\n\n* `messageClass` = `oneTime`: the template is standard delivery template.\n* `messageClass` = `continuous`: the template is a recurring delivery.\n* `messageClass` = `transactional`: the template is a transactionnal message template.\n"
},
"xdm:deliveryLabel": {
"title": "Delivery Label",
"type": "string",
"description":
"A human-friendly name of the campaign activity which is originating this message."
},
"xdm:deliveryName": {
"title": "Delivery Internal name",
"type": "string",
"description":
"A human-friendly identifier of the campaign activity which is originating this message."
}
}
},
Expand All @@ -204,6 +216,12 @@
"type": "integer",
"description":
"Identifier of the marketing campaign to which activity originating this message belongs to."
},
"xdm:campaignName": {
"title": "Campaign Internal name",
"type": "string",
"description":
"A human-friendly identifier of the marketing campaign which is originating this message."
}
}
},
Expand Down Expand Up @@ -260,8 +278,44 @@
"type": "string",
"description":
"Business qualifier that identifies the event sent by the data source. It informs on the business reason for sending the event. It is unique per organization. This is used by Campaign orchestration to identify the event without inspecting its payload to determine which action should be triggered when the event is received. The value of this field is a contract between Campaign orchestration and the data source."
},
"orchestrationDetails": {
"title": "Orchestration Details",
"description":
"Set of attributes that are associated with every orchestration.",
"type": "object",
"properties": {
"journey": {
"title": "Journey for an entity",
"$ref":
"https://ns.adobe.com/experience/campaign/orchestration/experienceevent#/definitions/journey",
"description": "Journey created by marketer for its entities."
},
"journeyVersion": {
"title": "Journey Version for an entity",
"$ref":
"https://ns.adobe.com/experience/campaign/orchestration/experienceevent#/definitions/journeyVersion",
"description":
"Schema for describing the version of a journey, where version holds the state machine."
},
"action": {
"title": "Action associated with a journey",
"$ref":
"https://ns.adobe.com/experience/campaign/orchestration/experienceevent#/definitions/action",
"description":
"Action that is executed for an entity when reached a step in in the journey state machine.",
"required": ["xdm:actionID"]
}
},
"required": ["journey", "journeyVersion", "action"]
}
}
},
"https://ns.adobe.com/experience/campaign/containerID": {
"title": "Container identifier",
"type": "string",
"description":
"The identifier denoting the container with which campaign experience event is associated."
}
}
},
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
{
"meta:license": [
"Copyright 2018 Adobe Systems Incorporated. All rights reserved.",
"This work is licensed under a Creative Commons Attribution 4.0 International (CC BY 4.0) license",
"you may not use this file except in compliance with the License. You may obtain a copy",
"of the License at https://creativecommons.org/licenses/by/4.0/"
],
"$id":
"https://ns.adobe.com/experience/campaign/orchestration/experienceevent",
"$schema": "http://json-schema.org/draft-06/schema#",
"title": "Journey experience event",
"type": "object",
"description": "Orchestration extension to ExperienceEvent",
"definitions": {
"journey": {
"title": "Journey of an entity",
"type": "object",
"description": "Journey created for an entity by marketer.",
"properties": {
"@id": {
"title": "Journey unique identifier",
"type": "string",
"format": "uri-reference",
"description": "The unique identifier of the journey created by the marketer."
}
},
"required": ["@id"]
},
"journeyVersion": {
"title": "Journey version",
"type": "object",
"description": "Schema for describing the version of a journey, where version holds the state machine",
"properties": {
"@id": {
"title": "Journey version identifier",
"type": "string",
"format": "uri-reference",
"description": "The unique identifier denoting the version of journey on which the entity is active."
}
},
"required": ["@id"]
},
"action": {
"title": "Action on step transition",
"type": "object",
"description": "Action taken during a step transition that happened for an entity in state machine",
"properties": {
"xdm:actionID": {
"title": "Action identifier",
"type": "string",
"format": "uri-reference",
"description": "Unique identifier denoting the associated action."
},
"xdm:actionType": {
"title": "Action Type",
"type": "string",
"description": "The type of action to be performed.",
"meta:enum": {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am a bit at unease with the labels of this enum:

  • They seem to be inconsistently named, for example participe-substantive as in scheduled_notification or parametrized_action vs. imperative-substantive as in send_journey_notification or just typed name as in acs_writer
  • The acs_* labels seem very much tied into the ACS product

I think the labels should be consistently structured and not be tied to a current product name (which may change outside of our control and which limits the general applicability of this data structure.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1)This actionType is already introduced XDM reporting event and now I am referring the same in campaign experience event. If inconsistent names needs to be handled here then it would be a breaking change. Should I create a separate issue and assign it to the concern person?
2) I agree with your comment in core XDM schema perspective. But generally xdm extension schemas are the only way to introduce product specific attributes. In that case, it should not be a problem use such names.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ksradobe wrote:

This actionType is already introduced XDM reporting event and now I am referring the same in campaign experience event. If inconsistent names needs to be handled here then it would be a breaking change.

This is a good call-out. Yet what is evolutionary state of this ? is it draft or stabilizing or finalized ?

Copy link
Contributor Author

@ksradobe ksradobe Aug 29, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fmeschbe It is in stabilizing state.

Copy link
Collaborator

@fmeschbe fmeschbe Aug 30, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I like that much better.

How about

  • renaming campaign_rest_call to campaign_request and
  • renaming campaign_messageService_call to messageService_request ?

Thereby aligning with the new http_request.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fmeschbe pushed my changes.

"scheduled_notification":
"This action type allows to specify scheduled notifications and wait for the notifications as incoming events for steps",
"http_request":
"This action type is for a HTTP call on an external system",
"personalized_action":
"This action type describes an action with personalization that will be resolved at runtime for each voyager instance",
"parameterized_action":
"This action type describes an action with parameterization",
"journey_notification":
"This action type is to send notification for another journey",
"campaign_request":
"This action performs REST calls to a campaign instance to write data",
"messageService_request":
"The message service action performs REST calls to campaign instance to send messages with messaging service"
}
}
}
}
},
"allOf": [
{
"$ref": "#/definitions/journey"
},
{
"$ref": "#/definitions/journeyVersion"
},
{
"$ref": "#/definitions/action"
}
],
"meta:status": "stabilizing"
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"https://ns.adobe.com/experience/campaign/orchestrationAction": {
"xdm:actionID":
"https://ns.adobe.com/experience/campaign/orchestration/action/123",
"xdm:type": "parameterized_action"
"xdm:actionType": "parameterized_action"
},
"https://ns.adobe.com/experience/campaign/orchestrationExternalEvent": {
"@id":
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,30 +65,9 @@
},
"https://ns.adobe.com/experience/campaign/orchestrationAction": {
"title": "Action on step transition",
"type": "object",
"description": "Action taken during a step transition happening for an user in state machine",
"properties": {
"xdm:actionID": {
"title": "Action identifier",
"type": "string",
"format": "uri",
"description": "Unique identifier denoting the associated action."
},
"xdm:type": {
"title": "Action Type",
"type": "string",
"description": "The type of action to be performed.",
"meta:enum": {
"scheduled_notification": "This action type allows to specify scheduled notifications and wait for the notifications as incoming events for steps",
"http_call": "This action type is for a HTTP call on an external system",
"action_with_personalization": "This action type describes an action with personalization that will be resolved at runtime for each voyager instance",
"parameterized_action": "This action type describes an action with parameterization",
"send_journey_notification": "This action type is to send notification for another journey",
"acs_writer": "The ACS writer action performs REST calls to an Adobe campaign standard instance to write data",
"acs_message_center": "The ACS message center action performs REST calls to an Adobe campaign standard instance to send messages with Message Center"
}
}
}
"description":
"Action taken during a step transition happening for an user in state machine",
"$ref": "https://ns.adobe.com/experience/campaign/orchestration/experienceevent#/definitions/action"
},
"https://ns.adobe.com/experience/campaign/orchestrationExternalEvent": {
"title": "external event received",
Expand All @@ -97,35 +76,14 @@
},
"https://ns.adobe.com/experience/campaign/journey": {
"title": "Journey for users",
"type": "object",
"description": "Journey created by marketer for its users",
"properties": {
"@id": {
"title": "Journey unique identifier",
"type": "string",
"format": "uri-reference",
"description": "The unique identifier of the journey created by the marketer."
}
},
"required": [
"@id"
]
"$ref": "https://ns.adobe.com/experience/campaign/orchestration/experienceevent#/definitions/journey"
},
"https://ns.adobe.com/experience/campaign/journeyVersion": {
"title": "Journey version",
"type": "object",
"description": "Schema for describing the version of a journey, where version holds the state machine",
"properties": {
"@id": {
"title": "Journey version identifier",
"type": "string",
"format": "uri-reference",
"description": "The unique identifier denoting the version of journey on which the user is active"
}
},
"required": [
"@id"
]
"description":
"Schema for describing the version of a journey, where version holds the state machine",
"$ref": "https://ns.adobe.com/experience/campaign/orchestration/experienceevent#/definitions/journeyVersion"
}
}
}
Expand Down