Last active
August 29, 2015 14:06
-
-
Save johnnadeau/d58a7ca57d6f922a6c61 to your computer and use it in GitHub Desktop.
Just a roughed out example of the structure we can use for the trigger system...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
namespace Trigger | |
{ | |
public class TriggerEvent | |
{ | |
public int Id; | |
public TriggerEventType Type; | |
public DateTime EventDateTime; //UTC plz' | |
public int OrderId; | |
public Guid TransactionId; | |
public string EventData; //json object? would be the data | |
} | |
public enum TriggerEventType | |
{ | |
EmailClick = 0, | |
EmailOpen = 1, | |
EmailForward = 2, | |
//EmailUnopen = 3, | |
//EmailReply = 4, | |
EmailBounce = 5, | |
SMSReply = 6, | |
SMSBounce = 7, | |
VoiceHotKey = 8, | |
VoiceBounce = 9 | |
} | |
public class Trigger | |
{ | |
public int Id; | |
public bool Global; //flag if the trigger is a global trigger | |
//(ie. SMS replies should all pass through our system to be stored and checked for a 'Stop' request) | |
public int AccountId; | |
public int ContactId; | |
public in OrderId; | |
public List<TriggerEventType> TriggerEventTypes; //do we want to allow for multiple trigger event types to be associated with a trigger | |
public string WebhookUrl; //url we'll be posting to | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment