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

Conversation

ksradobe
Copy link
Contributor

What are the schemas that are affected by the issue

  1. extensions/adobe/experience/campaign/experienceevent
  2. extensions/adobe/experience/campaign/orchestration/reportingevent

What are examples of products that are impacted by the issue

Voyager
Campaign

"reportingevent" schema is having all the attributes which constitute a valid reporting event. Here certain attributes can be pulled out from reporting event and make them available to other experience event. (Ex: Here, "Orchestration Details" in Campaign experience event). This will increase the consumability of common orchestration properties.

Another change is to add "Delivery name" and "Campaign Name" which is kind of friendly identifier for the user to remember instead of simple integer id. Similarly "Delivery Label" is a descriptive name given to the marketing activity for making it easily searchable.

Few more changes:
changing action's type attribute to "actionType".(It is a breaking change)
ContainerID is an additional attribute that was added to campaign experience event.

@ksradobe
Copy link
Contributor Author

ksradobe commented Aug 16, 2018

@fmeschbe
PR640 has been reverted in PR470. So I just merged those 4-5 commits into one and cherry picked that one to create this PR. I also modified XDM schema as per your argument in PR640 (ie to eliminate journeyContext from orchestration/experienceEvent.xml). Can you review it and confirm your approval?

@fmeschbe
Copy link
Collaborator

Thanks @ksradobe.

According to @kstreeter he backed those changes out in PR #470 to be able to tag the v0.9.4 drop and open the discussion about the PR.

So this will probably be the basis for the discussion of how we want to include the features from PR #464 in the XDM proper.

@fmeschbe fmeschbe requested a review from kstreeter August 16, 2018 15:58
@ksradobe
Copy link
Contributor Author

@lrosenthol can you review this PR?

@lrosenthol
Copy link
Collaborator

@ksradobe it's not clear what I am supposed to review, since it seems that @kstreeter is making some changes based on the comment from @fmeschbe above...

@ksradobe
Copy link
Contributor Author

@lrosenthol
Changes which were merged into #464 has been been reverted by @kstreeter in #470. So I created this new PR to get back code of #464 into master again. It also had some more changes which are suggested by @fmeschbe

@kstreeter kstreeter added this to the 0.9.5 milestone Aug 23, 2018
},
"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

"@id": {
"title": "Journey unique identifier",
"type": "string",
"format": "uri",
Copy link
Collaborator

Choose a reason for hiding this comment

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

should this now be uri-reference?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I will change format to uri-reference but will it be an acceptable format for @id attribute? For @id attribute I always observed type as "string" and format as "uri". Is there no hard requirement for @id in terms of type and format?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@lrosenthol I changed @id's format from uri to uri-reference [observed similar usages in the master branch]

"@id": {
"title": "Journey version identifier",
"type": "string",
"format": "uri",
Copy link
Collaborator

Choose a reason for hiding this comment

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

should this now be uri-reference?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

"xdm:actionID": {
"title": "Action identifier",
"type": "string",
"format": "uri",
Copy link
Collaborator

Choose a reason for hiding this comment

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

should this now be uri-reference?

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
Copy link
Collaborator

We should be discussing the type of the xdm:id properties.

This PR currently defines them to be of type integer. This works very well with the current implementation of ACS which is very SQL centric. As such, this choice of type IMHO exposes this implementation detail into the exchange and data format.

As we move forward and ACS is being rewritten and redesigned around new and more modern design and architecture principles, I am pretty sure, those identifiers won't remain numbers but will become strings if not even URIs.

As such, I propose the xdm:id properties to be defined of type string.

This has the added benefit that this would align with the definition of properties named xdm:id elsewhere, for example the identity schema.

"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.

"xdm:deliveryName": {
"title": "Delivery Internal name",
"type": "string",
"description" : "Friendly identifier of the campaign activity which is originating this message."
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think the topic is that both the xdm:deliveryLabel and xdm:deliveryName are intended to be human readable. I think they should be consistently described as such.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

"type": "string",
"description" : "Human friendly name of the campaign activity which is originating this message."
},
"xdm:deliveryName": {
Copy link
Collaborator

Choose a reason for hiding this comment

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

I still think the term delivery is not needed here and in the xdm:deliveryLabel since they are part of the delivery schema/object.

Otherwise you could also make the case to call the ID field xdm:deliveryId.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

change from "name", "label" to deliveryName and "deliveryLabel" is requested in one of the review comments.
#464 (comment)

@@ -202,6 +212,11 @@
"title": "Campaign ID",
"type": "integer",
"description": "Identifier of the marketing campaign to which activity originating this message belongs to."
},
"xdm:campaignName": {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Same discussion here for xdm:campaignName as part of the campaign schema/object

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@ksradobe
Copy link
Contributor Author

@fmeschbe This PR itself is not introducing delivery and campaign "xdm:id" attribute. They we already merged quite some time back. IMHO we should tackle this change as part of new PR under new issue. If you required, I will create issue and assign it to the concern person

@ksradobe
Copy link
Contributor Author

ksradobe commented Aug 30, 2018

@fmeschbe, @lrosenthol created a separate PR to track this independent improvement #499.
Can you approve this PR?

@kstreeter kstreeter merged commit 6aae909 into adobe:master Aug 30, 2018
kstreeter added a commit that referenced this pull request Aug 30, 2018
@kstreeter
Copy link
Collaborator

This is now in. Please note that on master I added back the old xdm:type field and marked it as deprecated. That allows this PR to go in without a breaking change that will impact current projects.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants