Enumerations
All enumerations are StrEnum, so a member is its string value. That means a member can be
passed straight into a SQL comparison, a JSON payload, or an f-string without .value, and
json.dumps() serialises it without a custom encoder.
The database enums live in libs/morpheus-data-layer/morpheus_data_layer/enums.py. The ORM
builds its PostgreSQL ENUM types from these classes with create_type=False
(see ORM models), so the Python members and the database type cannot
drift in their values — but they can drift in their membership.
|
Adding a value is a three-step change in a fixed order: change the web application’s Prisma schema, migrate the database, then add the member here. Adding it here first produces a runtime error on insert, because PostgreSQL rejects a value its type does not know. |
Seller
| Enum | Members |
|---|---|
|
|
|
|
|
|
SellerLifeCycleStage is the ladder a business climbs from discovery to close. Only the first
few transitions are automated: enrichment-scraper creates
rows at new, and enrichment-scorer advances them to
enriched. Everything from engaged onward is set by human activity in HubSpot and mirrored
back. See Outbound funnel.
|
The Prisma schema declares a different set for this enum — |
Contact
| Enum | Members |
|---|---|
|
|
|
|
|
|
|
|
|
|
ContactLifecycleStage values are unpunctuated on purpose — marketingqualifiedlead, not
marketing_qualified_lead. They are HubSpot’s own internal values, copied verbatim so the
mirror needs no translation table. ContactLeadStatus, by contrast, is snake_case and is
mapped when written to the CRM.
ContactHeatStatus is Morpheus’s own engagement temperature, not a HubSpot concept. What
earns each level is described in CRM sync.
|
|
| Enum | Members |
|---|---|
|
|
|
|
|
|
|
|
|
|
EmailTargetCategory is the output schema of the reply classifier — it is the
structured_output_model the Bedrock call is constrained to, which is why the agent can never
invent a category. other is the fallback that keeps an unrecognised reply from failing the
message. See Email engagement.
bounced, unsubscribed, and blocked in EmailTargetStatus are terminal suppression
states — see suppression.
Telephony
| Enum | Members |
|---|---|
|
|
|
|
|
|
|
|
LineTypes members are camelCase because they are Twilio Lookup’s own line-type strings,
stored unmodified. A mobile result is what makes a number SMS-eligible and worth a dial;
see Phone line intelligence.
TargetState mixes lowercase workflow states with uppercase dialer outcomes. The uppercase
ones are terminal and carry specific meanings: DNC do-not-call, WN wrong number, MAX
maximum attempts reached, DT_PENDING awaiting a dial-tone retry. The mixed casing is the
upstream dialer’s convention, preserved rather than normalised. The state machine is described
in Daily call lists.
Tasks and activity
| Enum | Members |
|---|---|
|
|
|
|
|
|
FollowUpTaskStatus distinguishes skipped from failed: skipped is a deliberate decision
(suppressed, already covered by another task), failed is an error worth retrying. Only
pending and failed tasks are picked up by the HubSpot poll.
|
|
Enums outside the data layer
These are not database enums, but they are shared vocabulary across deployment units.
AgentModelIds
libs/morpheus-llm/morpheus_llm/utils/enums.py. The only sanctioned source of Bedrock model
identifiers.
| Member | Model id |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The |
Call dispositions
libs/pyb-hubspot/pyb_hubspot/disposition_outcomes.py.
| Enum | Members |
|---|---|
|
|
|
|
Disposition members are Title_Case_With_Underscores — the labels the dialer emits. HubSpot
does not accept them directly; it wants an opaque outcome GUID, and the mapping lives in
FIVE9_DISPOSITION_TO_HUBSPOT_GUID in lambdas/morpheus_hubspot/utils/constants.py. That
mapping is environment-specific: the GUIDs differ between the production and preview portals,
which is what HUBSPOT_ENVIRONMENT selects. See
Call logging and dispositions.
NextAction is what turns a disposition into work — Retarget_Later schedules re-engagement,
Sales_Handoff creates a task for a human.
Other
| Enum | Location | Members |
|---|---|---|
|
|
|
|
|
|
|
|
|
|
same |
|
|
|
Where enums are enforced
| Layer | Enforcement |
|---|---|
PostgreSQL |
A real |
SQLAlchemy |
Coerces to the Python member on read. |
Pydantic |
Event models validate incoming payload values against the enum and reject the message before a handler runs — see Publishing events. |
Bedrock structured output |
|