Last active
May 3, 2017 09:17
-
-
Save sorenmalling/aafedd17c519d7fe349cbb12c9d6a7ab to your computer and use it in GitHub Desktop.
First draft of rule configuration
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
| { | |
| "event": { | |
| "type": "UserHasSignedUp" | |
| }, | |
| "conditions": [{ | |
| "type": "DateRange", | |
| "parameters": { | |
| "startDateAndTime": "01/12/2017", | |
| "endDateAndTime": "21/12/2017" | |
| } | |
| }], | |
| "actions": [{ | |
| "type": "SendDiscoutCodeEmail", | |
| "parameters": { | |
| "email": "{event.parameters.email}" | |
| } | |
| }] | |
| } |
Author
@sorenmalling Nice one. Just two (more or less random comments):
- JSON is probably fine as serialization format, but it should be validated somehow (e.g. you have a typo above that would only be detected during runtime otherwise - if at all)
- Condition != Validation. I wouldn't mix up the two and introduce a new
ConditionInterfaceinstead
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is translatable into a Object structure based upon the ruler/ruler package and possible to be compiled into a user interface.
The format above is considered the persisted data