Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Let's put it in a new json object keyed by `campaign`
- ```
- {
- "campaign": {
- "name": "",
- "content": "",
- "source": "",
- "term": ""
- }
- }
- ```
- -----------------------------------------------------
- Specs: mapping existing value -> new value
- `name`: name of the campaign. This is mapped from the "0" key
- value mapping:
- | 0 key value | new string value |
- |:--------------:|:---------------------:|
- | 1 | open_house |
- | 2 | price_change |
- | 3 | new_listed |
- | 4 | sold |
- | 5 | in_contract |
- | 6 | off_market_or_removed |
- | 7 | search_updates |
- | 8 | marketing |
- | 9 | building |
- | 10 | inferred |
- | otherwise | unknown |
- -----------------------------------------------------
- `content`: what's included in the push notification. (type of item)
- | number key | new value for content |
- |:----------:|:---------------------:|
- | 7 | search |
- | 1 | sale |
- | 2 | rental |
- | 3 | building |
- -----------------------------------------------------
- `source`: what triggered the push notification
- | 0 key value | new value for source |
- |:--------------------:|:--------------------:|
- | 8 | marketing |
- | 10 | inferred |
- | others | saved |
- -----------------------------------------------------
- `term`: the id of `content`
- | number key | new value for term |
- |:----------:|:------------------:|
- | 7 | :folder_entry_id |
- | 1 | :sale_id |
- | 2 | :rental_id |
- | 3 | :building_id |
- | otherwise | nil |
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement