-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathexample.R
34 lines (18 loc) · 994 Bytes
/
example.R
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
install.packages("devtools")
devtools::install_github("colemanja91/rEloqua")
library(rEloqua)
## Setup login object
myLogin <- eloquaLogin(pod = 1, company = "myCompany", username = "myUsername", password = "myPassword")
## Create an export definition for Web Visit Activities, filtering for 2015-11-19
filters <- list(ActivityDate = c(operator = ">=", value = "2015-11-19 00:00:00"),
ActivityDate = c(operator = "<", value = "2015-11-20 00:00:00"))
myExportDef <- defExport(login = myLogin, type = "WebVisit", bulkFilter = filters,
exportName = "20151120 - Web Visit Test Export")
## Sync data to the export
mySync <- syncExport(login = myLogin, exportDefinition = myExportDef)
## Get data from the export
myData <- getExportData(login = myLogin, exportDefinition = myExportDef)
## Extract the data into a dataframe
myDataExtracted <- extractExportData(myData)
## If desired, export to a CSV
write.csv(myDataExtracted, "WebVisits.csv")