SlideShare a Scribd company logo
1 of 51
Leveraging Geographic
  Data in SugarCRM
About the Speaker
                        Asa
                        Kusuma
• Intern at Milsoft Utility Solutions
• Sophomore at Abilene Christian University
• Twitter: asakusuma
• www.asakusuma.com
Geographic Data:
What’s the Big Deal?
photo by gerlos




Know Your Customers
Reaching the End Goal

New     New CRM           Create
Data    Capabilities      Visuals



Old      Filter         Insight into
Data     Data          Customer Base
The End Goal Expanded
                            photo by eBeam



•   Target customers

•   Streamline analysis

•   Get the “Big Picture”

•   Look good in meetings

•   Capitalize on data
photo by eBeam




Concept is simple
photo by Dizzy Girl




Implementation is Messy
The Case Study
About Milsoft
•   We make software for
    utility companies

•   Headquarters in
    Abilene, TX

•   Over 1,000 customers,
    US + International


                            photo by philipbouchard
Our needs at Milsoft
• Send geographic-sensitive data to customers
 • Marketing
 • Workshops
• Inform decision makers
• Streamline meetings
• Do it all in SugarCRM
Bad
Good
The Old Way
1. Export SugarCRM data
2. Cleanup data
3. Import data into 3rd party software
4. Filter data or generate visual
5. Cross fingers
6. Import data back into SugarCRM
The New Way

1. Filter data or create visual in SugarCRM
2. Laugh at people doing it the old way
Steps to Success
1. Extend your data
  • Add coordinates to Accounts
2. Create data filtering capabilities
  • Add geographic filters for Reports
3. Create visuals
  • Link your Accounts with Google Maps
  • Link your Reports with Google Maps
Solutions vs. Hacks
SIMPLICITY
Blend In
Guidelines

• Permanent, scalable solutions, not hacks
• If it’s not simple, it won’t be used
• Insert new features into existing workflow
• Complement and extend existing features
Checkout the Code
asakusuma.com/sugarcon
Step 1:
Add Geographic Data
• Get a Google Maps API Key
• Create custom fields
• Create script
 • Connect to database
 • Add coordinates to each account
• Run script (takes a long time)
Create Custom Fields
Admin > Studio > Accounts > Fields > Add Field

 • Add fields to store latitude & longitude
 • Datatype: Decimal
 • Uncheck “Required Field”
 • Check “Reportable”
 • Populate fields using address + Google Maps
Create Script
• Connect to SugarCRM database
 • Invoke config.php (don’t hardcode)
• Retrieve and loop through Accounts
 • Send address to Google Maps
 • Receive Latitude and Longitude
 • Record coordinates
Get coordinates


Save coordinates
Now What?

• Accounts with an address have coordinates
• Do stuff with the coordinates
 • Filter Accounts with Reports
 • Put your Accounts on a map
 • Put your filtered Accounts on a map
Filtering in Reports
• Select Accounts within a certain distance of
  a postal code
• Add functionality to Reports
Code the Filter

1. Create the label string
2. Associate the label string with a function
3. Create the function
4. Add the extra text inputs
5. Force a JOIN with accounts_cstm
Create the String Label




modules/Reports/language/en_us.lang.php
Associate Label with Function




      modules/Reports/templates/
    templates_modules_defs_js.php
Create the Function



                           Get postal code coordinates
                                          Filter query


include/generic/SugarWidgets/SugarWidgetReportField.php
               (queryFilterWithin_Radius())
Add Extra Text Inputs




                                  Add inputs




  include/javascript/reports.js
Add Extra Text Inputs (cont.)
                                  2 new arguments

                             Set default input size

                                Add label




include/javascript/reports.js (addFilterInputText())
Force the JOIN
                          Link to accounts_cstm




• Custom fields are stored in accounts_cstm
• JOIN combines accounts and accounts_cstm
modules/Reports/Reports.php (create_from())
Radius
     Distance   Radius Center
                (Postal Code)



The Result
Make a Simple Map
Code the Map

1. Connect to the database
2. Pull Account coordinates
3. Pass data from PHP to JavaScript
4. Plot points on the Google Map
Setup the Map



                   Connect to database




      Import jQuery and Google Map stuff

map.php (in the root directory)
Display the Map


                     Echo out data as
                     a JavaScript array


                   Plot points on the map



map.php (in the root directory)
The Result
nifty link




Put it all together
Data Path
          Report ID
Report                           Map


                      Report            Data
                        ID             Points
         Query

                               Database
Create Query Retrieval Function
                                 Check for
                            Lat & Long columns


                          Add Lat & Long columns




                        Build Query

                   Return Query
modules/Reports/Reports.php (execute_query())
Link From Report to Map




                    Create link

modules/Reports/Reports.php (execute_query())
Prepare the Data for the Map




                              Receive Report ID

Create a Report
                    Produce MySQL query

              modules/Reports/map.php
Display the Map

                 Package account
                    as a point



                 Initialize Map

                  Plot data
                   on Map

modules/Reports/map.php
click here...




Put it all together
The Final Result
Try This At Home
• Protect your data
• Work out the kinks
 • Issues with editing Reports
 • Issues with multi-module Reports
• Code Snippets at:
  http://www.asakusuma.com/sugarcon
• Be the envy of your next meeting
photo by gerlos




Know Your Customers

More Related Content

What's hot

Producing Standardized Data Using a Master FME Workspace
Producing Standardized Data Using a Master FME WorkspaceProducing Standardized Data Using a Master FME Workspace
Producing Standardized Data Using a Master FME WorkspaceSafe Software
 
Visualizing Data in a Web Browser with Cesium ion & FME
Visualizing Data in a Web Browser with Cesium ion & FMEVisualizing Data in a Web Browser with Cesium ion & FME
Visualizing Data in a Web Browser with Cesium ion & FMESafe Software
 
Karnataka Geospatial Experience FME World Tour 2017 India
Karnataka Geospatial Experience FME World Tour 2017 IndiaKarnataka Geospatial Experience FME World Tour 2017 India
Karnataka Geospatial Experience FME World Tour 2017 IndiaRaghavendran S
 
Tools for Visualizing Geospatial Data in a Web Browser
Tools for Visualizing Geospatial Data in a Web BrowserTools for Visualizing Geospatial Data in a Web Browser
Tools for Visualizing Geospatial Data in a Web BrowserSafe Software
 
Eugene Wabomnor Bi Portfolio
Eugene Wabomnor Bi PortfolioEugene Wabomnor Bi Portfolio
Eugene Wabomnor Bi Portfolioi661e21
 
5 Tips for Integrating CAD Data with Esri ArcGIS
5 Tips for Integrating CAD Data with Esri ArcGIS5 Tips for Integrating CAD Data with Esri ArcGIS
5 Tips for Integrating CAD Data with Esri ArcGISSafe Software
 
Weather data meets ibm cloud. part 3 transformation and aggregation of weat...
Weather data meets ibm cloud. part 3   transformation and aggregation of weat...Weather data meets ibm cloud. part 3   transformation and aggregation of weat...
Weather data meets ibm cloud. part 3 transformation and aggregation of weat...Einar Karlsen
 
Transforming AutoCAD Data to Smallworld with FME
Transforming AutoCAD Data to Smallworld with FMETransforming AutoCAD Data to Smallworld with FME
Transforming AutoCAD Data to Smallworld with FMESafe Software
 
SAP BO ONLINE TRAINING
SAP BO ONLINE TRAININGSAP BO ONLINE TRAINING
SAP BO ONLINE TRAININGAnusha GOT
 
MicroStation DGN: How to Integrate CAD and GIS
MicroStation DGN: How to Integrate CAD and GISMicroStation DGN: How to Integrate CAD and GIS
MicroStation DGN: How to Integrate CAD and GISSafe Software
 
Power View and the Cube
Power View and the CubePower View and the Cube
Power View and the CubeRégis Baccaro
 
How to Create a ArcGIS Story Map Final Presentation
How to Create a ArcGIS Story Map Final Presentation How to Create a ArcGIS Story Map Final Presentation
How to Create a ArcGIS Story Map Final Presentation Kathryn Cannon
 
Dsm Presentation
Dsm PresentationDsm Presentation
Dsm Presentationrichoe
 
Processing Building Plans Faster and More Thoroughly using FME Server
Processing Building Plans Faster and More Thoroughly using FME ServerProcessing Building Plans Faster and More Thoroughly using FME Server
Processing Building Plans Faster and More Thoroughly using FME ServerSafe Software
 
Integrating Web and Business Data
Integrating Web and Business DataIntegrating Web and Business Data
Integrating Web and Business DataSafe Software
 
Deep Dive into FME Desktop 2018
Deep Dive into FME Desktop 2018Deep Dive into FME Desktop 2018
Deep Dive into FME Desktop 2018Safe Software
 
Automating and Scheduling Data Usage and Reporting
Automating and Scheduling Data Usage and Reporting Automating and Scheduling Data Usage and Reporting
Automating and Scheduling Data Usage and Reporting Safe Software
 
How to create an InfoCube
How to create an InfoCubeHow to create an InfoCube
How to create an InfoCubeMarcelo Honores
 

What's hot (20)

Producing Standardized Data Using a Master FME Workspace
Producing Standardized Data Using a Master FME WorkspaceProducing Standardized Data Using a Master FME Workspace
Producing Standardized Data Using a Master FME Workspace
 
Visualizing Data in a Web Browser with Cesium ion & FME
Visualizing Data in a Web Browser with Cesium ion & FMEVisualizing Data in a Web Browser with Cesium ion & FME
Visualizing Data in a Web Browser with Cesium ion & FME
 
Karnataka Geospatial Experience FME World Tour 2017 India
Karnataka Geospatial Experience FME World Tour 2017 IndiaKarnataka Geospatial Experience FME World Tour 2017 India
Karnataka Geospatial Experience FME World Tour 2017 India
 
Tools for Visualizing Geospatial Data in a Web Browser
Tools for Visualizing Geospatial Data in a Web BrowserTools for Visualizing Geospatial Data in a Web Browser
Tools for Visualizing Geospatial Data in a Web Browser
 
Eugene Wabomnor Bi Portfolio
Eugene Wabomnor Bi PortfolioEugene Wabomnor Bi Portfolio
Eugene Wabomnor Bi Portfolio
 
5 Tips for Integrating CAD Data with Esri ArcGIS
5 Tips for Integrating CAD Data with Esri ArcGIS5 Tips for Integrating CAD Data with Esri ArcGIS
5 Tips for Integrating CAD Data with Esri ArcGIS
 
Weather data meets ibm cloud. part 3 transformation and aggregation of weat...
Weather data meets ibm cloud. part 3   transformation and aggregation of weat...Weather data meets ibm cloud. part 3   transformation and aggregation of weat...
Weather data meets ibm cloud. part 3 transformation and aggregation of weat...
 
From Excel hero to Power BI champion
From Excel hero to Power BI championFrom Excel hero to Power BI champion
From Excel hero to Power BI champion
 
Your Data and FME
Your Data and FMEYour Data and FME
Your Data and FME
 
Transforming AutoCAD Data to Smallworld with FME
Transforming AutoCAD Data to Smallworld with FMETransforming AutoCAD Data to Smallworld with FME
Transforming AutoCAD Data to Smallworld with FME
 
SAP BO ONLINE TRAINING
SAP BO ONLINE TRAININGSAP BO ONLINE TRAINING
SAP BO ONLINE TRAINING
 
MicroStation DGN: How to Integrate CAD and GIS
MicroStation DGN: How to Integrate CAD and GISMicroStation DGN: How to Integrate CAD and GIS
MicroStation DGN: How to Integrate CAD and GIS
 
Power View and the Cube
Power View and the CubePower View and the Cube
Power View and the Cube
 
How to Create a ArcGIS Story Map Final Presentation
How to Create a ArcGIS Story Map Final Presentation How to Create a ArcGIS Story Map Final Presentation
How to Create a ArcGIS Story Map Final Presentation
 
Dsm Presentation
Dsm PresentationDsm Presentation
Dsm Presentation
 
Processing Building Plans Faster and More Thoroughly using FME Server
Processing Building Plans Faster and More Thoroughly using FME ServerProcessing Building Plans Faster and More Thoroughly using FME Server
Processing Building Plans Faster and More Thoroughly using FME Server
 
Integrating Web and Business Data
Integrating Web and Business DataIntegrating Web and Business Data
Integrating Web and Business Data
 
Deep Dive into FME Desktop 2018
Deep Dive into FME Desktop 2018Deep Dive into FME Desktop 2018
Deep Dive into FME Desktop 2018
 
Automating and Scheduling Data Usage and Reporting
Automating and Scheduling Data Usage and Reporting Automating and Scheduling Data Usage and Reporting
Automating and Scheduling Data Usage and Reporting
 
How to create an InfoCube
How to create an InfoCubeHow to create an InfoCube
How to create an InfoCube
 

Similar to Leveraging Geographic Data in SugarCRM

Serverless ML Workshop with Hopsworks at PyData Seattle
Serverless ML Workshop with Hopsworks at PyData SeattleServerless ML Workshop with Hopsworks at PyData Seattle
Serverless ML Workshop with Hopsworks at PyData SeattleJim Dowling
 
Ibm cognos-build-data-marts-reports-and-dashboards
Ibm cognos-build-data-marts-reports-and-dashboardsIbm cognos-build-data-marts-reports-and-dashboards
Ibm cognos-build-data-marts-reports-and-dashboardsAmit Sharma
 
PBS&J Program Control Services
PBS&J Program Control ServicesPBS&J Program Control Services
PBS&J Program Control ServicesGAguila
 
From Data to Maps to Docs: Turn Days into Minutes with Automated Integration
From Data to Maps to Docs: Turn Days into Minutes with Automated IntegrationFrom Data to Maps to Docs: Turn Days into Minutes with Automated Integration
From Data to Maps to Docs: Turn Days into Minutes with Automated IntegrationSafe Software
 
Applying linear regression and predictive analytics
Applying linear regression and predictive analyticsApplying linear regression and predictive analytics
Applying linear regression and predictive analyticsMariaDB plc
 
Cross-Tier Application and Data Partitioning of Web Applications for Hybrid C...
Cross-Tier Application and Data Partitioning of Web Applications for Hybrid C...Cross-Tier Application and Data Partitioning of Web Applications for Hybrid C...
Cross-Tier Application and Data Partitioning of Web Applications for Hybrid C...nimak
 
SAP BO ONLINE TRAINING
SAP BO ONLINE TRAININGSAP BO ONLINE TRAINING
SAP BO ONLINE TRAININGMadhukar Reddy
 
MSBI Online Training in Hyderabad
MSBI Online Training in HyderabadMSBI Online Training in Hyderabad
MSBI Online Training in Hyderabadunited global soft
 
Why and How SmartNews uses SaaS?
Why and How SmartNews uses SaaS?Why and How SmartNews uses SaaS?
Why and How SmartNews uses SaaS?Takumi Sakamoto
 
rough-work.pptx
rough-work.pptxrough-work.pptx
rough-work.pptxsharpan
 
Cherokee nation 2 day AIAD & DIAD - App in a day and Dashboard in day
Cherokee nation 2 day AIAD & DIAD - App in a day and Dashboard in dayCherokee nation 2 day AIAD & DIAD - App in a day and Dashboard in day
Cherokee nation 2 day AIAD & DIAD - App in a day and Dashboard in dayVishal Pawar
 
Big Data Day LA 2015 - Scalable and High-Performance Analytics with Distribut...
Big Data Day LA 2015 - Scalable and High-Performance Analytics with Distribut...Big Data Day LA 2015 - Scalable and High-Performance Analytics with Distribut...
Big Data Day LA 2015 - Scalable and High-Performance Analytics with Distribut...Data Con LA
 
SPSRED - BCS, REST ans Subscriptions
SPSRED - BCS, REST ans SubscriptionsSPSRED - BCS, REST ans Subscriptions
SPSRED - BCS, REST ans SubscriptionsChris Givens
 
Harnessing Configuration for Web GIS Application Development
Harnessing Configuration for Web GIS Application DevelopmentHarnessing Configuration for Web GIS Application Development
Harnessing Configuration for Web GIS Application DevelopmentGeCo in the Rockies
 
2009 GAAC Summit Kristoffer Ewald
2009 GAAC Summit Kristoffer Ewald2009 GAAC Summit Kristoffer Ewald
2009 GAAC Summit Kristoffer EwaldGuava UK
 
I Love APIs Europe 2015: Developer Sessions
I Love APIs Europe 2015: Developer SessionsI Love APIs Europe 2015: Developer Sessions
I Love APIs Europe 2015: Developer SessionsApigee | Google Cloud
 

Similar to Leveraging Geographic Data in SugarCRM (20)

PowerApps community call-March 2019
PowerApps community call-March 2019PowerApps community call-March 2019
PowerApps community call-March 2019
 
Serverless ML Workshop with Hopsworks at PyData Seattle
Serverless ML Workshop with Hopsworks at PyData SeattleServerless ML Workshop with Hopsworks at PyData Seattle
Serverless ML Workshop with Hopsworks at PyData Seattle
 
Ibm cognos-build-data-marts-reports-and-dashboards
Ibm cognos-build-data-marts-reports-and-dashboardsIbm cognos-build-data-marts-reports-and-dashboards
Ibm cognos-build-data-marts-reports-and-dashboards
 
PBS&J Program Control Services
PBS&J Program Control ServicesPBS&J Program Control Services
PBS&J Program Control Services
 
From Data to Maps to Docs: Turn Days into Minutes with Automated Integration
From Data to Maps to Docs: Turn Days into Minutes with Automated IntegrationFrom Data to Maps to Docs: Turn Days into Minutes with Automated Integration
From Data to Maps to Docs: Turn Days into Minutes with Automated Integration
 
Applying linear regression and predictive analytics
Applying linear regression and predictive analyticsApplying linear regression and predictive analytics
Applying linear regression and predictive analytics
 
Cross-Tier Application and Data Partitioning of Web Applications for Hybrid C...
Cross-Tier Application and Data Partitioning of Web Applications for Hybrid C...Cross-Tier Application and Data Partitioning of Web Applications for Hybrid C...
Cross-Tier Application and Data Partitioning of Web Applications for Hybrid C...
 
SAP BO ONLINE TRAINING
SAP BO ONLINE TRAININGSAP BO ONLINE TRAINING
SAP BO ONLINE TRAINING
 
MSBI Online Training in Hyderabad
MSBI Online Training in HyderabadMSBI Online Training in Hyderabad
MSBI Online Training in Hyderabad
 
MSBI Online Training
MSBI Online Training MSBI Online Training
MSBI Online Training
 
MSBI Online Training in India
MSBI Online Training in IndiaMSBI Online Training in India
MSBI Online Training in India
 
Xamarin microsoft graph
Xamarin microsoft graphXamarin microsoft graph
Xamarin microsoft graph
 
Why and How SmartNews uses SaaS?
Why and How SmartNews uses SaaS?Why and How SmartNews uses SaaS?
Why and How SmartNews uses SaaS?
 
rough-work.pptx
rough-work.pptxrough-work.pptx
rough-work.pptx
 
Cherokee nation 2 day AIAD & DIAD - App in a day and Dashboard in day
Cherokee nation 2 day AIAD & DIAD - App in a day and Dashboard in dayCherokee nation 2 day AIAD & DIAD - App in a day and Dashboard in day
Cherokee nation 2 day AIAD & DIAD - App in a day and Dashboard in day
 
Big Data Day LA 2015 - Scalable and High-Performance Analytics with Distribut...
Big Data Day LA 2015 - Scalable and High-Performance Analytics with Distribut...Big Data Day LA 2015 - Scalable and High-Performance Analytics with Distribut...
Big Data Day LA 2015 - Scalable and High-Performance Analytics with Distribut...
 
SPSRED - BCS, REST ans Subscriptions
SPSRED - BCS, REST ans SubscriptionsSPSRED - BCS, REST ans Subscriptions
SPSRED - BCS, REST ans Subscriptions
 
Harnessing Configuration for Web GIS Application Development
Harnessing Configuration for Web GIS Application DevelopmentHarnessing Configuration for Web GIS Application Development
Harnessing Configuration for Web GIS Application Development
 
2009 GAAC Summit Kristoffer Ewald
2009 GAAC Summit Kristoffer Ewald2009 GAAC Summit Kristoffer Ewald
2009 GAAC Summit Kristoffer Ewald
 
I Love APIs Europe 2015: Developer Sessions
I Love APIs Europe 2015: Developer SessionsI Love APIs Europe 2015: Developer Sessions
I Love APIs Europe 2015: Developer Sessions
 

Recently uploaded

Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...FIDO Alliance
 
ECS 2024 Teams Premium - Pretty Secure
ECS 2024   Teams Premium - Pretty SecureECS 2024   Teams Premium - Pretty Secure
ECS 2024 Teams Premium - Pretty SecureFemke de Vroome
 
Where to Learn More About FDO _ Richard at FIDO Alliance.pdf
Where to Learn More About FDO _ Richard at FIDO Alliance.pdfWhere to Learn More About FDO _ Richard at FIDO Alliance.pdf
Where to Learn More About FDO _ Richard at FIDO Alliance.pdfFIDO Alliance
 
Free and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
Free and Effective: Making Flows Publicly Accessible, Yumi IbrahimzadeFree and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
Free and Effective: Making Flows Publicly Accessible, Yumi IbrahimzadeCzechDreamin
 
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdfThe Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdfFIDO Alliance
 
WSO2CONMay2024OpenSourceConferenceDebrief.pptx
WSO2CONMay2024OpenSourceConferenceDebrief.pptxWSO2CONMay2024OpenSourceConferenceDebrief.pptx
WSO2CONMay2024OpenSourceConferenceDebrief.pptxJennifer Lim
 
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdfHow Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdfFIDO Alliance
 
THE BEST IPTV in GERMANY for 2024: IPTVreel
THE BEST IPTV in  GERMANY for 2024: IPTVreelTHE BEST IPTV in  GERMANY for 2024: IPTVreel
THE BEST IPTV in GERMANY for 2024: IPTVreelreely ones
 
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...FIDO Alliance
 
The Metaverse: Are We There Yet?
The  Metaverse:    Are   We  There  Yet?The  Metaverse:    Are   We  There  Yet?
The Metaverse: Are We There Yet?Mark Billinghurst
 
A Business-Centric Approach to Design System Strategy
A Business-Centric Approach to Design System StrategyA Business-Centric Approach to Design System Strategy
A Business-Centric Approach to Design System StrategyUXDXConf
 
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdfLinux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdfFIDO Alliance
 
Speed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in MinutesSpeed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in Minutesconfluent
 
Top 10 Symfony Development Companies 2024
Top 10 Symfony Development Companies 2024Top 10 Symfony Development Companies 2024
Top 10 Symfony Development Companies 2024TopCSSGallery
 
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)Julian Hyde
 
Designing for Hardware Accessibility at Comcast
Designing for Hardware Accessibility at ComcastDesigning for Hardware Accessibility at Comcast
Designing for Hardware Accessibility at ComcastUXDXConf
 
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...CzechDreamin
 
Connecting the Dots in Product Design at KAYAK
Connecting the Dots in Product Design at KAYAKConnecting the Dots in Product Design at KAYAK
Connecting the Dots in Product Design at KAYAKUXDXConf
 
Optimizing NoSQL Performance Through Observability
Optimizing NoSQL Performance Through ObservabilityOptimizing NoSQL Performance Through Observability
Optimizing NoSQL Performance Through ObservabilityScyllaDB
 
Strategic AI Integration in Engineering Teams
Strategic AI Integration in Engineering TeamsStrategic AI Integration in Engineering Teams
Strategic AI Integration in Engineering TeamsUXDXConf
 

Recently uploaded (20)

Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
 
ECS 2024 Teams Premium - Pretty Secure
ECS 2024   Teams Premium - Pretty SecureECS 2024   Teams Premium - Pretty Secure
ECS 2024 Teams Premium - Pretty Secure
 
Where to Learn More About FDO _ Richard at FIDO Alliance.pdf
Where to Learn More About FDO _ Richard at FIDO Alliance.pdfWhere to Learn More About FDO _ Richard at FIDO Alliance.pdf
Where to Learn More About FDO _ Richard at FIDO Alliance.pdf
 
Free and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
Free and Effective: Making Flows Publicly Accessible, Yumi IbrahimzadeFree and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
Free and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
 
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdfThe Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
 
WSO2CONMay2024OpenSourceConferenceDebrief.pptx
WSO2CONMay2024OpenSourceConferenceDebrief.pptxWSO2CONMay2024OpenSourceConferenceDebrief.pptx
WSO2CONMay2024OpenSourceConferenceDebrief.pptx
 
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdfHow Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
 
THE BEST IPTV in GERMANY for 2024: IPTVreel
THE BEST IPTV in  GERMANY for 2024: IPTVreelTHE BEST IPTV in  GERMANY for 2024: IPTVreel
THE BEST IPTV in GERMANY for 2024: IPTVreel
 
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
 
The Metaverse: Are We There Yet?
The  Metaverse:    Are   We  There  Yet?The  Metaverse:    Are   We  There  Yet?
The Metaverse: Are We There Yet?
 
A Business-Centric Approach to Design System Strategy
A Business-Centric Approach to Design System StrategyA Business-Centric Approach to Design System Strategy
A Business-Centric Approach to Design System Strategy
 
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdfLinux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
 
Speed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in MinutesSpeed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in Minutes
 
Top 10 Symfony Development Companies 2024
Top 10 Symfony Development Companies 2024Top 10 Symfony Development Companies 2024
Top 10 Symfony Development Companies 2024
 
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
 
Designing for Hardware Accessibility at Comcast
Designing for Hardware Accessibility at ComcastDesigning for Hardware Accessibility at Comcast
Designing for Hardware Accessibility at Comcast
 
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
 
Connecting the Dots in Product Design at KAYAK
Connecting the Dots in Product Design at KAYAKConnecting the Dots in Product Design at KAYAK
Connecting the Dots in Product Design at KAYAK
 
Optimizing NoSQL Performance Through Observability
Optimizing NoSQL Performance Through ObservabilityOptimizing NoSQL Performance Through Observability
Optimizing NoSQL Performance Through Observability
 
Strategic AI Integration in Engineering Teams
Strategic AI Integration in Engineering TeamsStrategic AI Integration in Engineering Teams
Strategic AI Integration in Engineering Teams
 

Leveraging Geographic Data in SugarCRM

  • 1. Leveraging Geographic Data in SugarCRM
  • 2. About the Speaker Asa Kusuma • Intern at Milsoft Utility Solutions • Sophomore at Abilene Christian University • Twitter: asakusuma • www.asakusuma.com
  • 4. photo by gerlos Know Your Customers
  • 5. Reaching the End Goal New New CRM Create Data Capabilities Visuals Old Filter Insight into Data Data Customer Base
  • 6. The End Goal Expanded photo by eBeam • Target customers • Streamline analysis • Get the “Big Picture” • Look good in meetings • Capitalize on data
  • 8. photo by Dizzy Girl Implementation is Messy
  • 10. About Milsoft • We make software for utility companies • Headquarters in Abilene, TX • Over 1,000 customers, US + International photo by philipbouchard
  • 11. Our needs at Milsoft • Send geographic-sensitive data to customers • Marketing • Workshops • Inform decision makers • Streamline meetings • Do it all in SugarCRM
  • 12. Bad
  • 13. Good
  • 14. The Old Way 1. Export SugarCRM data 2. Cleanup data 3. Import data into 3rd party software 4. Filter data or generate visual 5. Cross fingers 6. Import data back into SugarCRM
  • 15. The New Way 1. Filter data or create visual in SugarCRM 2. Laugh at people doing it the old way
  • 16. Steps to Success 1. Extend your data • Add coordinates to Accounts 2. Create data filtering capabilities • Add geographic filters for Reports 3. Create visuals • Link your Accounts with Google Maps • Link your Reports with Google Maps
  • 20. Guidelines • Permanent, scalable solutions, not hacks • If it’s not simple, it won’t be used • Insert new features into existing workflow • Complement and extend existing features
  • 22. Step 1: Add Geographic Data • Get a Google Maps API Key • Create custom fields • Create script • Connect to database • Add coordinates to each account • Run script (takes a long time)
  • 23. Create Custom Fields Admin > Studio > Accounts > Fields > Add Field • Add fields to store latitude & longitude • Datatype: Decimal • Uncheck “Required Field” • Check “Reportable” • Populate fields using address + Google Maps
  • 24.
  • 25. Create Script • Connect to SugarCRM database • Invoke config.php (don’t hardcode) • Retrieve and loop through Accounts • Send address to Google Maps • Receive Latitude and Longitude • Record coordinates
  • 27. Now What? • Accounts with an address have coordinates • Do stuff with the coordinates • Filter Accounts with Reports • Put your Accounts on a map • Put your filtered Accounts on a map
  • 28. Filtering in Reports • Select Accounts within a certain distance of a postal code • Add functionality to Reports
  • 29. Code the Filter 1. Create the label string 2. Associate the label string with a function 3. Create the function 4. Add the extra text inputs 5. Force a JOIN with accounts_cstm
  • 30. Create the String Label modules/Reports/language/en_us.lang.php
  • 31. Associate Label with Function modules/Reports/templates/ templates_modules_defs_js.php
  • 32. Create the Function Get postal code coordinates Filter query include/generic/SugarWidgets/SugarWidgetReportField.php (queryFilterWithin_Radius())
  • 33. Add Extra Text Inputs Add inputs include/javascript/reports.js
  • 34. Add Extra Text Inputs (cont.) 2 new arguments Set default input size Add label include/javascript/reports.js (addFilterInputText())
  • 35. Force the JOIN Link to accounts_cstm • Custom fields are stored in accounts_cstm • JOIN combines accounts and accounts_cstm modules/Reports/Reports.php (create_from())
  • 36. Radius Distance Radius Center (Postal Code) The Result
  • 38. Code the Map 1. Connect to the database 2. Pull Account coordinates 3. Pass data from PHP to JavaScript 4. Plot points on the Google Map
  • 39. Setup the Map Connect to database Import jQuery and Google Map stuff map.php (in the root directory)
  • 40. Display the Map Echo out data as a JavaScript array Plot points on the map map.php (in the root directory)
  • 42. nifty link Put it all together
  • 43. Data Path Report ID Report Map Report Data ID Points Query Database
  • 44. Create Query Retrieval Function Check for Lat & Long columns Add Lat & Long columns Build Query Return Query modules/Reports/Reports.php (execute_query())
  • 45. Link From Report to Map Create link modules/Reports/Reports.php (execute_query())
  • 46. Prepare the Data for the Map Receive Report ID Create a Report Produce MySQL query modules/Reports/map.php
  • 47. Display the Map Package account as a point Initialize Map Plot data on Map modules/Reports/map.php
  • 48. click here... Put it all together
  • 50. Try This At Home • Protect your data • Work out the kinks • Issues with editing Reports • Issues with multi-module Reports • Code Snippets at: http://www.asakusuma.com/sugarcon • Be the envy of your next meeting
  • 51. photo by gerlos Know Your Customers

Editor's Notes

  1. milsoft computer science major open source web development and clean web design
  2. If it’s not simple, users won’t use