Saltar al contenido principal

Contact Request Properties

This page defines the structure of the contact request entity, including all properties and their descriptions. Server-managed fields are read-only.

🔹 Identity​

PropertyTypeRequiredRead-OnlyDescriptionExample
idstring (UUID)NoYesUnique identifier for the contact request"123e4567-e89b-12d3-a456-426614174000"
organizationIdstring (UUID)Yes (create)YesUUID of the organization that owns the request"123e4567-e89b-12d3-a456-426614174001"
organizationNamestringNoYesDenormalized organization name"Acme Inc."
externalIdstringNoNoExternal identifier from the upstream integration (e.g. Dilema form id)"frm_abc123"

🔹 Type & Status​

PropertyTypeRequiredRead-OnlyDescriptionExample
typeenumYesNoContact request type. One of: contactmeback, keepmeinformed"contactmeback"
statusenumYesNoRequest status. One of: pending, accepted, rejected"pending"
preferredContactenumYesNoPreferred contact method. One of: email, phone, whatsapp"email"

🔹 Contact Information​

PropertyTypeRequiredRead-OnlyDescriptionExample
namestringNoNoName associated with the request"John Doe"
emailstring (email)NoNoEmail address (validated when present)"[email protected]"
phonestringNoNoPhone number (free-form, E.164 recommended)"+33612345678"
messagestringNoNoFree-form message from the contact"Please send me a copy of the contract"

🔹 Routing & Assignment​

PropertyTypeRequiredRead-OnlyDescriptionExample
userGroupIdstring (UUID)NoNoUser group this request is assigned to"550e8400-e29b-41d4-a716-446655440000"
userGroupstringNoYesDenormalized user group name"Sales Team"
agentIdstring (UUID)NoNoAgent assigned to the request"e4567-e89b-12d3-a456-426614174000"
agentCommentstringNoNoComment left by the assigned agent"Forwarded to sales team"
relatedServicestring (UUID)NoNoService associated with the request"7a96c97a-bcf9-42df-984a-051c0fb8487e"

🔹 Classification​

PropertyTypeRequiredRead-OnlyDescriptionExample
taxonomiesarray of stringsNoNoFree-form taxonomy tags for categorization["/model/contact-request"]
extraFieldsobjectNoNoCustom metadata bag for integration-specific data{ "department": "Sales", "location": "New York" }

🔹 Communication​

PropertyTypeRequiredRead-OnlyDescriptionExample
communicationLogsarray of [CommunicationLog]NoYesAudit trail of messages/calls related to the request[]
countCommunicationLogsnumberNoYesConvenience count of communication logs3

🔹 Timestamps​

PropertyTypeRequiredRead-OnlyDescriptionExample
createdAtdate (ISO 8601)NoYesCreation timestamp"2025-05-13T15:00:00Z"
updatedAtdate (ISO 8601)NoYesLast update timestamp"2025-05-13T15:00:00Z"
deletedAtdate (ISO 8601)NoYesDeletion timestamp (soft delete)null

🧩 Property Details​

  • id: UUID generated by the server. Cannot be modified.
  • organizationId: Server-derived from the security context on create. Pass on create for clarity, but the server enforces ownership.
  • type: contactmeback = contact-me-back / lead capture; keepmeinformed = subscription / newsletter.
  • status: Default pending. The DTO does not accept draft (reserved for internal use).
  • preferredContact: Required. Default email on the response class but the DTO requires it on create.
  • email: Validated against RFC email format only when provided.
  • relatedService: UUID of a Service in the same organization.
  • taxonomies: String array; commonly used to scope by source model.
  • extraFields: Free-form JSON; useful for storing custom form data.
  • communicationLogs: Server-managed. Do not send on create/update.

📊 Property Usage Examples​

Basic Contact Request​

{
"organizationId": "123e4567-e89b-12d3-a456-426614174001",
"type": "contactmeback",
"status": "pending",
"preferredContact": "email",
"name": "John Doe",
"email": "[email protected]",
"message": "Please contact me regarding a quote"
}

Complete Contact Request​

{
"id": "123e4567-e89b-12d3-a456-426614174000",
"organizationId": "123e4567-e89b-12d3-a456-426614174001",
"organizationName": "Acme Inc.",
"externalId": "frm_abc123",
"type": "contactmeback",
"status": "pending",
"preferredContact": "email",
"name": "John Doe",
"email": "[email protected]",
"phone": "+33612345678",
"message": "Please send me a copy of the contract",
"userGroupId": "550e8400-e29b-41d4-a716-446655440000",
"userGroup": "Sales Team",
"agentId": "e4567-e89b-12d3-a456-426614174000",
"agentComment": "Forwarded to sales",
"relatedService": "7a96c97a-bcf9-42df-984a-051c0fb8487e",
"taxonomies": ["/model/contact-request"],
"extraFields": {
"department": "Sales",
"location": "New York"
},
"communicationLogs": [],
"countCommunicationLogs": 0,
"createdAt": "2025-05-13T15:00:00Z",
"updatedAt": "2025-05-13T15:00:00Z"
}

📘 Notes​

  • All timestamps are returned in ISO 8601 format with UTC timezone
  • Enum values are case-sensitive strings
  • The organizationId is enforced server-side from the security context
  • communicationLogs and countCommunicationLogs are populated by the server