adobe / xdm

Experience Data Model
Creative Commons Attribution 4.0 International
245 stars 319 forks source link

Add offer proposed and offerClicked fields to Campaign's ExperienceEvent extension. #248

Open saurabhere opened 6 years ago

saurabhere commented 6 years ago

This is blocked until offer schemas are merged. Currently under review at PR #245 . @dmitry-shkolnik and @jbeckert to inform when offer related schemas are ready and merged.

saurabhere commented 6 years ago

Tagging @cdegroot-adobe @dmitry-shkolnik,@jbeckert would it be possible for you to commit a basic schema for offer so that Campaign's use-cases are unblocked and then you can build upon the more complex things? Campaign requires the following properties:

  1. Offer (id and name)
  2. OfferPlacement (id and name)
  3. OfferActivity (id and name)

They will be used as part of 2 entities in Campaign's ExperienceEvent schema:

  1. OfferProposed: The number of offers that were shown to the user
  2. OfferClicked: The offer with which the user interacted.
jbeckert commented 6 years ago

Thanks for reminding us. We are about to add the new event to our PR. Like your event, the "decision"event will reference the entities you list. Those entities are already included in the PR #245

A word of caution, some of the information you listed is directly derived from the objects that are also linked and could be obtained by dereferencing those objects. If you build your ExperienceEvent schema beware of the redundancy and be sure you want those properties directly embedded. The necessary objects in each event are:

  1. OfferActivity (https://ns.adobe.com/experience/offer-management/offer-activity) linked by its "@id" (will be under extensions/adobe/experience/offer-management/offer-activity.schema.json)
  2. Offer, (https://ns.adobe.com/experience/offer-management/offer) linked by its "@id" (will be under extensions/adobe/experience/offer-management/offer.schema.json)

From the OfferActivity object the OfferPlacement is derived, see property "xdm:placement". The OfferPlacement is unique per activity but there are multiple OfferActivities referring to the placement. The same applies to the xdm:name in each of the entities.

There is a use case for embedding the information in the event even if it is redundant. It provides you with a snapshot in time of the state of OfferActivity and Offer when the event occurred. But then I wonder if you shouldn't embed several other things that can change in the state of the OfferActivity and Offer entities.