SlideShare una empresa de Scribd logo
1 de 27
Descargar para leer sin conexión
Salsa: Spicy CRM Integration for
Drupal-Powered Nonprofits
CapitalCamp
July 26, 2013
John Shortess
4Site Interactive Studios
“Salsa helps nonprofits build,
organize & engage a base of support
with tools to communicate, fundraise,
advocate & build community.”
Over 2,000 clients managing over
75 million supporters, including:
•  Electronic Frontier Foundation
•  Democratic Legislative Campaign Committee
•  League of Women Voters
•  Robert Wood Johnson Foundation
•  National Association of Court Appointed
Special Advocates (CASA)
Organize
• Supporter
• Signup page
• Event
Fundraise
• Donate page
• Donation
Communicate
• Questionnaire
• Email Blast
• Tell-a-friend Page
Advocate
• Petition
• Targeted Action
Salsa 101:
Modules & ‘Objects’
Mild Salsa:
Link to Salsa-Hosted Form
Medium Salsa:
Unauthenticated Forms
Medium Salsa:
Unauthenticated Forms
Medium Salsa:
Unauthenticated Forms
<script	
  src="http://sandbox.salsalabs.com/api/
flashMessageJS.sjs"	
  type="text/javascript"></script>	
  
	
  
<form	
  action="http://sandbox.salsalabs.com/save">	
  
	
  <input	
  type="hidden"	
  value="supporter"	
  name="object”	
  />	
  
	
  <input	
  type="hidden"	
  value="1234"	
  name="organization_KEY”	
  />	
  
	
  Your	
  email:	
  <input	
  type="text"	
  value=""	
  name="Email”	
  />	
  
	
  Your	
  ZIP	
  Code:	
  <input	
  type="text"	
  value=""	
  name=”Zip”	
  />	
  
	
  
	
  <input	
  type="hidden"	
  name="required"	
  value="Email,Zip"/>	
  
	
  
	
  <input	
  type="Submit"	
  value="Submit	
  Form”	
  />	
  
</form>	
  
Medium Salsa:
Unauthenticated Forms
Hot Salsa:
Salsa API and Salsa Entity
Salsa API module
Connects Drupal to Salsa’s RESTful API, to
read from or write to nearly any Salsa object
Salsa Entity module
Exposes Salsa objects as Drupal entities
Hot Salsa:
Salsa API and Salsa Entity
• Supporters
• Groups
• Signup pages
• Donate pages
• Questionnaires
• Tell-a-friend pages
• Events
• Petitions
• Targeted Actions
• Unsubscribe pages
Supported Objects (so far):
Hot Salsa:
Salsa API and Salsa Entity
•  Forms rendered using FAPI – themeable,
alterable
•  Entity Reference integration
•  Rules integration
•  Basic Views integration through efq_views
Hot Salsa:
Salsa API and Salsa Entity
Extra Spicy Salsa:
Salsa API and Custom Code
Extra Spicy Salsa:
Salsa API and Custom Code
•  Salsa API module creates a class with
several methods
•  Methods correspond to the calls in Salsa’s
external API
$supporter_key	
  =	
  33333266;	
  
$supporter	
  =	
  salsa_api()-­‐>getObject	
  ('supporter',	
  	
  
	
  $supporter_key);	
  
	
  
Returns:	
  
array(	
  
	
  	
  'supporter_KEY'	
  =>	
  33333266,	
  
	
  	
  'organization_KEY'	
  =>	
  17594,	
  
	
  	
  'Last_Modified'	
  =>	
  'Tue	
  Feb	
  19	
  2013	
  18:30:52	
  GMT-­‐0500	
  (EST)',	
  
	
  	
  'Date_Created'	
  =>	
  'Tue	
  Feb	
  05	
  2013	
  17:41:42	
  GMT-­‐0500	
  (EST)',	
  
	
  	
  'Title'	
  =>	
  '',	
  
	
  	
  'First_Name'	
  =>	
  'John',	
  
	
  	
  'MI'	
  =>	
  'Q',	
  
	
  	
  'Last_Name'	
  =>	
  'Public',	
  
	
  	
  'Suffix'	
  =>	
  'Jr.',	
  
	
  	
  'Email'	
  =	
  'john@test.null',	
  
	
  	
  'Receive_Email'	
  =>	
  1,	
  
	
  	
  'Email_Status'	
  =>	
  1,	
  
	
  	
  'Email_Preference'	
  =>	
  'html',	
  
	
  	
  'Soft_Bounce_Count'	
  =>	
  0,	
  
salsa_api()->getObject
$include	
  =	
  array('supporter_KEY',	
  'Last_Modified',	
  	
  	
  	
  
	
  'First_Name',	
  'Last_Name',	
  'Email',	
  'City',	
  
	
  'State',	
  'Zip');	
  
$conditions	
  =	
  array(	
  
	
  	
  'Last_Modified'	
  =>	
  array(	
  
	
  	
  	
  	
  '#operator'	
  =>	
  '>’,	
  
	
  	
  	
  	
  '#value'	
  =>	
  date("Y-­‐m-­‐d	
  H:i:s",	
  $lastrun)	
  
	
  	
  	
  ),	
  
);	
  
$orderBy	
  =	
  array('Last_Modified	
  DESC');	
  
$limit	
  =	
  $offset	
  .	
  ",500";	
  
$supporters	
  =	
  salsa_api()-­‐>getObjects('supporter',	
  
	
  $conditions,	
  $limit,	
  $include,	
  $orderBy);	
  
salsa_api->getObjects
$fields	
  =	
  array(	
  
	
  	
  'First_Name'	
  =>	
  'John',	
  
	
  	
  'Last_Name'	
  =>	
  'Doe',	
  
	
  	
  'Email	
  =>	
  'john@zoom.com',	
  
	
  	
  'Zip'	
  =>	
  '01234',	
  
);	
  
$links	
  =	
  array(	
  
	
  	
  array(	
  
	
  	
  	
  	
  'link'	
  =>	
  'supporter_groups',	
  
	
  	
  	
  	
  'linkkey'	
  =>	
  10000,	
  
	
  	
  ),	
  
	
  	
  array(	
  
	
  	
  	
  'link'	
  =>	
  'supporter_groups',	
  
	
  	
  	
  	
  'linkkey'	
  =>	
  10001,	
  
	
  	
  );	
  
);	
  
$new_key	
  =	
  salsa_api()-­‐>save('supporter',	
  $fields,	
  $links);	
  
salsa_api()->save
salsa_api()->getReport
try	
  {	
  
	
  	
  $report	
  =	
  salsa_api()-­‐>getReport(12345);	
  
	
  	
  $leaders	
  =	
  $report['row']['totalleaders'];	
  
	
  	
  variable_set('pon_leaderboard_leaders',	
  $leaders);	
  
}	
  catch	
  (SalsaQueryException	
  $e)	
  {	
  
	
  	
  $leaders	
  =	
  variable_get('pon_leaderboard_leaders');	
  
}	
  catch	
  (SalsaConectionException	
  $e)	
  {	
  
	
  	
  $leaders	
  =	
  variable_get('pon_leaderboard_leaders');	
  	
  	
  	
  	
  
}	
  
What’s Next?
•  A few new API methods
•  A few objects not yet supported in Salsa
Entity
•  Drupal 8 versions
Questions?
john@4sitestudios.com
4SiteStudios.com
@johnshortess
@4SiteStudios

Más contenido relacionado

Similar a Capitalcamp 2013 - Salsa: Spicy CRM Integration for Drupal-Powered Nonprofits

Dirty Secrets of the PHP SOAP Extension
Dirty Secrets of the PHP SOAP ExtensionDirty Secrets of the PHP SOAP Extension
Dirty Secrets of the PHP SOAP Extension
Adam Trachtenberg
 
How I Learned to Stop Worrying and Love jQuery (Jan 2013)
How I Learned to Stop Worrying and Love jQuery (Jan 2013)How I Learned to Stop Worrying and Love jQuery (Jan 2013)
How I Learned to Stop Worrying and Love jQuery (Jan 2013)
David Giard
 
第49回Php勉強会@関東 Datasource
第49回Php勉強会@関東 Datasource第49回Php勉強会@関東 Datasource
第49回Php勉強会@関東 Datasource
Kaz Watanabe
 

Similar a Capitalcamp 2013 - Salsa: Spicy CRM Integration for Drupal-Powered Nonprofits (20)

The Art of AngularJS in 2015 - Angular Summit 2015
The Art of AngularJS in 2015 - Angular Summit 2015The Art of AngularJS in 2015 - Angular Summit 2015
The Art of AngularJS in 2015 - Angular Summit 2015
 
Why Hacking WordPress Search Isn't Some Big Scary Thing
Why Hacking WordPress Search Isn't Some Big Scary ThingWhy Hacking WordPress Search Isn't Some Big Scary Thing
Why Hacking WordPress Search Isn't Some Big Scary Thing
 
Web::Machine - Simpl{e,y} HTTP
Web::Machine - Simpl{e,y} HTTPWeb::Machine - Simpl{e,y} HTTP
Web::Machine - Simpl{e,y} HTTP
 
Bag Of Tricks From Iusethis
Bag Of Tricks From IusethisBag Of Tricks From Iusethis
Bag Of Tricks From Iusethis
 
Self join in active record association
Self join in active record associationSelf join in active record association
Self join in active record association
 
Dirty Secrets of the PHP SOAP Extension
Dirty Secrets of the PHP SOAP ExtensionDirty Secrets of the PHP SOAP Extension
Dirty Secrets of the PHP SOAP Extension
 
Can WordPress really do that? A case study of vierderduer.no
Can WordPress really do that? A case study of vierderduer.noCan WordPress really do that? A case study of vierderduer.no
Can WordPress really do that? A case study of vierderduer.no
 
Practical PHP by example Jan Leth-Kjaer
Practical PHP by example   Jan Leth-KjaerPractical PHP by example   Jan Leth-Kjaer
Practical PHP by example Jan Leth-Kjaer
 
Karan chanan
Karan chananKaran chanan
Karan chanan
 
Karan - form search
Karan - form searchKaran - form search
Karan - form search
 
Capstone Website Code
Capstone Website CodeCapstone Website Code
Capstone Website Code
 
Silex meets SOAP & REST
Silex meets SOAP & RESTSilex meets SOAP & REST
Silex meets SOAP & REST
 
How I Learned to Stop Worrying and Love jQuery (Jan 2013)
How I Learned to Stop Worrying and Love jQuery (Jan 2013)How I Learned to Stop Worrying and Love jQuery (Jan 2013)
How I Learned to Stop Worrying and Love jQuery (Jan 2013)
 
PHP API
PHP APIPHP API
PHP API
 
Daily notes
Daily notesDaily notes
Daily notes
 
Laravel
LaravelLaravel
Laravel
 
Using OpenFire With OpenLDAP
Using OpenFire With OpenLDAPUsing OpenFire With OpenLDAP
Using OpenFire With OpenLDAP
 
Hi5 opensocial-code-lab-presentation-1203814696810018-3
Hi5 opensocial-code-lab-presentation-1203814696810018-3Hi5 opensocial-code-lab-presentation-1203814696810018-3
Hi5 opensocial-code-lab-presentation-1203814696810018-3
 
Redis Developer Day TLV - Redis Stack & RedisInsight
Redis Developer Day TLV - Redis Stack & RedisInsightRedis Developer Day TLV - Redis Stack & RedisInsight
Redis Developer Day TLV - Redis Stack & RedisInsight
 
第49回Php勉強会@関東 Datasource
第49回Php勉強会@関東 Datasource第49回Php勉強会@関東 Datasource
第49回Php勉強会@関東 Datasource
 

Último

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 

Último (20)

ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 

Capitalcamp 2013 - Salsa: Spicy CRM Integration for Drupal-Powered Nonprofits

  • 1. Salsa: Spicy CRM Integration for Drupal-Powered Nonprofits CapitalCamp July 26, 2013 John Shortess 4Site Interactive Studios
  • 2. “Salsa helps nonprofits build, organize & engage a base of support with tools to communicate, fundraise, advocate & build community.”
  • 3. Over 2,000 clients managing over 75 million supporters, including: •  Electronic Frontier Foundation •  Democratic Legislative Campaign Committee •  League of Women Voters •  Robert Wood Johnson Foundation •  National Association of Court Appointed Special Advocates (CASA)
  • 4. Organize • Supporter • Signup page • Event Fundraise • Donate page • Donation Communicate • Questionnaire • Email Blast • Tell-a-friend Page Advocate • Petition • Targeted Action Salsa 101: Modules & ‘Objects’
  • 5. Mild Salsa: Link to Salsa-Hosted Form
  • 9. <script  src="http://sandbox.salsalabs.com/api/ flashMessageJS.sjs"  type="text/javascript"></script>     <form  action="http://sandbox.salsalabs.com/save">    <input  type="hidden"  value="supporter"  name="object”  />    <input  type="hidden"  value="1234"  name="organization_KEY”  />    Your  email:  <input  type="text"  value=""  name="Email”  />    Your  ZIP  Code:  <input  type="text"  value=""  name=”Zip”  />      <input  type="hidden"  name="required"  value="Email,Zip"/>      <input  type="Submit"  value="Submit  Form”  />   </form>   Medium Salsa: Unauthenticated Forms
  • 10. Hot Salsa: Salsa API and Salsa Entity
  • 11. Salsa API module Connects Drupal to Salsa’s RESTful API, to read from or write to nearly any Salsa object Salsa Entity module Exposes Salsa objects as Drupal entities Hot Salsa: Salsa API and Salsa Entity
  • 12. • Supporters • Groups • Signup pages • Donate pages • Questionnaires • Tell-a-friend pages • Events • Petitions • Targeted Actions • Unsubscribe pages Supported Objects (so far): Hot Salsa: Salsa API and Salsa Entity
  • 13. •  Forms rendered using FAPI – themeable, alterable •  Entity Reference integration •  Rules integration •  Basic Views integration through efq_views Hot Salsa: Salsa API and Salsa Entity
  • 14.
  • 15.
  • 16. Extra Spicy Salsa: Salsa API and Custom Code
  • 17. Extra Spicy Salsa: Salsa API and Custom Code •  Salsa API module creates a class with several methods •  Methods correspond to the calls in Salsa’s external API
  • 18. $supporter_key  =  33333266;   $supporter  =  salsa_api()-­‐>getObject  ('supporter',      $supporter_key);     Returns:   array(      'supporter_KEY'  =>  33333266,      'organization_KEY'  =>  17594,      'Last_Modified'  =>  'Tue  Feb  19  2013  18:30:52  GMT-­‐0500  (EST)',      'Date_Created'  =>  'Tue  Feb  05  2013  17:41:42  GMT-­‐0500  (EST)',      'Title'  =>  '',      'First_Name'  =>  'John',      'MI'  =>  'Q',      'Last_Name'  =>  'Public',      'Suffix'  =>  'Jr.',      'Email'  =  'john@test.null',      'Receive_Email'  =>  1,      'Email_Status'  =>  1,      'Email_Preference'  =>  'html',      'Soft_Bounce_Count'  =>  0,   salsa_api()->getObject
  • 19. $include  =  array('supporter_KEY',  'Last_Modified',          'First_Name',  'Last_Name',  'Email',  'City',    'State',  'Zip');   $conditions  =  array(      'Last_Modified'  =>  array(          '#operator'  =>  '>’,          '#value'  =>  date("Y-­‐m-­‐d  H:i:s",  $lastrun)        ),   );   $orderBy  =  array('Last_Modified  DESC');   $limit  =  $offset  .  ",500";   $supporters  =  salsa_api()-­‐>getObjects('supporter',    $conditions,  $limit,  $include,  $orderBy);   salsa_api->getObjects
  • 20. $fields  =  array(      'First_Name'  =>  'John',      'Last_Name'  =>  'Doe',      'Email  =>  'john@zoom.com',      'Zip'  =>  '01234',   );   $links  =  array(      array(          'link'  =>  'supporter_groups',          'linkkey'  =>  10000,      ),      array(        'link'  =>  'supporter_groups',          'linkkey'  =>  10001,      );   );   $new_key  =  salsa_api()-­‐>save('supporter',  $fields,  $links);   salsa_api()->save
  • 21.
  • 22. salsa_api()->getReport try  {      $report  =  salsa_api()-­‐>getReport(12345);      $leaders  =  $report['row']['totalleaders'];      variable_set('pon_leaderboard_leaders',  $leaders);   }  catch  (SalsaQueryException  $e)  {      $leaders  =  variable_get('pon_leaderboard_leaders');   }  catch  (SalsaConectionException  $e)  {      $leaders  =  variable_get('pon_leaderboard_leaders');           }  
  • 23.
  • 24.
  • 25.
  • 26. What’s Next? •  A few new API methods •  A few objects not yet supported in Salsa Entity •  Drupal 8 versions