Setup Page
The ‘Setup’ page in the application allows a user to input their Salesforce credentials, select and schedule objects, and configure other information for the replication of Salesforce data.

Salesforce Connection Parameters
The following parameters are used when authenticating with Salesforce:
- Instance Type
- The type of Salesforce instance being replicated:
- Production
- Sandbox
- Custom Domain
- If your Salesforce instance requires a specific domain for login, use the “Custom Domain” instance type and enter your domain in the “Custom Domain” section provided
- The type of Salesforce instance being replicated:
- Username
- A Salesforce user. This user must have API privileges. All data visible to this user will be replicated to the CapStorm database
- Password
- The password for the Salesforce user
- Security Token
- The Salesforce security token associated with the username provided. For more information regarding finding this token, seeing the following Salesforce page: https://help.salesforce.com/s/articleView?id=xcloud.user_security_token.htm&type=5

Once all of the above information is provided, the “Test Salesforce Credentials” button becomes selectable. Click this button to validate the provided credentials. Once successfully validated, the “Object Selection” table will be populated with all objects in the Salesforce instance that are visible to the user.

Settings Section
The settings section provides controls that will work across all created CopyStorm tasks. These options include the following:

- API Threshold
- Blocks Salesforce API usage if API usage exceeds the selected percentage before beginning job(s). For example, if 75% of available calls is selected, any CopyStorm or CopyStorm/Medic jobs will not execute if the current Salesforce API utilization is above 75% at the time of launch.
- Refresh Formulas
- Sets how often formulas are refreshed for all objects. When a formula definition changes in Salesforce, CopyStorm will not pick up the new definition because the timestamps stay the same. This tool will scan tables and update the associated formula columns in CopyStorm. For more information regarding this subject, see the following documentation: https://learn.capstorm.com/copystorm/reference/copystorm-medic/refresh-formulas/
- Retention Lock
- Sets how many days records deleted in Salesforce are kept in the CapStorm database. By default, deleted records are not kept in the database but by changing this selection a user can choose to keep deleted records for the selected amount of time, including forever.
Email Notifications Section
This is an optional section that allows users to input email addresses to receive email notifications after jobs with errors finish, or after every job finishes.

To successfully send emails out of the Snowflake environment, a Snowflake Notification Integration must be created in the Snowflake instance. By clicking the question mark icon next to the Integration Name label, an example SQL is displayed that can be used to create this Notification Integration. If an integration name or email addresses are already input, those values will be used inside of the example SQL. Otherwise, example values are used. It is important to note that only email addresses in the Notification Integration will be able to receive emails originating from Snowflake.

Object Selection Section
The object selection windows of the Setup page provides the ability to pick the objects to replicate as well as their cadence of replication. Different objects can be replicated in groups at the below schedules:
- Every 15 Minutes
- Runs every hour at the 0, 15, 30, and 45 minute marks
- Every Hour
- Runs every hour at the 0 minute mark
- Every Four Hours
- Runs at hours 0, 4, 8, 12, 16, and 20 at the 0 minute mark
- Every 12 Hours
- Runs at hours 0 and 12 at the 0 minute mark
- Every Day
- Runs once a day at the midnight
- Every Week
- Runs once a week on Sunday at midnight
It is important to note that these schedules are UTC based. This means that if a user is based in the U.S. eastern time zone (EST), selecting the “Every Day” schedule will run at midnight UTC, but 7:00PM EST.
The Filter input can be used to search for objects in the current list of objects displayed in the table. As well, the dropdown to the right of the Filter can be used to show objects based on their category (e.g. All, Standard, Custom, etc.).

The Modify Selected Schedules button allows a user to quickly update for all of the objects currently in the table that are active.

Saving the Configuration
Once all inputs and selections have been made, the Save button at the bottom of the page can be clicked to either save an initial configuration, or update a current configuration. In the case of updating a current configuration, any objects that have been newly selected, removed, or have an updated schedule will be automatically updated to the aligned task and will be replicated at the selected schedule.
The Run Now toggle can be used to immediately start replication of the selected objects. If multiple schedules have been selected, each CopyStorm task will execute one at a time until all are completed, then the tasks will run on their selected schedules. If the Run Now toggle is not selected, the CopyStorm tasks will run at the next time associated with the selected schedule for each task.
