Skip to main content

TeeTime Service Events

Events from the TeeTime booking and golf management service.


Overview

TeeTime handles tee time bookings, player profiles, handicaps, and competitions. Events from TeeTime drive activity tracking and engagement scoring.


teetime.player.created

Fired when a new player is created.

{
type: "teetime.player.created",
identity: {
teetimePlayerId: "player_uuid_123",
email: "john@example.com",
phoneNumber: "+27821234567"
},
payload: {
id: "player_uuid_123",
name: "John",
surname: "Smith",
email: "john@example.com",
phone: "+27821234567",
handicap: 12.5,
homeClubId: "club_123",
homeClubName: "Randpark Golf Club",
createdAt: "2025-12-14T10:00:00Z"
}
}

CRM Actions:

  1. Resolve identity → find or create CustomerProfile
  2. Link teetimePlayerId to profile
  3. Sync player data (handicap, homeClub)
  4. Create PROFILE_CREATED activity if new

Priority: Normal


teetime.player.updated

Fired when player details are updated.

{
type: "teetime.player.updated",
identity: { teetimePlayerId: "player_uuid_123" },
payload: {
id: "player_uuid_123",
changes: ["handicap", "homeClubId"],
handicap: 11.8,
homeClubId: "club_456",
homeClubName: "Royal Johannesburg"
}
}

CRM Actions:

  1. Update changed fields on profile
  2. Create PLAYER_UPDATED activity

Priority: Normal


teetime.handicap.updated

Fired when handicap is updated (from association sync).

{
type: "teetime.handicap.updated",
identity: {
teetimePlayerId: "player_uuid_123",
externalIds: { golfRsaId: "RSA-2024-12345" }
},
payload: {
playerId: "player_uuid_123",
previousHandicap: 12.5,
newHandicap: 11.8,
source: "GOLF_RSA",
effectiveDate: "2025-12-14T00:00:00Z"
}
}

CRM Actions:

  1. Update handicap and handicapUpdatedAt
  2. Create HANDICAP_UPDATED activity

Priority: Normal


teetime.booking.created

Fired when a tee time is booked.

{
type: "teetime.booking.created",
identity: { teetimePlayerId: "player_uuid_123" },
payload: {
id: "booking_789",
playerId: "player_uuid_123",
clubId: "club_123",
clubName: "Randpark Golf Club",
courseId: "course_456",
courseName: "Bushwillow Course",
startTime: "2025-12-20T06:30:00Z",
players: 4,
status: "CONFIRMED",
bookedAt: "2025-12-14T10:00:00Z"
}
}

CRM Actions:

  1. Create TEETIME_BOOKED activity
  2. Increment bookingCount30d, bookingCountTotal
  3. Update lastBookingAt, lastActivityAt

Priority: Normal


teetime.booking.completed

Fired when a tee time is completed (checked in/out).

{
type: "teetime.booking.completed",
identity: { teetimePlayerId: "player_uuid_123" },
payload: {
id: "booking_789",
playerId: "player_uuid_123",
clubId: "club_123",
clubName: "Randpark Golf Club",
startTime: "2025-12-20T06:30:00Z",
completedAt: "2025-12-20T11:00:00Z",
score: 82
}
}

CRM Actions:

  1. Create TEETIME_COMPLETED activity
  2. Trigger engagement score refresh

Priority: Normal


teetime.booking.cancelled

Fired when a booking is cancelled.

{
type: "teetime.booking.cancelled",
identity: { teetimePlayerId: "player_uuid_123" },
payload: {
id: "booking_789",
reason: "weather",
cancelledAt: "2025-12-19T18:00:00Z"
}
}

CRM Actions:

  1. Create TEETIME_CANCELLED activity

Priority: Normal


teetime.booking.noshow

Fired when player doesn't show up.

{
type: "teetime.booking.noshow",
identity: { teetimePlayerId: "player_uuid_123" },
payload: {
id: "booking_789",
scheduledTime: "2025-12-20T06:30:00Z"
}
}

CRM Actions:

  1. Create TEETIME_NOSHOW activity
  2. Consider for churn risk calculation
  3. Update no-show tracking

Priority: Normal


teetime.competition.entered

Fired when player enters a competition.

{
type: "teetime.competition.entered",
identity: { teetimePlayerId: "player_uuid_123" },
payload: {
competitionId: "comp_456",
competitionName: "Club Championship 2025",
playerId: "player_uuid_123",
entryDate: "2025-12-14T10:00:00Z",
competitionDate: "2025-12-28T07:00:00Z"
}
}

CRM Actions:

  1. Create COMPETITION_ENTERED activity

Priority: Low


teetime.competition.completed

Fired when player completes a competition.

{
type: "teetime.competition.completed",
identity: { teetimePlayerId: "player_uuid_123" },
payload: {
competitionId: "comp_456",
competitionName: "Club Championship 2025",
playerId: "player_uuid_123",
grossScore: 78,
netScore: 72,
position: 5,
completedAt: "2025-12-28T14:00:00Z"
}
}

CRM Actions:

  1. Create COMPETITION_COMPLETED activity
  2. Update engagement score

Priority: Low


teetime.score.posted

Fired when a score is posted (outside competition).

{
type: "teetime.score.posted",
identity: { teetimePlayerId: "player_uuid_123" },
payload: {
playerId: "player_uuid_123",
clubId: "club_123",
courseId: "course_456",
grossScore: 85,
date: "2025-12-14T00:00:00Z",
postedAt: "2025-12-14T14:00:00Z"
}
}

CRM Actions:

  1. Create SCORE_POSTED activity

Priority: Low


Event Priority Summary

EventPriorityReason
teetime.player.createdNormalProfile creation/linking
teetime.player.updatedNormalProfile update
teetime.handicap.updatedNormalGolf data update
teetime.booking.createdNormalEngagement tracking
teetime.booking.completedNormalEngagement scoring
teetime.booking.cancelledNormalActivity tracking
teetime.booking.noshowNormalChurn risk indicator
teetime.competition.enteredLowActivity tracking
teetime.competition.completedLowActivity tracking
teetime.score.postedLowActivity tracking