Skip to content

Vn/slack campaign summary payload#487

Draft
neal-bpm wants to merge 3 commits intomainfrom
vn/slack-campaign-summary-payload
Draft

Vn/slack campaign summary payload#487
neal-bpm wants to merge 3 commits intomainfrom
vn/slack-campaign-summary-payload

Conversation

@neal-bpm
Copy link
Copy Markdown
Contributor

@neal-bpm neal-bpm commented Mar 31, 2026

Describe your changes

Formats CampaignDeliverySummary data into Slack messages using Block Kit for campaign completion updates.

Changes:

  • Add build_delivery_summary/2 to PayloadBuilder for Slack Block Kit formatting
  • Add campaign_id field to CampaignDeliverySummary struct
  • Introduce Slack.CampaignDeliverySummary module with send_summary/2

Message format includes:

  • Header with program name and campaign link
  • Date/time range (same-day vs multi-day formatting)
  • Total and completed delivery counts
  • Rider sections with task lists and completion status
  • Unassigned deliveries section (when applicable)

Checklist before requesting a review

  • I have performed a self-review of my code
  • If it is a core feature, I have added tests.
  • Are there other PRs or Issues that I should link to here?
  • Will this be part of a product update? If yes, please write one phrase
    about this update in the description above.

#476

This module provides a data structure to consolidate campaign delivery information into a summary format suitable for various use cases.
  * Track total and completed task counts
  * Group assigned deliveries by rider name
  * Collect unassigned deliveries separately
  * Implement Collectable protocol for use with Enum.into/2
  * Include delivery details: dropoff name, status, and item names
  Add name, delivery_start, and delivery_end fields to the struct.
  Add new/1 function that accepts a campaign and pre-populates these metadata fields from campaign.program.name and timestamps.
Formats CampaignDeliverySummary data into Slack messages using Block Kit for campaign completion updates.

Changes:

- Add build_delivery_summary/2 to PayloadBuilder for Slack Block Kit formatting
- Add campaign_id field to CampaignDeliverySummary struct
- Introduce Slack.CampaignDeliverySummary module with send_summary/2

Message format includes:

- Header with program name and campaign link
- Date/time range (same-day vs multi-day formatting)
- Total and completed delivery counts
- Rider sections with task lists and completion status
- Unassigned deliveries section (when applicable)
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 31, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 3475b994-d06f-4b66-b115-a3c26532c5f3

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch vn/slack-campaign-summary-payload

Comment @coderabbitai help to get the list of available commands and usage tips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

1 participant