0

I am a new SOAP API user trying to access Salesforce marketin cloud. My requirement is to execute a query to pull records from the _Job dataview present in salesforce marketing cloud as below:

select * from _Job

The SOAP API documentation has the following method available.

System.String query = Query(QueryRequest, RequestID, Results)

I did not find any sample code to build the QueryRequest. Please help me creating the QueryRequest and executing it.

Additionally the following link describes how to create and perform a query using QueryDefinition Object here:

https://developer.salesforce.com/docs/atlas.en-us.noversion.mc-apis.meta/mc-apis/creating_a_query_activity.htm

How do I define the TargetType for QueryDefinition? The example uses a value DE and executes the query to populate a data extension. What other values can be specified and used. For instance, is there a value to export the result to a file? If yes, how do I achieve that?

Thanks in advance.

1 Answer 1

1

The system views (prefixed with underscore) aren't available to the API. I would suggest you create a data extension that is Select * from _Send and then run the api against that DE.

Sign up to request clarification or add additional context in comments.

1 Comment

Hi John! I have posted another related question and here is the link to it. stackoverflow.com/questions/54815433/… . I will appreciate it if you can answer this. Thank you.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.