Skip to content

docs: add Dalgo integration entity classification (Step 1)#1571

Open
pokhiii wants to merge 3 commits intodevfrom
docs/dalgo-integration
Open

docs: add Dalgo integration entity classification (Step 1)#1571
pokhiii wants to merge 3 commits intodevfrom
docs/dalgo-integration

Conversation

@pokhiii
Copy link
Copy Markdown
Member

@pokhiii pokhiii commented Feb 17, 2026

Summary

  • Adds docs/dalgo-integration/step-1-entity-classification.md classifying all 12 CiviCRM entities as native (APIv4 out-of-the-box) or custom (ECK extension entities)
  • Covers API entity names, DB tables, ECK subtypes, custom field groups, and created_date/modified_date availability for incremental sync
  • Follows the action plan in docs/dalgo-integration/README.md (Step 1)

Test plan

  • Review entity classifications against the live CiviCRM instance
  • Verify ECK entity names match what cv api4 EckEntityType.get returns

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Documentation
    • Added comprehensive Dalgo integration guides: entity classification (native vs. custom), full API audit, and stepwise integration plan.
    • Includes per-entity data checklists, incremental sync verification, pagination examples, entity relationship mapping, PII/security handling guidance, known blockers and mitigation suggestions, and delivery timeline and handoff steps.

Classifies all CiviCRM entities (Collection Camp, Dropping Center,
Events, Activities, Volunteers, GCOC, Mailing, Dispatch, Feedback,
etc.) as native or custom (ECK), with API calls, DB tables, and
timestamp field availability to support Dalgo integration.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Feb 17, 2026

Walkthrough

Three documentation files added for Dalgo integration: an action plan for auditing CiviCRM API availability/behavior, a detailed entity classification mapping native vs. ECK custom entities with verification commands, and an API audit with per-entity findings, blockers, relationships, and sync/pagination guidance.

Changes

Cohort / File(s) Summary
Dalgo Integration Plan
docs/dalgo-integration/README.md
New action plan outlining stepwise API audit, per-entity data checklist, incremental sync verification, relationship mapping, deliverables, and timelines. Documentation-only; no code changes.
Entity Classification
docs/dalgo-integration/step-1-entity-classification.md
New detailed classification of CiviCRM entities into Native (APIv3/v4) vs. Custom (ECK), per-entity API names, DB tables, custom field groups, created/modified date presence, and verification commands.
API Audit & Findings
docs/dalgo-integration/step-2-api-audit.md
New API audit results from staging: REST endpoint/access notes, auth behavior, per-entity API endpoint/fields/pagination/incremental sync readiness, FK/relationship map, PII guidance, blockers needing code fixes, and next steps for authenticated validation.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

📋 A map of endpoints, fields, and ties we sing,
Native or ECK, each entity in ring,
Checklists and timelines, pages aligned,
Dalgo's audit traced, ready to refine. ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the primary change: adding documentation for Step 1 entity classification in the Dalgo integration. It is specific, concise, and directly reflects the main deliverable.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch docs/dalgo-integration

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

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@docs/dalgo-integration/README.md`:
- Line 25: The header "Step 2: For each of the 14 entities, produce this" is
inconsistent with the lists above which total 12; either change the header to
"12 entities" or add the two missing entities to the lists so they total 14;
update the text in the "Step 2" header (search for the exact phrase "Step 2: For
each of the 14 entities, produce this") and any related references in the README
to match the corrected entity count, and if adding entities ensure their names
follow the existing list format and ordering.
- Around line 61-80: The fenced code block containing the entity diagram (the
block that starts with triple backticks and the lines "Collection Camp ...
GCOC") lacks a language hint; update the opening fence to include a language
token (e.g., change ``` to ```text) so Markdownlint MD040 is satisfied and
tooling can treat it as plain text while keeping the block content unchanged.


For each custom entity — confirm whether CiviCRM auto-exposes an API (it usually does for entities registered via `hook_civicrm_entityTypes`), or if a custom API wrapper is needed.

## Step 2: For each of the 14 entities, produce this
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Fix the entity count mismatch.

Line 25 says “14 entities,” but the lists above total 12. This can confuse the audit scope. Either update the count or expand the list.

✏️ Proposed fix
-## Step 2: For each of the 14 entities, produce this
+## Step 2: For each of the 12 entities, produce this
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
## Step 2: For each of the 14 entities, produce this
## Step 2: For each of the 12 entities, produce this
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/dalgo-integration/README.md` at line 25, The header "Step 2: For each of
the 14 entities, produce this" is inconsistent with the lists above which total
12; either change the header to "12 entities" or add the two missing entities to
the lists so they total 14; update the text in the "Step 2" header (search for
the exact phrase "Step 2: For each of the 14 entities, produce this") and any
related references in the README to match the corrected entity count, and if
adding entities ensure their names follow the existing list format and ordering.

Comment on lines +61 to +80
```
Collection Camp
├── has Dispatch(es)
│ └── has Dispatch Acknowledgement
├── has Logistics
├── has Outcome
├── has Feedback
├── has Volunteers (contacts)
└── has Contributors (contacts, need count only)

Dropping Center
└── (same sub-entity structure as Collection Camp?)

Event
├── has Participants (registered/attended)
└── has Contributions (monetary)

GCOC
└── (what links to what?)
```
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Add a language to the fenced code block.

Markdownlint (MD040) flags the block without a language; add one for clarity and tooling compatibility.

📝 Proposed fix
-```
+```text
 Collection Camp
   ├── has Dispatch(es)
   │     └── has Dispatch Acknowledgement
   ├── has Logistics
   ├── has Outcome
   ├── has Feedback
   ├── has Volunteers (contacts)
   └── has Contributors (contacts, need count only)

 Dropping Center
   └── (same sub-entity structure as Collection Camp?)

 Event
   ├── has Participants (registered/attended)
   └── has Contributions (monetary)

 GCOC
   └── (what links to what?)
-```
+```
🧰 Tools
🪛 markdownlint-cli2 (0.20.0)

[warning] 61-61: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/dalgo-integration/README.md` around lines 61 - 80, The fenced code block
containing the entity diagram (the block that starts with triple backticks and
the lines "Collection Camp ... GCOC") lacks a language hint; update the opening
fence to include a language token (e.g., change ``` to ```text) so Markdownlint
MD040 is satisfied and tooling can treat it as plain text while keeping the
block content unchanged.

Document REST API endpoint testing results against staging,
including field lists, incremental sync support, pagination,
authentication (authx), entity relationships with foreign keys,
and PII handling for all 11 entities.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (3)
docs/dalgo-integration/step-2-api-audit.md (3)

9-11: Add language to the endpoint code fence.

Markdownlint flags this fence as missing a language. Consider http for endpoint examples.

Proposed fix
-```
+```http
 POST https://staging-crm.goonj.org/civicrm/ajax/api4/{Entity}/{action}
</details>

<details>
<summary>🤖 Prompt for AI Agents</summary>

Verify each finding against the current code and only fix it if needed.

In @docs/dalgo-integration/step-2-api-audit.md around lines 9 - 11, The code
fence containing the endpoint example ("POST
https://staging-crm.goonj.org/civicrm/ajax/api4/{Entity}/{action}") is missing a
language tag; update the opening fence to specify the language (use http) so markdownlint passes and the snippet is highlighted, keeping the POST line unchanged and the closing intact.


</details>

---

`14-17`: **Add language to the headers code fence.**

Same issue here—add a language tag (e.g., `http`) for consistency.

<details>
<summary>Proposed fix</summary>

```diff
-```
+```http
 Content-Type: application/json
 X-Requested-With: XMLHttpRequest
 ```
```
</details>

<details>
<summary>🤖 Prompt for AI Agents</summary>

Verify each finding against the current code and only fix it if needed.

In @docs/dalgo-integration/step-2-api-audit.md around lines 14 - 17, The headers
code fence in the documentation is missing a language tag; update the fenced
block that currently shows the HTTP headers (the "Content-Type:
application/json" / "X-Requested-With: XMLHttpRequest" block) to use the http
language tag by changing the opening triple backticks to ```http so the block is
rendered consistently and with proper syntax highlighting.


</details>

---

`207-313`: **Add language to the relationship map fence.**

This block should be tagged (e.g., `text`) to satisfy MD040 and improve readability.

<details>
<summary>Proposed fix</summary>

```diff
-```
+```text
 Collection Camp (Eck_Collection_Camp, subtype: Collection_Camp)
   │
   ├── Dispatch (Eck_Collection_Source_Vehicle_Dispatch)
   │     FK: Camp_Vehicle_Dispatch.Collection_Camp → Eck_Collection_Camp.id
   │     └── Dispatch Ack (same entity, Acknowledgement_For_Logistics.* fields)
   │
   ├── Feedback (Eck_Collection_Source_Feedback)
   │     FK: Collection_Source_Feedback.Collection_Camp_Code → Eck_Collection_Camp.id
   │
   ├── Camp Activity (Eck_Collection_Camp_Activity)
   │     FK: Collection_Camp_Activity.Collection_Camp_Id → Eck_Collection_Camp.id
   │
   ├── Logistics (same entity, Logistics_Coordination.* fields)
   │
   ├── Outcome (same entity, Camp_Outcome.* fields)
   │
   ├── Volunteer Feedback (same entity, Volunteer_Camp_Feedback.* fields)
   │
   ├── Material Contribution (Activity, type: Material Contribution)
   │     FK: Material_Contribution.Collection_Camp → Eck_Collection_Camp.id
   │
   ├── Volunteering Activity (Activity, type: Volunteering Activity)
   │     FK: Volunteering_Activity.Collection_Camp → Eck_Collection_Camp.id
   │
   └── Organizer Contact
         FK: Collection_Camp_Core_Details.Contact_Id → Contact.id
 ...
   └── Material Contribution (Activity)
         FK: target_contact_id → Contact.id
 ```
```
</details>

<details>
<summary>🤖 Prompt for AI Agents</summary>

Verify each finding against the current code and only fix it if needed.

In @docs/dalgo-integration/step-2-api-audit.md around lines 207 - 313, The
Markdown code fence containing the relationship map is missing a language tag
which triggers MD040; update the opening triple-backtick for the large block
beginning with "Collection Camp (Eck_Collection_Camp, subtype: Collection_Camp)"
to include a language identifier (e.g., ```text) so the block is fenced as plain
text; ensure the same fenced block (the one showing entities like Collection
Camp, Dropping Center, Event, GCOC / Institution Visit, Contact and their FK
lines) uses the language tag and that no other surrounding backticks are
altered.


</details>

</blockquote></details>

</blockquote></details>

<details>
<summary>🤖 Prompt for all review comments with AI agents</summary>

Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In @docs/dalgo-integration/step-2-api-audit.md:

  • Around line 9-11: The code fence containing the endpoint example ("POST
    https://staging-crm.goonj.org/civicrm/ajax/api4/{Entity}/{action}") is missing a
    language tag; update the opening fence to specify the language (use http) so markdownlint passes and the snippet is highlighted, keeping the POST line unchanged and the closing intact.
  • Around line 14-17: The headers code fence in the documentation is missing a
    language tag; update the fenced block that currently shows the HTTP headers (the
    "Content-Type: application/json" / "X-Requested-With: XMLHttpRequest" block) to
    use the http language tag by changing the opening triple backticks to ```http so
    the block is rendered consistently and with proper syntax highlighting.
  • Around line 207-313: The Markdown code fence containing the relationship map
    is missing a language tag which triggers MD040; update the opening
    triple-backtick for the large block beginning with "Collection Camp
    (Eck_Collection_Camp, subtype: Collection_Camp)" to include a language
    identifier (e.g., ```text) so the block is fenced as plain text; ensure the same
    fenced block (the one showing entities like Collection Camp, Dropping Center,
    Event, GCOC / Institution Visit, Contact and their FK lines) uses the language
    tag and that no other surrounding backticks are altered.

</details>

<!-- This is an auto-generated comment by CodeRabbit for review status -->

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant