3

I am making a demo application with the new xConnect.
I've got a .NET Core application that acts as a cash register to add experience data to xConnect.

Now i've come to the point that i want to add an interaction with some events. However i'm not sure how long to keep these interactions alive. I can't send the Interaction to xConnect after the first event because i won't be able to change it again.
Would it be best practice to save the Interaction in a cookie until all events are added or is there a better way to do this?

  • How does session relate to your real-world scenario (cash register) that you're trying to model? Wouldn't you want to save an xConnect interaction as soon as cash register operation is completed? – grg Nov 29 '17 at 9:38
  • Maybe the cash register is a bad example, but i've got multiple events like "enter store", "add item to cart", "checkout'. I'd like to have those in one interaction – mark DE Jong Nov 29 '17 at 9:47
  • Web interaction has a clearly defined lifetime - it's completed when web session expires. What about interactions that you're creating? What's their lifetime? If you are trying to model "session" in a physical store, then you need to know what triggers interaction start and interaction end. Is that done by store's staff, beacon, etc? For demo purposes I think it's fine to use Sitecore's Tracker and force web session to complete (e.g. by clicking a button) instead of waiting for it to expire. – grg Nov 29 '17 at 10:08
  • Okay, the checkout button would be the end of the line for the interaction. The last thing i was contemplating about is where to save the Interaction inbetween events. Because i have a .NET Core application i would have to send the entire Interaction to a Cookie because the controller that creates the Interaction gets disposed. (would saving a json it in a cookie be the best way?) – mark DE Jong Nov 29 '17 at 10:17
  • You can still use SessionState in asp.net mvc core by referencing a nuget package: social.technet.microsoft.com/wiki/contents/articles/… Hope that helps. – grg Nov 29 '17 at 11:58
3

Web interaction have a clearly defined lifetime - it's completed when web session expires. What about interactions that you're creating? What's their lifetime? If you are trying to model "a session" in a physical store, then you need to know what triggers the interaction start and the interaction end. Is that done by store's staff, beacon, etc? For demo purposes I think it's fine to use Asp .Net session to store interaction until it's considered finished and then save it to xConnect.

Session can be used for Asp.Net Core by referencing Microsoft.AspNetCore.Session package. Detailed description can be found here.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.