How to get activity data by Bulk APIs v2.0?
Hi all,
I have completed to get Account data by Bulk APIs v2.0. (create an export for Account and then create a Sync for this export)
But when trying to use the integration to work for Activity data, I always get Error status of Sync.
So, could you please show me any suggestions for this issue?
Is there any option different between exports of Account and Activity?
Thanks,
Biao
PS: I find an example to request activity data:
POST https://<host>.eloqua.com/api/bulk/2.0/activities/exports
"name":"Example Activity Export",
"fields":{
"ActivityId":"{{Activity.Id}}",
"AssetName":"{{Activity.Asset.Name}}",
"ActivityType":"{{Activity.Type}}",
"Id":"{{Activity.Id}}",
"ActivityDate":"{{Activity.CreatedAt}}",
"EmailAddress":"{{Activity.Field(EmailAddress)}}",
"ContactId":"{{Activity.Contact.Id}}",
"VisitorId":"{{Activity.Visitor.Id}}",
"AssetType":"{{Activity.Asset.Type}}",
"AssetId":"{{Activity.Asset.Id}}",
"RawData":"{{Activity.Field(RawData)}}"
"filter":"’{{Activity.Type}}’=’FormSubmit’"
I get error status of Sync for this export. But when I remove the 'Id' and 'RawData' fields, I get success.
I guess that there are some roles of the field settings, e.g. one statement should not appear more than once, and so on.
So, where could I find the roles? Or is there an API could return the valid field list?
Thank you very much.
Hi Biao,
I am able to pull the data for Activity Export for Type Form Submit.
I am adding details below :
1) Create Activity Export Structure
URL : https://www02.secure.eloqua.com/API/Bulk/2.0/activities/exports
Input JSON : {"name":"Bulk Activity Export","dataRetentionDuration":"PT1H","fields":{"activityId":"{{Activity.Id}}","assetId":"{{Activity.Asset.Id}}","activityType":"{{Activity.Type}}","activityDate":"{{Activity.CreatedAt}}","contactId":"{{Activity.Contact.Id}}","visitorId":"{{Activity.Visitor.Id}}","visitorExternalId":"{{Activity.Visitor.ExternalId}}","assetType":"{{Activity.Asset.Type}}","assetName":"{{Activity.Asset.Name}}","rawData":"{{Activity.Field(RawData)}}"},"filter":"'{{Activity.Type}}'='FormSubmit' and '{{Activity.CreatedAt}}'>='2013-06-01' and '{{Activity.CreatedAt}}'<='2013-06-30'"}
Status Code : 201
Output JSON : {"name":"Bulk Activity Export","fields":{"activityId":"{{Activity.Id}}","assetId":"{{Activity.Asset.Id}}","activityType":"{{Activity.Type}}","activityDate":"{{Activity.CreatedAt}}","contactId":"{{Activity.Contact.Id}}","visitorId":"{{Activity.Visitor.Id}}","visitorExternalId":"{{Activity.Visitor.ExternalId}}","assetType":"{{Activity.Asset.Type}}","assetName":"{{Activity.Asset.Name}}","rawData":"{{Activity.Field(RawData)}}"},"filter":"'{{Activity.Type}}'='FormSubmit' and '{{Activity.CreatedAt}}'>='2013-06-01' and '{{Activity.CreatedAt}}'<='2013-06-30'","dataRetentionDuration":"PT1H","uri":"/activities/exports/74","createdBy":"CXDELQ.API","createdAt":"2014-11-03T09:40:00.9397930Z","updatedBy":"CXDELQ.API","updatedAt":"2014-11-03T09:40:00.9397930Z"}
2) Create Sync with status pending
URL : https://www02.secure.eloqua.com/API/Bulk/2.0/syncs
Input JSON : {"syncedInstanceUri":"/activities/exports/74","status":"pending"}
Status Code : 201
Output JSON : {"syncedInstanceUri":"/activities/exports/74","status":"pending","createdAt":"2014-11-03T09:41:18.2503138Z","createdBy":"CXDELQ.API","uri":"/syncs/90640"}
3) Get sync Result
URL : https://www02.secure.eloqua.com/API/Bulk/2.0/syncs/90640
Status Code : 200
Output JSON : {"syncedInstanceUri":"/activities/exports/74","syncStartedAt":"2014-11-03T09:41:20.6670000Z","syncEndedAt":"2014-11-03T09:41:23.1970000Z","status":"success","createdAt":"2014-11-03T09:41:18.1670000Z","createdBy":"CXDELQ.API","uri":"/syncs/90640"}
4) Get the data from API
URL : https://www02.secure.eloqua.com/API/Bulk/2.0/activities/exports/74/data?limit=1000&offset=0&count=1&depth=complete
Output JSON : "Output is high voulme, am not attaching here".
Please let me know is this will help you to reolve the issue.
Thanks,
Deepak Chincholi
Similar Messages
-
How to get communication data in CRM 7.0
In CRM 7.0 with CCS active.
How to get communication data (Current phone #) that is presently active while creating Interaction Record or during account confirmation.
Thanks,
Nilesh P.Hi,
This problem is related to IC and not related to Marketing Campaign.
At this movement I hv resolved this problem by storing phone # in memory variable by some other way.
But I would be more interested to know Communication Data in 'Context area' of IC.
Thanks & Regards,
Nilesh P. -
How to get system date and time?
Can someone show me a code on how to get system date and time.
Thanks!there is one really easy way to get system time, the api gives a great example of code on this. use gregorian calendar, which you'll find in the api under GregorianCalendar. You only need to create one instance of GC, ie Calendar time = new GregorianCalendar();
you save seconds, minute and hours into int values, so you don't have to access the system time every second, you can create a thread which adds one to the int second value, if oyu see what i mean, for example, i have saved the hours, minutes and seconds as int values;
int hour, minute, second;
i can then create a thread (Thread thread = new Thread(this) and run it like:
Calendar time;
int hour, minute, second;
Thread thread = null;
public MyTime() {
hour= time.get(Calendar.HOUR_OF_DAY);
minute = time.get(Calendar.MINUTE);
second = time.get(Calendar.SECOND);
if(thread == null) {
thread = new Thread(this);
thread.start();
public void run() {
Thread t = Thread.currentThread();
while(thread == t) {
thread.sleep(1000);
second++;
if(second > 59)
minute++;
if(minute>59)
hour++;
formatTime();
public void formatTime() {
second = (second > 59? 0 : second);
minute = (minute > 59? 0 : minute);
hour = (hour > 23? 0 : hour);
System.out.println(hour+":"+minute+":"+second);
public static void main(String[] args) {
new MyTime();
I know this looks like gibberish but it should work. If not, try to fix the problem, i have written from memory really but i guarantee you, this gets the time then every second, simply adds one to the second and then formats time. You can also access the day, month and year then format them using the above code. I don't like giving code since you should really do these things yourself but it is 2:04am, i have nothing better to do and i am not tired so i did you a favour - i have become what i always did not want to, someone ho stays upall night writing code. -
How to get twiiter data?
How to get twitter data?
For my project I want large amount of twitter tweets. How do I get?//Oauth Keys (Replace with values that are obtained from registering the application
var oauth_consumer_key ="Your API Key";
var oauth_consumer_secret = "Your API Secret Key";
//Token URL
var oauth_url = "https://api.twitter.com/oauth2/token";
var headerFormat = "Basic {0}";
var authHeader = string.Format(headerFormat,
Convert.ToBase64String(Encoding.UTF8.GetBytes(Uri.EscapeDataString(oauth_consumer_key) + ":" +
Uri.EscapeDataString((oauth_consumer_secret)))
var postBody = "grant_type=client_credentials";
ServicePointManager.Expect100Continue = false;
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(oauth_url);
request.Headers.Add("Authorization", authHeader);
request.Method = "POST";
request.ContentType = "application/x-www-form-urlencoded;charset=UTF-8";
using (Stream stream = request.GetRequestStream())
byte[] content = ASCIIEncoding.ASCII.GetBytes(postBody);
stream.Write(content, 0, content.Length);
request.Headers.Add("Accept-Encoding", "gzip");
HttpWebResponse response = request.GetResponse() as HttpWebResponse;
Stream responseStream = new GZipStream(response.GetResponseStream(), CompressionMode.Decompress);
using (var reader = new StreamReader(responseStream))
JavaScriptSerializer js = new JavaScriptSerializer();
var objText =reader.ReadToEnd();
JObject o = JObject.Parse(objText); -
How to get changed data in ALV in Web Dynpro for ABAP
METHOD on_data_check .
DATA:
node_spfli TYPE REF TO if_wd_context_node,
node_sflight TYPE REF TO if_wd_context_node,
itab_sflight2 TYPE if_display_view=>elements_sflight.
node_spfli = wd_context->get_child_node( name = if_display_view=>wdctx_spfli ).
node_sflight = node_spfli->get_child_node( name = if_display_view=>wdctx_sflight ).
CALL METHOD node_sflight->get_static_attributes_table
IMPORTING
table = itab_sflight2.
this code is ..get all data(changed and not changed)
but i want get changed data only, not all data.
how to get changed data?
Edited by: Ki-Joon Seo on Dec 27, 2007 6:04 AMHi,
To get only the changed data in the ALV grid of a WD, you need to capture the "ON_DATA_CHECK" of the ALV grid.
To this please do the following in the ALV initialization of the ALV table settings :
lr_table_settings->set_data_check(
IF_SALV_WD_C_TABLE_SETTINGS=>DATA_CHECK_ON_CELL_EVENT ).
You may also do this:
lr_table_settings->set_data_check( IF_SALV_WD_C_TABLE_SETTINGS=>DATA_CHECK_ON_CHECK_EVENT)
The above two ways would depend on when do you need to check for the changed data. If you want to check the data as soon as it is entered, then use the first method. Else, use the second method.
You need to register an EVENT HANDLER for this event.(You may do this in your VIEW or Component Controller).
In this Event handler, you would find an importing parameter R_PARAM which is a ref type of IF_SALV_WD_TABLE_DATA_CHECK.
The attribute T_MODIFIED_CELLS of this interface IF_SALV_WD_TABLE_DATA_CHECK will contain the modified cells of the ALV with the old & new values. -
How to get all data from nokia to i5s
how to get all data from nokia E71 to i5s???
if you can put those data in your computer then add it in iTunes. your iPhone 5s should get it thru syncing.
-
How to get the data from multiple nodes to one table
Hi All,
How to get the data from multiple nodes to one table.examples nodes are like A B C D E relation also maintained
Regards,
IndraHI Indra,
From Node A, get the values of the attributes as
lo_NodeA->GET_STATIC_ATTRIBUTES( IMPORTING STATIC_ATTRIBUTES = ls_attributesA ).
Similarily get all the node values from B, C, D and E.
Finally append all your ls records to the table.
Hope you are clear.
BR,
RAM. -
How to get the data from pcl2 cluster for TCRT table.
Hi frndz,
How to get the data from pcl2 cluster for tcrt table for us payroll.
Thanks in advance.
Harisumanth.ChPL take a look at the sample Program EXAMPLE_PNP_GET_PAYROLL in your system. There are numerous other ways to read payroll results.. Pl use the search forum option & you sure will get a lot of hits..
~Suresh -
How to get the data from Pooled Table T157E.
Hi Experts,
How to get the data from Pooled Table T157E.
Any help.
Thanks in Advance,
Ur's Harsha.create some internal table similar to T157E and pass all data as per SPRAS.
After that use internal table in your program as per the requirement.
Regds,
Anil -
How to get purchasing data from SAP R/3 to OWB (Oracle warehouse builder).
Hi,
My name is Pavan Tata. I work as a SAP BW developer. Here is the situation at my client place. Client decided to retire BW system and wants to replace with OWB(Oracle warehouse). In all this currently we have purhchasing application in BW production system and wants to move this application to OWB for the same type of reporting what they are getting currently.
Here is my question:
How to get purchasing data from SAP R/3 to OWB(Warehouse) with initial full loads and deltas mechanism in the same way as we do in BW.
Please help on this, also send me any documentation about this if you have.
Thanks,
Pavan.Hello,
here is a short report which converts S012 entries to strings with separator semicolon. Perhaps this will help you?
Regards
Walter Habich
REPORT habitest2 LINE-SIZE 255.
TYPES:
strtab_t TYPE TABLE OF string.
CONSTANTS:
separator VALUE ';'.
DATA:
it_s012 LIKE s012 OCCURS 0,
wa_s012 LIKE s012,
strtab TYPE strtab_t,
strele TYPE string.
SELECT * FROM s012 INTO TABLE it_s012 UP TO 100 ROWS.
PERFORM data_to_string
TABLES
strtab
USING
'S012'. "requires it_s012 and wa_s012
LOOP AT strtab INTO strele.
WRITE: / strele.
ENDLOOP.
*& Form data_to_string
FORM data_to_string TABLES strtab TYPE strtab_t
USING ittab TYPE any.
DATA:
h_zaehler TYPE i,
line_str TYPE string,
l_tabellenname(10) TYPE c,
l_arbeitsbereichsname(10) TYPE c,
h_string TYPE string,
h_char(255) TYPE c.
FIELD-SYMBOLS: <l_tabelle> TYPE ANY TABLE,
<l_arbeits> TYPE ANY,
<feldzeiger> TYPE ANY.
CLEAR strtab.
CONCATENATE 'IT_' ittab INTO l_tabellenname.
ASSIGN (l_tabellenname) TO <l_tabelle>.
CONCATENATE 'WA_' ittab INTO l_arbeitsbereichsname.
ASSIGN (l_arbeitsbereichsname) TO <l_arbeits>.
LOOP AT <l_tabelle> INTO <l_arbeits>.
CLEAR: h_zaehler, line_str.
line_str = ittab.
DO.
ADD 1 TO h_zaehler.
ASSIGN COMPONENT h_zaehler OF
STRUCTURE <l_arbeits> TO <feldzeiger>.
IF sy-subrc <> 0. EXIT. ENDIF.
WRITE <feldzeiger> TO h_char LEFT-JUSTIFIED. "#EC *
h_string = h_char.
CONCATENATE line_str separator h_string INTO line_str.
ENDDO.
APPEND line_str TO strtab.
ENDLOOP.
ENDFORM. "data_to_string -
How to get the data from mysql database which is being accessed by a PHP application and process the data locally in adobe air application and finally commit the changes back in to mysql database through the PHP application.
If the data is on a remote server (for example, PHP running on a web server, talking to a MySQL server) then you do this in an AIR application the same way you would do it with any Flex application (or ajax application, if you're building your AIR app in HTML/JS).
That's a broad answer, but in fact there are lots of ways to communicate between Flex and PHP. The most common and best in most cases is to use AMFPHP (http://amfphp.org/) or the new ZEND AMF support in the Zend Framework.
This page is a good starting point for learning about Flex and PHP communication:
http://www.adobe.com/devnet/flex/flex_php.html
Also, in Flash Builder 4 they've added a lot of remote-data-connection functionality, including a lot that's designed for PHP. Take a look at the Flash Builder 4 public beta for more on that: http://labs.adobe.com/technologies/flashbuilder4/ -
How to get the date of first day of a week for a given date
Hi gurus
can any one say me how to get the date of first day(date of Sunday) of a week for a given date in a BW transformations. For example for 02/23/2012 in source i need to get 02/19/2012(Sunday`s date) date in the result. I can get that start date of a week using BWSO_DATE_GET_FIRST_WEEKDAY function module. But this function module retrieves me the start date as weeks monday(02/20/2012) date. But i need sundays(02/19/2012) date as the start date. So it would be really great if anyone sends me the solution.
Thanks
RavHi,
The simplest way would be to subtract 1 from the date date which you are already getting in transformation routine, but instead of doing that subtraction manually which might need bit of errort, you can simply use another FM to subtract 1 from given date.
RP_CALC_DATE_IN_INTERVAL
Regards,
Durgesh. -
How to Get Missing Dates for Each Support Ticket In My Query?
Hello -
I'm really baffled as to how to get missing dates for each support ticket in my query. I did a search for this and found several CTE's however they only provide ways to find missing dates in a date table rather than missing dates for another column
in a table. Let me explain a bit further here -
I have a query which has a list of support tickets for the month of January. Each support ticket is supposed to be updated daily by a support rep, however that isn't happening so the business wants to know for each ticket which dates have NOT been
updated. So, for example, I might have support ticket 44BS which was updated on 2014-01-01, 2014-01-05, 2014-01-07. Each time the ticket is updated a new row is inserted into the table. I need a query which will return the missing dates per
each support ticket.
I should also add that I DO NOT have any sort of admin nor write permissions to the database...none at all. My team has tried and they won't give 'em. So proposing a function or storable solution will not work. I'm stuck with doing everything
in a query.
I'll try and provide some sample data as an example -
CREATE TABLE #Tickets
TicketNo VARCHAR(4)
,DateUpdated DATE
INSERT INTO #Tickets VALUES ('44BS', '2014-01-01')
INSERT INTO #Tickets VALUES ('44BS', '2014-01-05')
INSERT INTO #Tickets VALUES ('44BS', '2014-01-07')
INSERT INTO #Tickets VALUES ('32VT', '2014-01-03')
INSERT INTO #Tickets VALUES ('32VT', '2014-01-09')
INSERT INTO #Tickets VALUES ('32VT', '2014-01-11')
So for ticket 44BS, I need to return the missing dates between January 1st and January 5th, again between January 5th and January 7th. A set-based solution would be best.
I'm sure this is easier than i'm making it. However, after playing around for a couple of hours my head hurts and I need sleep. If anyone can help, you'd be a job-saver :)
Thanks!!CREATE TABLE #Tickets (
TicketNo VARCHAR(4)
,DateUpdated DATETIME
GO
INSERT INTO #Tickets
VALUES (
'44BS'
,'2014-01-01'
INSERT INTO #Tickets
VALUES (
'44BS'
,'2014-01-05'
INSERT INTO #Tickets
VALUES (
'44BS'
,'2014-01-07'
INSERT INTO #Tickets
VALUES (
'32VT'
,'2014-01-03'
INSERT INTO #Tickets
VALUES (
'32VT'
,'2014-01-09'
INSERT INTO #Tickets
VALUES (
'32VT'
,'2014-01-11'
GO
GO
SELECT *
FROM #Tickets
GO
GO
CREATE TABLE #tempDist (
NRow INT
,TicketNo VARCHAR(4)
,MinDate DATETIME
,MaxDate DATETIME
GO
CREATE TABLE #tempUnUserdDate (
TicketNo VARCHAR(4)
,MissDate DATETIME
GO
INSERT INTO #tempDist
SELECT Row_Number() OVER (
ORDER BY TicketNo
) AS NROw
,TicketNo
,Min(DateUpdated) AS MinDate
,MAx(DateUpdated) AS MaxDate
FROM #Tickets
GROUP BY TicketNo
SELECT *
FROM #tempDist
GO
-- Get the number of rows in the looping table
DECLARE @RowCount INT
SET @RowCount = (
SELECT COUNT(TicketNo)
FROM #tempDist
-- Declare an iterator
DECLARE @I INT
-- Initialize the iterator
SET @I = 1
-- Loop through the rows of a table @myTable
WHILE (@I <= @RowCount)
BEGIN
-- Declare variables to hold the data which we get after looping each record
DECLARE @MyDate DATETIME
DECLARE @TicketNo VARCHAR(50)
,@MinDate DATETIME
,@MaxDate DATETIME
-- Get the data from table and set to variables
SELECT @TicketNo = TicketNo
,@MinDate = MinDate
,@MaxDate = MaxDate
FROM #tempDist
WHERE NRow = @I
SET @MyDate = @MinDate
WHILE @MaxDate > @MyDate
BEGIN
IF NOT EXISTS (
SELECT *
FROM #Tickets
WHERE TicketNo = @TicketNo
AND DateUpdated = @MyDate
BEGIN
INSERT INTO #tempUnUserdDate
VALUES (
@TicketNo
,@MyDate
END
SET @MyDate = dateadd(d, 1, @MyDate)
END
SET @I = @I + 1
END
GO
SELECT *
FROM #tempUnUserdDate
GO
GO
DROP TABLE #tickets
GO
DROP TABLE #tempDist
GO
DROP TABLE #tempUnUserdDate
Thanks,
Shridhar J Joshi
<If the post was helpful mark as 'Helpful' and if the post answered your query, mark as 'Answered'> -
How to get the date for the first monday of each month
Dear Members,
How to get the date for the first monday of each month.
I have written the following code
SELECT decode (to_char(trunc(sysdate+30 ,'MM'),'DAY'),'MONDAY ',trunc(sysdate+30 ,'MM'),NEXT_DAY(trunc(sysdate+30 ,'MM'), 'MON')) FROM DUAL
But it look bith complex.
Abhishek
Edited by: 9999999 on Mar 8, 2013 4:30 AMUse IW format - it will make solution NLS independent. And all you need is truncate 7<sup>th</sup> day of each month using IW:
select sysdate current_date,
trunc(trunc(sysdate,'mm') + 6,'iw') first_monday_the_month
from dual
CURRENT_D FIRST_MON
08-MAR-13 04-MAR-13
SQL> Below is list of first monday of the month for this year:
with t as(
select add_months(date '2013-1-1',level-1) dt
from dual
connect by level <= 12
select dt first_of_the_month,
trunc(dt + 6,'iw') first_monday_the_month
from t
FIRST_OF_ FIRST_MON
01-JAN-13 07-JAN-13
01-FEB-13 04-FEB-13
01-MAR-13 04-MAR-13
01-APR-13 01-APR-13
01-MAY-13 06-MAY-13
01-JUN-13 03-JUN-13
01-JUL-13 01-JUL-13
01-AUG-13 05-AUG-13
01-SEP-13 02-SEP-13
01-OCT-13 07-OCT-13
01-NOV-13 04-NOV-13
FIRST_OF_ FIRST_MON
01-DEC-13 02-DEC-13
12 rows selected.
SQL> SY. -
How to get the Date in a particular format?
Hi,
How to get the Date in the below format? I will be passing the year in my method..
2/10/2003 9:46:52 PM
D/M/YYYY H:M:S A
public Date getDate (String year) {
Here i want to get the Date in this format
2/10/<Passed Year> 9:46:52 PM
ThanksThis is my code
public static Date getCalendar(Calendar calendar,int getYear) {
String formatted_date="";
int year = getYear;
int month = calendar.get(Calendar.MONTH+1);
int day = calendar.get(Calendar.DATE);
int hour = calendar.get(Calendar.HOUR);
int min = calendar.get(Calendar.MINUTE);
int sec = calendar.get(Calendar.SECOND);
int am_pm =calendar.get(Calendar.AM_PM);
formatted_date = month+"/"+day+"/"+year+" "+hour+":"+min+":"+sec+" PM";
System.out.println("formatted_date is "+formatted_date);
o/p : formatted_date is 1/4/2006 1:44:21 PM
SimpleDateFormat dateFormat = new SimpleDateFormat("dd/MM/yyyy");
// DateFormat dateFormat =DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.SHORT);
Date passdate = new Date();
try {
passdate = dateFormat.parse(formatted_date);
} catch (ParseException e) {
System.out.println("Invalid Date Parser Exception "+e.getLocalizedMessage()+"DateFormat is "+dateFormat);
System.out.println("The Date inside the function is "+passdate+"and the year passed is "+year);
o/p : The Date inside the function is Sat Apr 01 00:00:00 IST 2006and the year passed is 2006
return passdate;
Expected O/P is 3/1/2006 1:44:12 PM
}
Maybe you are looking for
-
?My iPad updated and now wants a security code for access and I never gave it one. I tried code I used for my phone and it doesn't work. How can I access now?
-
MacBook Pro will not boot. Just get grey screen. When I hold down control + R, I get blank blue screen.
-
Final Cut Studio install problems
Well I was thrilled to get Final Cut Studio 2, but cannot get the thing installed. Looking to do a 100% uninstall so I can start fresh I have the following disks: 1. Final Cut Studio 2. DVD Studio 3. Livetype1 4. Livetype2 5. Motion On my first insta
-
How to check event.target type in "if" statement
Hi, i have "roll over" event listener and i would like to that works only with MovieClips (without textfields etc.). I would like to write something like that: if(event.target == MovieClip){ do something } else { do something else} This doesn`t work
-
Premiere Pro CS3 having trouble with 24" monitors
Can anyone tell me anything about using a 1920 X 1200 resolution with CS3 products? I try to open PPro CS3 on my new 24" monitor and it crashes. I have a 768Mb Nvidia Graphics card and the latest drivers installed. I've tried resetting the resolut