inChurch
Modules

People

The People Management module is the core of the InChurch API, providing comprehensive functionality for managing church members, visitors, and leaders. This module handles all aspects of person-related data including personal information, membership status, roles, and relationships.

Overview

The People Management system supports the complete lifecycle of church membership:

  • Visitor Registration: Initial contact and information collection
  • Member Onboarding: Converting visitors to active members
  • Profile Management: Maintaining comprehensive member profiles
  • Role Assignment: Managing leadership and ministry roles
  • Status Tracking: Monitoring membership status and changes

Core Concepts

Person Types

The system distinguishes between different types of people:

TypeDescriptionTypical Use
VisitorFirst-time or occasional attendeesInitial contact, follow-up
FrequentFirst-time or occasional attendeesInitial contact, follow-up
MemberActive church membersFull participation, voting rights
LeaderMembers with leadership responsibilitiesMinistry oversight, decision making
PastorOrdained ministry leadersSpiritual leadership, sacraments

It also allows to check for leadership roles:

TypeDescriptionTypical Use
LeaderMembers with leadership responsibilitiesMinistry oversight, decision making
PreacherOrdained ministry leadersSpiritual leadership, sacraments

Membership Status

Each person has a status that reflects their current relationship with the church:

  • pending - Recently added, pending verification
  • approved - Current, participating member
  • refused - Request refused, not participating
  • inactive - Not currently participating (with reason tracking)

Profile Information

The system maintains comprehensive profiles including:

Personal Data

  • Full name, gender, birthday
  • Contact information (email, phone, WhatsApp)
  • Address (domestic and international support)
  • Documents (CPF, RG, passport)

Spiritual Journey

  • Decision date (when they accepted Jesus)
  • Baptism information and date
  • Church membership history
  • Ministry involvement

Family & Relationships

  • Marital status and marriage date
  • Family connections
  • Emergency contacts

Church Participation

  • Membership start date
  • Small group affiliations
  • Ministry roles and responsibilities
  • Attendance patterns

Webhooks Integration

The People Management module supports webhooks for real-time notifications:

Available Events

  • person.created - New person added to the system
  • person.create_requested - Request to add a new person
  • person.create_rejected - Request to add a new person was rejected
  • person.update_requested - Request to update person information
  • person.updated - Person information changed
  • person.request_rejected - Request to update person information was rejected
  • person.deleted - Person removed from the system

Webhook Payload Example

The data sent in all people related events will follow the People Detail Schema

//to-do: acertar exemplo

JSONCode
{ "id": "uuid-webhook-delivery-id", "event": "person.created", "timestamp": "2023-12-15T10:30:00Z", "data": { // Affected [person object data](/api/~schemas#people) } }

Best Practices

Data Privacy

  • Always respect privacy settings and consent
  • Follow LGPD/GDPR guidelines for data handling

Performance Optimization

  • Use webhooks to track profile changes instead of request pooling
  • Use filtering and pagination for large datasets
  • Cache frequently accessed data

Data Quality

  • Implement validation for email addresses and phone numbers
  • Verify document numbers (CPF, RG) when possible
  • Maintain data consistency across related records

Use Cases

1. Visitor Follow-up System

Create automated follow-up workflows for new visitors:

JavascriptCode
// Get recent visitors const visitors = await fetch('/api/v1/people?status=pending&created_after=2023-12-01') .then(r => r.json()); // Process each visitor for follow-up for (const visitor of visitors.data) { if (visitor.has_whatsapp) { // Send WhatsApp welcome message await sendWhatsAppMessage(visitor.mobile_phone, 'welcome_template'); } // Assign to follow-up team await assignFollowUp(visitor.id, 'visitor_care_team'); }

2. Leadership Directory

Generate leadership contact lists:

JavascriptCode
// Get all current leaders const leaders = await fetch('/api/v1/people?is_leader=true&status=active') .then(r => r.json()); // Group by role const leadershipDirectory = leaders.data.reduce((acc, leader) => { leader.roles.forEach(role => { if (!acc[role.name]) acc[role.name] = []; acc[role.name].push({ name: leader.full_name, email: leader.email, phone: leader.mobile_phone }); }); return acc; }, {});

4. Membership Analytics

Generate membership reports:

JavascriptCode
// Get membership statistics const stats = { total: await getPeopleCount(), active: await getPeopleCount('status=active'), leaders: await getPeopleCount('is_leader=true'), newThisMonth: await getPeopleCount(`created_after=${getMonthStart()}`), baptizedThisYear: await getPeopleCount(`baptism_date_after=${getYearStart()}`) }; async function getPeopleCount(filter = '') { const url = `/api/v1/people?limit=1${filter ? '&' + filter : ''}`; const response = await fetch(url).then(r => r.json()); return response.meta.pagination.total; }
Last modified on