forked from BuildFire/sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
Export Locations Data
charkhaw edited this page May 4, 2023
·
4 revisions
We are going to add the capability for Business Aps user to export their Locations data and later on directly import them into their instances of our locations plugin.
- We should try to export as much possible of info out of their DB to be later on imported into Locations
- The exported data should be compatible with the import options available within the location plugin
For Locations, data will be fetched from pois table along with app_tabs only
Here is a table showing the Mapping between their Data tables and the Locations data
| Locations | BA | Comments |
|---|---|---|
| description | info | make sure to unescape the text. we should store only the body since they are returning a complete HTML document
|
| title | name | |
| address | address1 + ' ' + address2 | |
| formattedAddress | formatted_address | if empty return the following: address1 address2, city, state zip, country
|
| lat | lattitude | |
| lng | longitude | |
| subtitle | website | |
| listImage | app_tabs.tab_icon_new | The Images are stored in DB as relative path, we need to determine the prefix URL |
| categories | app_tabs.tab_label |
Since for a specific app_id and tab_id specified in pois table, we noticed that we don't find a record for them in app_tabs we are going to do a Left join so we get what we could of extra info (lavel for categories and i
The stored procedure will accept the BA app_id as parameter and returns all the location data as following
SELECT pois.*, app_tabs.tab_label, app_tabs.tab_icon_new
FROM pois
LEFT JOIN app_tabs ON pois.app_id = app_tabs.id
WHERE pois.app_id = app_id- When Import Location is selected, the UI should includes a section that provides a link to the Location import / Export Help article
- Data are returned as it is from the API, and the filtration should occur inside the portal to match Location plugin Import/Export CSV Format
- Make a separate file to Filter the data,
locations.jsand addmapBALocationsData()into it
- An extensive testing should be done to cover all scenarios and to check any malformed data we may be unaware of