2

in Email Studio we have a query (From the Email Studio menu bar, Interactions -> Query) that we can manually run to populate a data extension, it works fine. But we'd like to automate this running, say, have it run at 5am everyday without human intervention. (The data extension it fills would be exported as part of a daily automated process, but this automation won't export anything new unless the query is run.) The Interactions menu has a "Script" option for running server side JavaScript which I guess would be my preferred solution due to its simplicity, however, I can't find any examples on the Net for what the syntax would be for activating a query at a certain time (or any other Salesforce activity for that matter.) Or if I need to rely on the SalesForce API for this (i.e., write a program to send a SOAP message to kick off the query), what would be the method to call for this? (Or maybe other options that I'm not aware of?)

1

You need to do this via Automation Studio. This is best practice for running queries as your current method is manual and does not tell you when the interaction is complete.

Steps:

  1. Go to Automation Studio
  2. Select "Scheduled Automation"
  3. Select "Create a new automation"
  4. Drag and drop the query from the right hand panel onto the canvas
  5. Select the query you want to run
  6. On the 3 tab, you get to schedule the automation (determine its frequency)
  7. Click Save

This should work just fine for you. For this use case, there is no need to complex scripting / API triggers as the UI can handle it. For more information please visit:

Automation Studio: SQL Activities

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.