<aside>

You can use a hutte.yml file to customize your Scratch Orgs and Sandbox Features. This allows you to accomplish things like adding automation when creating your Scratch Orgs, or adding custom-coded buttons to your Sandbox and Scratch Org features to accomplish specific tasks with just a click.

</aside>

Adding a hutte.yml configuration to your Git repository

<aside>

  1. To get started, create an empty file in the root directory of your connected Git repository and name it hutte.yml. </aside>

<aside>

  1. Add the following file to the root directory of your SFDX project and Git commit/push it:

hutte.yml

</aside>

Configuring your project’s Hutte.yml file

<aside>

  1. Now that your hutte.yml file is set up, you can customize it to suit your project’s needs. </aside>

<aside>

  1. Under Project Settings, navigate to the “Scripts (Hutte.yml)” tab. This will show you the current hutte.yml file that is connected through your Git repository. </aside>

<aside>

Screenshot 2024-08-26 at 12.42.27.png

</aside>

<aside>

  1. You can make changes to your hutte.yml file in a text editor and then commit the changes to Git. Those updates will be reflected here, under Project Settings. </aside>

<aside> <img src="/icons/flash_yellow.svg" alt="/icons/flash_yellow.svg" width="40px" /> You can get inspiration for crafting your hutte.yml from the Recipes section within Hutte.

</aside>

Anatomy of a Hutte.yml file

<aside>

Here’s an overview of the main sections you’ll find in your hutte.yml file:

</aside>

<aside>

  1. setup_script (optional; Scratch Org Projects only)
    1. Contains whatever scripts you want to run directly after your Scratch Org is created.
    2. You can use this script to specify a different Setup behavior for regular Scratch Orgs (created via "New Scratch Org") and Pool Orgs. Pool Orgs stop after setup_script, while regular Scratch Orgs will execute setup_script first, followed by push_script. </aside>

<aside>

  1. push_script (required; Scratch Org Projects only)
    1. Runs after setup_script. It is typically used to push your project's source, assign permission sets, load seed data, etc. </aside>

<aside>

  1. custom_scripts (optional; Scratch Org and Sandbox Projects)
    1. Here, you can specify unique custom scripts that your project’s users will be able to execute via custom buttons. This feature is perfect for non-mandatory, time-consuming actions that users only want to execute selectively, such as loading specific sets of test data.
    2. Each entry in this section will be reflected as a custom button in the respective detail view of Sandbox Features or Scratch Orgs in Hutte, depending on whether you place the script under scratch_org:or sandbox:. </aside>

Example Hutte.yml file

<aside>

This is a very simple hutte.yml, which adds one custom button to the Hutte project detail view for both Scratch Org and Sandbox projects. When clicked, the button will import seed data, leveraging the open source SF Plugin SFDMU.

</aside>

<aside>

https://downloads.intercomcdn.com/i/o/915191234/4839bb0db0bd87658a361a2d/image.png?expires=1721741400&signature=e4db6ad3abb415fd9e17613703464358592c92001d34bc9789bab7c13e7c4716

</aside>

<aside>

You can also optionally add a custom success message to a custom button you’ve created by adding the property "success_message" into its entry in your Hutte.yml. This text can be formatted and can also hold hyperlinks.

</aside>

<aside>

Screenshot 2024-07-23 at 16.37.57.png

</aside>

<aside>

Here’s an example of what the end result of this custom button script will look like in Hutte:

</aside>

<aside>

ExampleYML.png

</aside>