Project

marketo2

0.0
No commit activity in last 3 years
No release in over 3 years
Allows easy integration with marketo from ruby (v2 and up). You can synchronize leads and fetch them back by email. By default this is configured for the SOAP wsdl file: http://app.marketo.com/soap/mktows/1_4?WSDL but this is configurable when you construct the client, e.g. client = Rapleaf::Marketo.new_client(<access_key>, <secret_key>, (api_subdomain = 'na-i'), (api_version = '1_5'), (document_version = '1_4')) More information at https://www.rapleaf.com/developers/marketo. Forked from James O'Brien's marketo gem.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 2.3.0

Runtime

~> 1.2.0
 Project Readme

marketo2

Install

#GemFile
gem "marketo2"

Setup

#app/config/initializers/marketo.rb
MARKETO = Rapleaf::Marketo.new_client(ENV["MARKETO_USER_ID"],ENV["MARKETO_ENCRYPTION_KEY"]) if ENV["MARKETO_USER_ID"] && ENV["MARKETO_ENCRYPTION_KEY"]

Usage

if MARKETO
  marketo_user = Rapleaf::Marketo::LeadRecord.new(self.email)
  marketo_user.set_attribute_if_blank('FirstName', self.first_name)
  marketo_user.set_attribute_if_blank('LastName', self.last_name)
  marketo_user.set_attribute_if_blank('LeadSource', self.source)
  marketo_user.set_attribute_if_blank('App_Name__c', self.app_name)
  marketo_user.set_attribute('Integration_Status_FXSDK_iOS', self.ios_status)
  marketo_user.set_attribute('Integration_Status_FXSDK_Android', self.android_status)
  response = MARKETO.sync_lead_record(marketo_user)
else
  puts "MARKETO is not setup"
end