Job-level scoping for tag-based action flow conditions
Objective
- Tag-based action flow conditions should be able to evaluate against any contact on the job, not only the current email/SMS recipient.
- Example: When any contact on the workorder has a VIP agent tag, send an office-facing email—even if the recipient being evaluated does not have that tag.
- Teams should not have to duplicate flows or work around recipient-only tag checks when the business rule is job-wide.
Background
- Product feedback (Southwest): a VIP agent tag should trigger an office email when any contact on the job has the tag, but the email does not fire because the condition only evaluates against the recipient.
- Today, email and SMS evaluate many conditions per recipient with
people: [recipient]while some attributes use_conditionScopePeoplefor full-roster context (seecontact-already-on-jobinattributePathResolver.ts). - The
tagsattribute resolver inattik-backend/src/util/functions/actionFlows/attributePathResolver.tsflattens tags from contacts oninspection.people; when evaluation is recipient-scoped, only that recipient’s tags are visible unless scope is widened. - This is a condition scoping product gap, not a one-off misconfiguration. Related work on duplicate/role conditions is tracked separately (see Related).
Scope
Product / UX
- Decision needed: Job-level vs recipient-level scope per condition type (tags only first, or a general “evaluate on job” mode for multiple attributes).
- Decision needed: For job-level tag rules on multi-recipient actions, should the action send once (office) vs per recipient—product behavior for non-recipient targets.
- Expose scoping clearly in the action flow condition UI (
attik-frontend/src/components/conditions/templatingData.ts).
Backend
- Tag resolution:
attributePathResolver.ts—tagsresolver and how it behaves with_conditionScopePeoplevspeople: [recipient]. - Evaluation:
conditionsResolver.ts; per-recipient paths inrenderEmail.tsandrenderSms.ts(recipient mock job +_conditionScopePeoplepattern). - Condition catalog:
templatingData.ts/backendTemplatingData.ts—tagscondition metadata. - Tests: Recipient without tag + another job contact with tag → job-scoped condition passes; recipient-only scope fails (documents current vs desired).
Out of scope
References
Status: Canceled
Log in to comment and vote
No comments yet
Be the first to share your thoughts.