Why am I seeing errors after a Salesforce Sandbox Refresh?

Resolution

The best way to recover from a sandbox refresh is to export your connection configuration and create a new connection to your new organization. If you would like to continue using the same schema for your new connection you will need to ensure the schema has no tables or does not exist, otherwise you'll need to pick a new schema to use.

To export your config for an existing connection follow these instructions:

  1. First export your connection configuration.

    You can export it via the dashboard by viewing your connection on https://connect.heroku.com, clicking "Settings" and selecting "Import/Export Configuration" from its dropdown. Once there click the "Export" button and follow the rest of the steps.

    Alternatively, you can use the Heroku Connect CLI Plugin:

    $ heroku connect:export -a application
    

    At this point you should have a file ending in .json with your configuration.

  2. Destroy the exiting Heroku Connect add-on.

    You can destroy the add-on via your Application Dashboard or via the Heroku CLI:

    $ heroku addons:destroy herokuconnect -a application
    
  3. Create a new Heroku Connect add-on and open the Connect dashboard:

    $ heroku addons:create herokuconnect -a application
    $ heroku addons:open herokuconnect -a application
    
  4. Authorize Heroku Connect to use your new Sandbox Organization.

  5. Import your old connection configuration.

    You can import it via the dashboard by viewing your connection on https://connect.heroku.com, clicking "Settings" and selecting "Import/Export Configuration" from its dropdown. Once there click the "Import" button and follow the rest of the steps to upload the file you downloaded in Step 1.

    Alternatively, you can use the Heroku Connect CLI Plugin:

    $ heroku connect:import -a application application-herokuconnect-concave-12345.json