/
README
58 lines (38 loc) · 1.78 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
Silverpop
====================================================================================================
Silverpop Engage and Transact API -- Extracted from ShoeDazzle.com
Silverpop allows for seamless integration from Ruby with the Engage and Transact API. Built on Rails
2.1.0. Requires hpricot, net/http, net/ftp, and uri.
Examples
====================================================================================================
TRANSACT
Defining recipients:
recipient = { :email => 'test@test.com',
:personalizations => [
{:tag_name => 'FIRST_NAME', :value => 'Joe'},
{:tag_name => 'LAST_NAME', :value => 'Schmoe'}
] }
recipients = [ recipient,
{ :email => 'test2@test.com',
:personalizations => [
{:tag_name => 'FIRST_NAME', :value => 'John'},
{:tag_name => 'LAST_NAME', :value => 'Smith'}
] },
{ :email => 'test3@test.com',
:personalizations => [
{:tag_name => 'FIRST_NAME', :value => 'Jane'},
{:tag_name => 'LAST_NAME', :value => 'Doe'}
] } ]
Transact HTTP Sample Usage:
campaign_id = 1234567
sp = Silverpop::Transact.new campaign_id, recipients
sp.query
Transact FTP Sample Usage:
campaign_id = 1234567
options.merge!( { :send_as_batch => 'true' } )
transact = Silverpop::Transact.new(campaign_id, recipients, options)
transact.save_xml file_path
transact.submit_batch file_path
ENGAGE
Please look through the functions in lib/engage.rb
Copyright (c) 2010 George Truong, released under the MIT license