Skip to content

CRM Data Access

The Advisor Console accesses Salesforce data directly via GraphQL UIAPI, providing type-safe queries and automatic schema introspection.

Data Model

Salesforce Custom Objects

ObjectPurposeKey Fields
Trip__cTrip recordsName, Stage__c, Start_Date__c, End_Date__c, Destination__c, Member__c
Destination__cDestination recordsName, Country__c, Region__c, Description__c
Quote__cBooking quotesName, Status__c, Trip__c, Member__c
Booking__cConfirmed bookingsName, Status__c, Trip__c, Member__c

Standard Objects

ObjectPurposeKey Fields
ContactMember recordsName, Email, Phone, Tier__c, Level__c
TaskAdvisor tasksSubject, Status, Priority, ActivityDate, WhoId

GraphQL UIAPI

The console uses Salesforce GraphQL UIAPI for all data access:

graphql
query GetMembers($where: ContactWhereInput) {
  uiapi {
    query {
      contacts(where: $where, first: 20) {
        edges {
          node {
            Id
            Name { value }
            Email { value }
            Phone { value }
          }
        }
        pageInfo {
          hasNextPage
          endCursor
        }
      }
    }
  }
}

Benefits over REST

  • Type-safe queries with automatic schema introspection
  • Single request for nested data (no over-fetching)
  • Built-in pagination with cursor-based navigation
  • Compile-time error detection

List Pages

Members List

  • 4-axis aggregated filtering: Type, Tier, Level, Status
  • Cursor-based pagination with stack-based back-navigation
  • Click-through to Member Detail page

Trips List

  • Stage and date range filters
  • "New Trip" modal for creating records
  • Click-through to editable Trip Detail page

Tasks List

  • Status and priority filters
  • Date range filtering
  • "All Tasks" / "My Tasks" toggle
  • Click-through to Task Detail page

Destinations List

  • Search and filter by country/region
  • Click-through to Destination Detail page

Mutations

Trip records support create and update via GraphQL mutations:

graphql
mutation CreateTrip($input: Trip__cInput!) {
  uiapi {
    mutate {
      createTrip(input: $input) {
        record {
          Id
          Name { value }
        }
      }
    }
  }
}

Context References

Advisors can attach member or trip records as context to AI searches via the ContextSearchPopover component. This provides the AI with relevant background information without requiring the advisor to manually copy details.

Marchay Platform Documentation