SlideShare uma empresa Scribd logo
1 de 27
Baixar para ler offline
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

Mais conteúdo relacionado

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

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 2015Matt Raible
 
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 ThingChris Reynolds
 
Web::Machine - Simpl{e,y} HTTP
Web::Machine - Simpl{e,y} HTTPWeb::Machine - Simpl{e,y} HTTP
Web::Machine - Simpl{e,y} HTTPMichael Francis
 
Bag Of Tricks From Iusethis
Bag Of Tricks From IusethisBag Of Tricks From Iusethis
Bag Of Tricks From IusethisMarcus Ramberg
 
Self join in active record association
Self join in active record associationSelf join in active record association
Self join in active record associationRORLAB
 
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 ExtensionAdam Trachtenberg
 
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.noMorten Rand-Hendriksen
 
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-KjaerCOMMON Europe
 
Silex meets SOAP & REST
Silex meets SOAP & RESTSilex meets SOAP & REST
Silex meets SOAP & RESTHugo Hamon
 
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
 
Using OpenFire With OpenLDAP
Using OpenFire With OpenLDAPUsing OpenFire With OpenLDAP
Using OpenFire With OpenLDAPDashamir Hoxha
 
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-3Kunal Mittal
 
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 & RedisInsightGuy Korland
 
第49回Php勉強会@関東 Datasource
第49回Php勉強会@関東 Datasource第49回Php勉強会@関東 Datasource
第49回Php勉強会@関東 DatasourceKaz Watanabe
 

Semelhante 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 - form search
Karan - form searchKaran - form search
Karan - form search
 
Karan chanan
Karan chananKaran chanan
Karan chanan
 
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

Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Kaya Weers
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfIngrid Airi González
 
Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024TopCSSGallery
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Hiroshi SHIBATA
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Farhan Tariq
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesThousandEyes
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...itnewsafrica
 
React Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkReact Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkPixlogix Infotech
 
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security ObservabilityGlenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security Observabilityitnewsafrica
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfpanagenda
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical InfrastructureVarsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructureitnewsafrica
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...Wes McKinney
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentPim van der Noll
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 

Último (20)

Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdf
 
Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
 
React Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkReact Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App Framework
 
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security ObservabilityGlenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical InfrastructureVarsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 

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