本文へ移動
cccskills
無料GitHub で公開

scheduled-path-patterns

Scheduled Paths in record-triggered Flow: delayed execution, time-offset from field, batch size tuning, monitoring Paused Flow Interviews, async limits. NOT for picking between Scheduled Path, Wait and Scheduled Flow, or migrating time-based workflow rules — use flow/flow-time-based-patterns. NOT for a flow that runs on a recurring schedule — use flow/scheduled-flows.

インストール方法を見る

含まれるファイル(7)

  • SKILL.md6.5 KB
  • references/examples.md7.6 KB
  • references/gotchas.md6.0 KB
  • references/llm-anti-patterns.md3.4 KB
  • references/well-architected.md5.6 KB
  • scripts/check_scheduled_path_patterns.py2.3 KB
  • templates/scheduled-path-patterns-template.md633 B

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

Scheduled Path Patterns

Activate when designing a record-triggered Flow with delayed execution — "after 1 hour," "1 day before Close Date," "every Monday at 9 AM after creation." Scheduled Paths replace many time-based workflow rule use cases but have their own batching, monitoring, and failure semantics.

Before Starting

  • Understand the offset anchor. Scheduled Paths offset from either the record-triggered event time OR a field value on the record.
  • Plan for volume. Scheduled Paths queue paused Flow Interviews; bulk inserts create bulk paused interviews with batch-size tuning.
  • Know the monitoring surface. Setup → Paused Flow Interviews shows queued interviews; failures surface in the Flow debug log and Apex exception email.

Core Concepts

Offset types

  • From the trigger event: "1 hour after record is created"
  • From a field value: "3 days before CloseDate" — uses a datetime/date field on the record

Batch size

Salesforce processes paused interviews in batches (default 200, tunable in Process Automation settings). Batching controls governor limits for the collection of resumed flows.

Paused Flow Interview

When a Flow hits a Scheduled Path wait, it suspends as a Paused Flow Interview. The interview resumes at the scheduled time. Monitor at Setup → Paused Flow Interviews.

Execution context

Scheduled path execution runs in system context by default (like other record-triggered Flow), with its own governor limit scope. Updates to records made in the scheduled branch are separate transactions from the triggering transaction.

That default is set by the Flow and is not changed by the Summer '26 Apex inversion — no class apiVersion moves a record-triggered Flow into user mode. The version gate applies only to Apex invoked from the scheduled branch, where each invocable class's own .cls-meta.xml apiVersion decides its default database mode: at 67.0+ its SOQL, SOSL, DML and Database calls enforce the running user's sharing rules, FLS and object permissions with no keyword at all, while the same class pinned at 66.0 or earlier still defaults to system mode. So a scheduled path that worked can start throwing when that class's apiVersion is raised — upgrading the org's release does not, on its own, change anything. Canonical table: agents/_shared/AGENT_CONTRACT.md § Apex security idiom by API version.

Common Patterns

Pattern: Follow-up reminder 24 hours after creation

Record-Triggered Flow on Case Create → Scheduled Path 1 day after creation → Check IsClosed → If open, send notification to owner.

Pattern: Pre-renewal email 30 days before renewal date

Trigger on Contract update → Scheduled Path 30 days before RenewalDate__c → Send email alert.

Pattern: Re-check condition at path execution

Always re-query record state in the scheduled branch. The record may have changed between queue-time and execution-time.

Decision Guidance

NeedMechanism
Run N hours/days after record eventScheduled Path
Run at an absolute time (9 AM Monday)Scheduled Flow or cron
Run when a field value changesRecord-triggered Flow (no scheduled path)
Delayed re-check of async stateScheduled Path + re-query
High-volume time-based fan-outApex Schedulable + Queueable

Recommended Workflow

  1. Identify the offset anchor: event time vs field value.
  2. Define the exact offset (units: minutes, hours, days).
  3. Add explicit filter criteria to the path entry — avoid queuing millions of no-op interviews.
  4. In the scheduled branch, re-query or re-check the record's current state.
  5. Tune Process Automation batch size for your volume.
  6. Monitor Paused Flow Interviews in Setup; handle failures via admin email.
  7. Test with a bulk insert to confirm batch behavior.

Review Checklist

  • Offset type explicit (event vs field)
  • Entry criteria scoped tightly (no "always queue")
  • Scheduled branch re-checks current record state
  • Batch size reviewed for volume profile
  • Paused Flow Interview monitoring documented
  • Admin notification on scheduled-path errors enabled
  • Bulk insert test confirms expected behavior

Salesforce-Specific Gotchas

  1. Deleting the triggering record deletes its paused interview. The scheduled branch never runs for deleted records.
  2. Changing the source field after the path is scheduled does NOT reschedule. The scheduled time is computed once at entry.
  3. Flow version updates do not migrate paused interviews. Queued interviews execute under the version that queued them; test version swaps carefully.

Output Artifacts

ArtifactDescription
Scheduled Path designOffset anchor, filter, re-check logic
Monitoring runbookWhere to check Paused Flow Interviews + error emails
Volume test planBulk insert → expected queued count

Related Skills

  • flow/scheduled-flow-patterns — absolute-time scheduled flows
  • admin/migrate-workflow-pb — replacing time-based workflow rules
  • apex/apex-queueable-patterns — programmatic async alternatives

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

Use this skill when writing test-first, behavior-driven acceptance criteria in Given/When/Then format for a Salesforce user story. Covers happy path, edge cases, negative paths, permission boundaries, and data-state preconditions so the AC block can drive UAT scripts and Apex test design downstream. Trigger keywords: given when then, gherkin, behavior driven AC, test first acceptance criteria, scenario outline, BDD acceptance criteria. NOT for the user-story format itself (use admin/user-story-writing-for-salesforce). NOT for UAT script writing (use admin/uat-test-case-design). NOT for Apex test method generation (use agents/test-class-generator). NOT for high-level UAT planning (use admin/uat-and-acceptance-criteria). More triggers: acceptance criteria record, ac_id, req_id on a criterion, artefact under test, negative case for a rule-type requirement, no-match fall-through criterion, oracle for a Then clause, test type apex flow manual, criteria linter, check_ac_format.py, --manifest-dir.

日本語の概要は準備中です。原文の説明を表示しています。

PranavNagrecha/AwesomeSalesforceSkills192026年10月4日 更新

Task and Event objects: polymorphic WhatId/WhoId, Activity object model, ActivityHistory vs OpenActivity, activity timeline customization, bulk task creation, Einstein Activity Capture boundaries. NOT for turning on EAC or calendar sync — use admin/einstein-activity-capture-setup. NOT for Email-to-Case — use admin/case-management-setup. Covers ActivitiesSettings metadata, enableActivities, shared Task/Event custom fields and FLS, TaskStatus value sets, Shared Activities and TaskRelation/EventRelation, recurring and child activities, and partial-success bulk DML on Task.

日本語の概要は準備中です。原文の説明を表示しています。

PranavNagrecha/AwesomeSalesforceSkills192026年10月4日 更新

Design Invocable Apex actions that return deterministic, agent-friendly errors instead of surfacing raw exceptions to the LLM. NOT for authoring the action itself — @InvocableMethod schema, labels, security context — use agentforce/custom-agent-actions-apex. NOT for the Apex tests that force each error branch — use agentforce/agent-action-unit-tests.

日本語の概要は準備中です。原文の説明を表示しています。

PranavNagrecha/AwesomeSalesforceSkills192026年10月4日 更新

Use when designing how an Agentforce agent extracts structured input parameters (slots) from a user's natural-language utterance to invoke an action. Triggers: 'agent extract date from user', 'agent action argument extraction', 'agentforce slot filling', 'agent invocable input mapping', 'agent fails to fill required parameter'. NOT for action authoring (use agentforce/agent-actions) or for prompt-template variable binding (use agentforce/prompt-builder-templates).

日本語の概要は準備中です。原文の説明を表示しています。

PranavNagrecha/AwesomeSalesforceSkills192026年10月4日 更新

Apex test patterns for @InvocableMethod agent actions: per-reason-code branch coverage, bulk safety, callout mocking, deterministic assertions. NOT for testing whether the agent routes to the right topic or answers well — use agentforce/agent-testing-and-evaluation. NOT for designing the error envelope the tests assert on — use agentforce/agent-action-error-handling.

日本語の概要は準備中です。原文の説明を表示しています。

PranavNagrecha/AwesomeSalesforceSkills192026年10月4日 更新

Designing or reviewing Agentforce actions: Flow actions, Apex invocable actions, prompt-template actions, action naming, input and output contracts, confirmation requirements, and safe error behavior. Triggers: 'agent actions', 'build an agent that can look up an order', 'make the agent able to check order status', 'give the agent a capability', 'agent that can retrieve a record', 'flow action for agent', 'agent invocable action', 'action schema design'. NOT for writing the Apex class itself — use agentforce/custom-agent-actions-apex. NOT for the reason_code error envelope that stops an agent retry loop — use agentforce/agent-action-error-handling.

日本語の概要は準備中です。原文の説明を表示しています。

PranavNagrecha/AwesomeSalesforceSkills192026年10月4日 更新

PranavNagrecha のスキルをすべて見る

このスキルの問題を報告する