Guest User

Untitled

a guest
Oct 23rd, 2019
99
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Let's put it in a new json object keyed by `campaign`
  2.  
  3.  
  4. ```
  5. {
  6. "campaign": {
  7. "name": "",
  8. "content": "",
  9. "source": "",
  10. "term": ""
  11. }
  12. }
  13. ```
  14. -----------------------------------------------------
  15.  
  16. Specs: mapping existing value -> new value
  17.  
  18. `name`: name of the campaign. This is mapped from the "0" key
  19. value mapping:
  20.  
  21. | 0 key value | new string value |
  22. |:--------------:|:---------------------:|
  23. | 1 | open_house |
  24. | 2 | price_change |
  25. | 3 | new_listed |
  26. | 4 | sold |
  27. | 5 | in_contract |
  28. | 6 | off_market_or_removed |
  29. | 7 | search_updates |
  30. | 8 | marketing |
  31. | 9 | building |
  32. | 10 | inferred |
  33. | otherwise | unknown |
  34.  
  35. -----------------------------------------------------
  36.  
  37. `content`: what's included in the push notification. (type of item)
  38.  
  39. | number key | new value for content |
  40. |:----------:|:---------------------:|
  41. | 7 | search |
  42. | 1 | sale |
  43. | 2 | rental |
  44. | 3 | building |
  45.  
  46. -----------------------------------------------------
  47.  
  48. `source`: what triggered the push notification
  49.  
  50. | 0 key value | new value for source |
  51. |:--------------------:|:--------------------:|
  52. | 8 | marketing |
  53. | 10 | inferred |
  54. | others | saved |
  55.  
  56. -----------------------------------------------------
  57.  
  58. `term`: the id of `content`
  59.  
  60. | number key | new value for term |
  61. |:----------:|:------------------:|
  62. | 7 | :folder_entry_id |
  63. | 1 | :sale_id |
  64. | 2 | :rental_id |
  65. | 3 | :building_id |
  66. | otherwise | nil |
RAW Paste Data