# Defining Data Retention For Recipes
If storing data externally or API performance is a sensitive subject for your organization, worry no more. You can define if job data is stored on a recipe-by-recipe basis, providing control over compliance and performance.
The Jobs data retention recipe setting allows you to:
- Comply with your organization's data protection and security standards
- Ensure sensitive data isn't stored outside your firewall
- Decrease the latency of an API recipe
In this guide, we'll cover how:
- How does the Jobs data retention setting work?
- How is data affected?
- How are test jobs affected?
- How are repeated jobs affected?
- How can I troubleshoot job failures?
- Will changing a recipe's retention setting affect existing data?
# How does the Jobs data retention setting work?
The Jobs data retention recipe setting defines if job data is stored for the recipe.
This setting, located in a recipe's Settings > Data retention tab, has two options:
Default retention policy. When selected, your workspace's data retention policy will apply. If, for example, the retention policy is 30 days, the recipe's data will be retained for 30 days.
Do not store. When selected, Workato won't store any data for the recipe. You might select this option to:
- Manage risk associated with storing sensitive or personally-identifying data
- Decrease the latency of an API recipe by skipping log creation
Before selecting this option, make sure the recipe doesn't require job logs. Refer to the next section for more info.
# How is data affected?
When Do not store is selected, certain types of data or features in Workato may be modified or entirely unavailable. Here's a quick look at how things will change:
Job history summary: No change. Job ID, history, duration, and so on will remain visible in the recipe's Jobs tab.
Job History Details page with retention disabled
Additionally, this is also true when a job fails:
Failed job on Job History Details page with retention disabled
Error information for failed jobs is only available for test jobs.
Customized job reports: Customized job report data will be unavailable. This applies to jobs completed after retention is disabled.
Consider the example below. Non-test jobs completed after retention was disabled are highlighted. Notice that the custom job report data isn't present for these jobs:
Customized job reports with retention disabled
# How are test jobs affected?
Test jobs will be unaffected. Data is stored for test jobs to ensure you can test and troubleshoot your recipe while building. Your workspace's data retention policy applies to retained test job data.
For example, consider the job history in the image below. Retention was disabled for this recipe beginning with the 4:58:23 pm job. Highlighted is a test job that was completed after retention was disabled:
Test job with data retained
And the Job history details page for the job:
Job history details page for test job
If a test job fails, details about the failure - including error messages, IDs, and so on - will be visible on the Job history details page for the job:
Job history details page for failed test job
# How are repeated jobs affected?
You won't be able to repeat a failed job, as no data will be available to perform the rerun:
Disabled Repeat this job button on the Job Details page
# How can I troubleshoot job failures?
Info about errors in failed jobs is available only in test jobs when retention is disabled. To avoid issues when your recipe is running, we recommend:
- Thoroughly testing each recipe step during development
- Building error handling into the recipe to account for issues
Additionally, note that failed jobs cannot be repeated when retention is disabled.
# Will changing a recipe's retention setting affect existing data?
No. Updating the Jobs data retention setting affects recipe data created after the setting has been updated.
For example, if you select Do not store for a recipe, the recipe's existing data will be retained until your workspace's data retention period has passed. New data created after the setting is updated won't be stored.
This is highlighted in the image below. Retention was disabled for this recipe beginning with the 4:58:23 pm job. Jobs completed before this still have their data retained:
Jobs before retention was disabled with data retained
# Configuring Recipe Data Retention
In your Workato account, open a recipe.
If the recipe is currently running, click Stop recipe before proceeding.
On the recipe's details page, click Settings > Data retention:
Recipe-level data retention policy
In the Jobs data retention field, select an option:
Default retention policy: If selected, data for the recipe will be retained according to the workspace's data retention policy. If the workspace's retention policy is 45 days, for example, data for the recipe will be retained for 45 days.
Do not store: If selected, recipe data created after saving won't be stored.
When finished, click Save.