I have tried looking in the SFDC documentation, but I haven't really found anything that is useful.

Does anyone have any experience automating the refresh of sandboxes? One approach I was thinking was to use the SalesForce API.

Do you have any recommendations?

  • Why do you want to automate the refresh of sandboxes ? Commented Dec 14, 2015 at 17:19
  • @MihaiNeagoe we are using a Continuos integration process for development of unpackaged code. Unfortunately people make changes in production to layouts, profiles, and more. We pull these changes to our repository, but currently find is useful to refresh our sandboxes each week to save keep deploying code to our sandboxes. This saves so much time. Commented Dec 15, 2015 at 9:01
  • Have a look at this post goo.gl/iKMyks where it explains how you can delete all the components in a sandbox without having to refresh it. Commented Dec 15, 2015 at 9:11

1 Answer 1


There are no API methods for the creation nor refresh of Sandboxes, period.

A set of Selenium scripts could be authored to try to automate the UI clicking and waiting, but that's fragile and hacky and likely to cause you more frustration than just manually refreshing.

  • This is exactly what I thought! Have you had any experience with writing these scripts @daveespo ? Commented Dec 15, 2015 at 9:01
  • We haven't automated this specific thing via Selenium (sandbox refresh). But we have automated other administrative tasks (push upgrading subscriber orgs to the latest packages) and it does work -- it's just fragile so the time maintaining the script has to far outweigh the cost of doing it manually. Linked in the comment above by Mihai is an answer by someone at FinancialForce to this github.com/financialforcedev/df12-deployment-tools -- we've used this in the past too; it has some corner cases that it doesn't deal with (due to platform bugs) so you might want to start there
    – daveespo
    Commented Dec 15, 2015 at 12:55

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .