Why Shuffle playbooks need a datastore for state and deduplication
A SOC team that automates phishing triage or EDR enrichment in Shuffle quickly hits a problem: the same alert arrives twice, a playbook re-runs on it, and an analyst is paged again for an incident already handled. The Shuffle Datastore is a persistent key-value store shared by every workflow in a tenant, and its entries stay until someone deletes them. That persistence is what lets one workflow record that an item has been processed and another workflow check that record before acting.
The distinction that matters is lifetime. Workflow variables and execution variables only exist for the scope of a single run, so a new execution starts with no memory of the last one. If the question is whether this run should act, the answer depends on what earlier runs did, so the state has to live outside the execution. Teams should decide which values must survive between runs, such as a hash of an alert, a ticket reference or a blocked indicator, and place those in the Datastore. Values that only matter inside one run can stay in execution variables.
Before building on the Datastore, confirm three things in your own environment: who may read and write the shared keyspace in your tenant, how many keys your team expects to accumulate, and who owns cleanup, since entries persist until deleted. Each of these affects the design of your deduplication keys. Shuffle's documentation on workflows describes the Datastore actions available in Shuffle Tools, which is the next read once these decisions are drafted.
Datastore operations and when each fits
This table compares the four cache actions in Shuffle Tools, their matching API endpoints, and the bulk v2 endpoint, with the caller that suits each one. Read each row as a choice between an in-playbook step and an external script, then check the watch-outs before you write many keys or list a large category.
| Operation | Shuffle Tools action and API endpoint | Right caller | What to watch for |
|---|---|---|---|
| Set | Set cache action; set_cache endpoint | Playbook step that records a processed item key, such as an alert ID, after it is handled | Write the key only after the action that matters succeeds, or a failed run will look processed and be skipped later |
| Get | Get cache action; get_cache endpoint | Playbook condition that checks whether a key already exists before running enrichment or containment | Confirm how an empty result is handled in your branch logic so a missing key is not read as a duplicate by mistake |
| Delete | Delete cache action; delete_cache endpoint | Cleanup step after a case closes, or a scheduled script that expires stale keys | Deleting a key re-opens deduplication for that item, so confirm the item cannot still arrive from a noisy source |
| List | List cache action; list_cache endpoint | External script or scheduled audit job that reviews a category | Listing a large category returns many entries at once, so filter by category and avoid running it on every workflow execution |
| Bulk writes | Bulk v2 datastore endpoint (no Tools action named here) | External ingestion script that loads many keys, such as a threat feed or vulnerability list | Test batch size and error handling against your own instance, and check for partial writes before a retry |
| Protected keys | Stored with AES-256 encryption like app authentication | Secrets or tokens kept in the Datastore, read only by workflows that need them | Protection depends on the encryption setting; losing the encryption secret breaks access to stored values |
Building a deduplication pattern that stops repeat alerts
The documented Shuffle deduplication pattern has three moving parts: a unique key for each processed item, a check for whether that key already exists, and a skip when it does. The cards below cover the decisions that determine whether the pattern holds up under real alert volume, from key design and category use to check placement, expiry and parallel runs.
Choosing a key from stable fields
The key is the whole pattern. Build it from fields that do not change between repeats of the same event, such as the rule name, the affected host or account, and the detection time bucket, rather than free-text fields or fields the source rewrites. Test the key against a sample of real alerts from your SIEM or EDR before you rely on it. If two different events can produce the same key, you will silently drop real alerts, so check for collisions as well as for misses.
Shuffle workflows docsUsing categories to scope lookups
Datastore categories group keys so lookups can be scoped and found among thousands of entries. Give deduplication keys their own category, for example one per source or per playbook, so a check never matches an unrelated entry that happens to share a value. Decide the category naming convention before the first workflow writes to the store, because renaming categories later means migrating existing entries.
Placing the check early in the playbook
Put the existence check directly after the trigger, before enrichment, ticket creation or any action that calls an external API. Every step that runs before the check repeats work for each duplicate and can raise alert noise or consume API quota. Record the key only after the item has been processed successfully, or the pattern can mark an item as handled when a later step failed and it was never resolved.
Setting expiry for stored keys
Datastore entries persist until deleted, so a deduplication key written today stays in place indefinitely unless a workflow removes it. Decide how long a repeat should be suppressed, then schedule a cleanup step that deletes older keys, or include the time bucket in the key so old entries stop matching. Without an expiry rule, the store grows with every alert and a legitimate recurrence weeks later can be suppressed by a stale key.
Handling parallel runs and race conditions
Two executions that receive the same alert at nearly the same moment can both perform the check before either writes the key, so both proceed. Identify which triggers can fire in parallel, such as a webhook receiving bursts from one SIEM, and test that path with duplicated concurrent inputs. Where a duplicate must never proceed, consider a single writer per key or a check that runs in one serialized workflow path, and confirm the behavior on your Orborus concurrency settings.
Protecting keys that hold sensitive values
Protected Datastore keys are encrypted with AES-256 in the same way as app authentication and files. Use a protected key when the stored value identifies a person, account or host you would not want exposed to every workflow editor. Keep the key name itself free of sensitive content, since the name may still appear in lists and logs, and confirm which roles can read protected values in your tenant before you write them.
Setting up datastore state in a Shuffle workflow
This sequence takes a team from a confirmed Shuffle tenant to a tested workflow that stores state, skips repeat alerts on a second run and documents how entries are removed. Each step closes with a check the reader can repeat before moving on.
Confirm the deployment and target tenant
Before building anything, the platform owner confirms which Shuffle deployment and tenant the workflow will run in, and that the team has a test tenant separate from production. Confirm the running version in the admin settings and check that the backend and Orborus are healthy, since the Datastore is shared by every workflow in a tenant and a mistake in a shared tenant affects other playbooks. Check that the deployment is on a version that still receives support, and confirm the version with your vendor or the Shuffle release notes before you rely on any datastore behavior. Done when you can open the Datastore view in the test tenant and see it load without errors.
Create the categories you need
Create one datastore category for each kind of state the workflow will keep, such as processed alert IDs, enrichment results or suppression lists. Categories were added in Shuffle 2.1.0 to group keys so they can be found among thousands of entries, so set them up before the first write rather than sorting entries later. Give each category a name that describes its contents and record who owns it. Check: the categories appear in the Datastore view and an empty category returns no entries when listed.
Define the key naming scheme
Write down the key format for each category before any workflow uses it. A useful key is stable and unique for one item, for example a source system name combined with the alert or event identifier, so the same input always produces the same key. Avoid keys built from values that change between runs, such as timestamps or counters, because they defeat deduplication. Store the scheme in the workflow documentation so analysts and other engineers can build lookups that match. Check: take three sample alerts and confirm by hand that each produces one predictable key and that the same alert produces the same key twice.
Add get and set steps to a test workflow
In a test workflow, add a Get cache step that looks up the key built from the incoming alert, then a conditional branch and a Set cache step that writes the key only on the path where the item is new. The Shuffle Tools app provides Set cache, Get cache, Delete cache and List cache actions. Mark any value you intend to protect as a protected key if it holds credentials or sensitive data, and confirm that the protected setting is applied. Check: run the workflow once with a single sample alert and confirm in the Datastore view that the new entry appears in the expected category with the expected key.
Run the workflow against sample alerts
Feed a small set of sample alerts into the test workflow using a webhook or manual execution, including at least one alert that is intentionally identical to an earlier one. Use sample data that you have labeled as test data so nothing in production is affected. Review the execution results for each run, noting which items took the new path and which took the skip path. Check: the execution history shows one write for each distinct alert and no write for the repeat, and the Datastore holds one entry per distinct key.
Verify that a second run skips duplicates
Replay the same sample set through the workflow without changing any data, so every input is a repeat. The deduplication pattern writes a unique key for each processed item and skips any item whose key already exists, so each run should take the skip branch for every item. Confirm that no new datastore entries were created and that downstream actions did not fire for the repeated items. Also test one slightly changed alert to confirm it is treated as new, which shows the key scheme is specific enough. Check: the second run reports only skipped items, and the entry count in each category is unchanged.
Document the delete path and retention rules
Datastore entries persist until deleted, unlike workflow variables or execution variables, so the team must decide how and when keys are removed. Document a Delete cache step for each category, the conditions under which it runs, and who is allowed to run a manual cleanup. Use List cache to confirm which keys exist before any bulk removal, and record the process for protected keys. Test the delete path in the test tenant by removing one known test key and confirming it no longer appears in the Datastore view or in a Get cache lookup. Check: a deleted test key returns no result on the next lookup, and the runbook names the owner and the trigger for each cleanup job.
Protecting sensitive keys in the datastore
Protected Datastore keys are encrypted with AES-256, the same scheme Shuffle uses for saved app authentication and files, according to the Shuffle architecture docs. That makes a protected key the right place for values that would cause harm if read from the database or a backup, such as API tokens, webhook signing secrets or passwords that a playbook must reuse across runs. Plain keys suit everything else: deduplication markers that hold only an item identifier, timestamps, counters and category-grouped status values that analysts need to read during an investigation. Before you write a key, decide which class it belongs to, and record that decision in the playbook design so that a later editor does not store a credential as a plain value by mistake.
The encryption depends on the server secret configured for the deployment, the SHUFFLE_ENCRYPTION_MODIFIER value that the configuration docs describe for app credentials and API keys. Protected keys rely on the same material, so the practical consequence is the same: if that secret is lost or changed, values that were encrypted with it cannot be read back. Confirm with your Shuffle deployment owner where the value is stored, who can read it, and that it is included in your backup set. Store it in your organization's secrets manager rather than in a shared document, and treat any planned rotation as a project with a tested restore path, not as a routine configuration edit.
Before relying on protected keys in production, test the full cycle in a non-production instance: write a protected key, read it from a workflow, back up the database, restore it to a separate instance with the same secret, and confirm the value still resolves. Then test the failure case on a disposable copy by using a different secret and checking that the playbook fails visibly rather than writing empty values downstream. Confirm with Shuffle which protected key behavior applies to your version and edition, because the supplied facts do not describe how protected keys are exposed in the API or the audit trail. Record the results so that your security team can review the design against its own key management requirements.
How a deduplication check flows through Shuffle
The flow starts when an alert reaches a workflow trigger. The workflow derives a key from the alert and calls Get cache on the Datastore. A branch then either skips the item or processes it and calls Set cache, which the backend writes to OpenSearch. The workers that execute these steps run on the Orborus runtime, so check where the trust boundary sits before you decide which secrets and keys a step can reach.
Deduplication check across the Shuffle server and the Orborus runtime trust boundary.
Security and operational considerations for datastore entries
Datastore entries hold workflow state that other playbooks may trust, so their security depends on how the platform protects them and how your team manages them. The five cards below cover key protection, shared access, backup behavior, growth over time and change accountability. Confirm each point against your own version and configuration before you rely on it.
Protected keys and the encryption secret
Protected Datastore keys are encrypted with AES-256, the same scheme Shuffle uses for app authentication and files. The encryption depends on the SHUFFLE_ENCRYPTION_MODIFIER secret in your configuration, so the same secret that protects app credentials also protects protected datastore values. Losing or changing it breaks saved app authentications, which is a larger failure than a lost datastore key. Confirm where the secret is stored, who can read it, and how it is recovered if the host is lost.
Shared access across the tenant
The Datastore is shared by every workflow in a tenant, and entries persist until they are deleted. Any workflow with access to the tenant can read or overwrite a key another workflow depends on, so a key name chosen carelessly can collide with unrelated state. Use a clear naming convention with a prefix per workflow or integration, and decide which workflows may write to shared categories. Confirm which users and workflows can reach the Datastore in your tenant model before adding production playbooks.
Stored state on backup and restore
Datastore entries live in the platform database, so a restore brings back the state as it was at the backup time, not the state at the moment of an incident. A restored deduplication key can cause alerts to be skipped if it was written after the backup, or re-processed if it was deleted. Confirm that your backup covers the OpenSearch data, test a restore in a separate environment, and document how your team resets or reconciles dedup keys after a recovery.
Entry growth and cleanup over time
Deduplication writes one unique key for each processed item, so entry count grows with alert volume and nothing removes entries automatically unless your workflows do it. Large categories slow lookups and make manual review harder. Design a retention rule for each dedup category, such as a scheduled workflow that deletes keys older than your window using the Delete cache action or the API. Confirm the retention period with the analysts who depend on the dedup window before you choose it.
Audit of writes and deletions
A deleted or altered key can change which alerts are processed, so writes and deletions need an audit trail. Confirm what Shuffle records for datastore changes in your version, and whether the workflow execution history identifies which run wrote or deleted each entry. Where the platform log is not enough, have each workflow record its own key changes in your logging system. Review who holds administrative rights, since those users can change or remove any entry in the tenant.
Questions buyers ask about Shuffle datastore work
How much effort does a basic Shuffle deduplication pattern take?
A basic deduplication pattern, where each processed item gets a unique key and later runs skip items whose key already exists, is usually a small piece of work on one playbook. The effort rises with the number of playbooks that share keys, the care needed in key design (for example, whether a key combines alert ID, host and rule name), and how many executions can write to the same key at once. Each of these adds design review and test cases. Ask a partner to break the quote into key design, playbook changes, concurrency testing and handover, so you can see which part grows with your environment. Fixed-scope work is agreed in writing before it starts.
What does our team need to provide for datastore work?
The work needs three inputs from your side. First, SOC logic: the people who decide what counts as a duplicate, how long a suppression window should last and when a repeat alert should still reach an analyst. Second, a clear map of alert fields: which values are stable across repeats (for example, a rule identifier, an account name or a file hash) and which change on every event (timestamps, message IDs). Third, a test environment with a Shuffle instance that matches production closely enough to replay sample alerts. Without these, key design becomes guesswork and testing cannot show that real duplicates are caught.
Can a team build datastore deduplication on its own?
Yes, a team comfortable with Shuffle workflows can build a basic deduplication pattern without a partner, since the datastore actions are available in Shuffle Tools and the API. The harder parts are the ones that cause repeat-alert problems in production: key collisions, keys that never expire, protected keys that break when the encryption secret changes, and race conditions when several executions run at once. Teams often build the first version alone and bring in outside help to review key design, load-test concurrent runs and document the pattern for other playbooks. Decide early which of these tasks your team will own after handover.
How long does testing a datastore deduplication pattern take?
Testing time depends on how many alert types feed the pattern, how many concurrent executions you expect and how much historical data you can replay. A useful test plan covers first-seen alerts, exact repeats, near repeats with changed fields, expired keys, failed writes and parallel runs writing the same key. Each alert type adds test cases, and concurrency tests need a staging Orborus setup that can run more than one execution. Ask for the test plan and its acceptance criteria in the quote, and confirm with your vendor how the datastore handles simultaneous writes in the version you run, since behavior should be checked against your own environment rather than assumed.
Does using the datastore change our Shuffle licensing?
Shuffle prices on app runs, which are actions that actually execute in a workflow. Triggers and skipped actions are not counted, and users, apps and workflows are unlimited. A deduplication check that stops a workflow early therefore affects the count only through the actions that still run. Datastore calls are actions, so a check that runs on every alert adds app runs even when it skips the rest of the playbook. Model your expected alert volume against the actions that execute, and confirm the current metric and paid tier terms with Shuffle before you commit, since pricing terms can change.
What should we ask a partner for in a datastore quote?
A quote should follow from a written scope, so ask for the list of playbooks and alert sources in scope, the key design for each, and the datastore operations the pattern uses (set, get, delete and list cache, or the bulk v2 endpoint). Ask how protected keys are handled, including what happens to them if the encryption secret changes, and how expired or stale keys are cleaned up. Request the test plan, the environment needed for testing, the handover documents and any retainer for later changes. Also ask which items the client team must supply, such as field samples and an analyst to approve suppression rules.
Who owns the deduplication logic after the work is delivered?
Your team should own the logic after handover, and the quote should say so explicitly. Ownership covers the key naming standard, the suppression windows, the playbook versions and the runbook for changing them. Keep the pattern documented in the workflow itself and in your team's notes, and store exported workflows under version control so changes are reviewed. If you later need changes to many playbooks, a retainer or a new scoped engagement is a clearer route than ad hoc edits. Confirm with the partner which support options and response expectations are included, since these vary by agreement.
Shuffle documentation for datastore and state
Before you build a datastore-based playbook, read the Shuffle workflows documentation first, because it defines the operations you will call and the deduplication pattern this topic relies on. The Shuffle workflows docs explain the difference between the persistent Datastore and workflow or execution variables, which matters because a Datastore entry survives after the run that wrote it ends. Confirm in that article which Shuffle Tools actions and API endpoints your Shuffle version exposes, since your automation will depend on their exact names and behavior. Also check how the docs describe bulk writes through the v2 datastore endpoint before you design loops that touch thousands of keys.
The Shuffle 2.1.0 release article is the next read for datastore categories, which were added in Shuffle 2.1.0 to group keys so they can be found among thousands of entries. Use it to decide how your team will name categories for each data type, such as processed alert IDs or enrichment cache, because renaming categories later means changing every workflow that references them. Review the release notes against the version you run, and note that Shuffle 2.1.0 is older than the enforced license limits that arrived with v2.1.1, so check your edition and limits before you rely on high entry counts.
The Shuffle architecture docs cover where Datastore data lives and how protected keys are encrypted with AES-256, the same scheme used for app authentication and files. Plan who holds the encryption secret, how it is backed up, and what happens during a restore, because the configuration documentation warns that changing that secret breaks saved app authentications. Ask your architect to confirm how the OpenSearch backend stores Datastore documents in your chosen deployment, so backup and retention scope match what you actually need to keep.
How DeployOpen scopes and delivers Shuffle datastore work
DeployOpen plans and builds the Shuffle Datastore pieces a workflow depends on: key naming, categories, protected keys and the deduplication pattern. We set these up inside the client's own Shuffle instance, test them against realistic alert volumes and hand over the design with the workflows that use it.
How we scope
- Engagements are fixed-scope, with the datastore keys, categories and workflows in scope agreed in writing first.
- We map which playbooks need state between runs and which should stay on workflow or execution variables.
- We agree which keys are protected and who holds the decision on what gets encrypted and retained.
- Ask for the written scope to list every workflow touched, every key namespace and the expected datastore volume.
How we build
- We design a unique key for each processed item, using fields the source system guarantees are stable.
- Deduplication workflows are built with Shuffle Tools Set cache, Get cache and Delete cache actions, then tested with repeat inputs.
- Categories are set up so keys can be found among thousands of entries without manual searching.
- Test cases cover first runs, repeat alerts, expired or deleted keys and concurrent executions writing the same key.
How we hand over
- You receive the key naming scheme, category list and protected key inventory as written documentation.
- Each deduplication workflow is delivered with its test inputs, expected results and a short runbook.
- We walk your team through clearing or deleting entries and what happens to running workflows during the change.
- Ask whether the handover includes exported workflow JSON so your team can restore the design in another environment.
How we support
- Ongoing support, upgrades and continuous testing are available as retainers after handover.
- Retainer work can cover checks of datastore growth, key collisions and changes after Shuffle version upgrades.
- Confirm with us how protected keys are handled during upgrades, since the encryption secret must stay unchanged.

