Description

Engammo FAQ ingestion accepts signed FAQ upsert and delete events from Engammo, stores them as organization-scoped knowledge, and makes them available to the chatbot through the existing RAG path. The ingestion API verifies a bearer key, an HMAC signature, event idempotency, and organization ownership before writing FAQ data.

Prerequisites

  • Engammo project configured to send FAQ reconciliation events.
  • Kommander organization with Engammo ingestion enabled.
  • Bearer API key and signing secret generated for Engammo.
  • ENGAMMO_INGEST_ENABLED enabled where required.
  • INTEGRATIONS_ENCRYPTION_KEY configured for encrypted signing-secret storage outside local development.

Setup

Representative Engammo setup screen with API key, signing secret, endpoint URL, and recent sync activity.
Engammo setup provides one-time credentials, endpoint details, and recent ingestion status.
  1. Open Integrations > Engammo in Kommander.
  2. Generate the API key and signing secret. Copy them immediately because plaintext is shown once.
  3. In Engammo, paste the Kommander endpoint /api/integrations/engammo/faqs, bearer key, signing secret, and organization ID.
  4. Send a health check to /api/integrations/engammo/health.
  5. Send one FAQ upsert event and confirm the activity feed marks it accepted.
  6. Ask the assistant a question covered by the imported FAQ.

Architecture Diagram

Configuration

SettingRequiredNotes
ENGAMMO_INGEST_ENABLEDYes for deploymentGates ingestion endpoints.
INTEGRATIONS_ENCRYPTION_KEYYes outside local developmentMust be suitable for encrypted integration secrets.
Bearer API keyYesStored hashed in Kommander; Engammo sends plaintext.
Signing secretYesUsed for X-Engammo-Signature.
X-Engammo-Organization-IdYes per requestMust match the integration’s organization.
X-Engammo-Event-IdYes per requestUsed for duplicate event protection.

Webhook Payload Example

FAQ upsert events carry one FAQ and its localized content. Delete events use the same authentication headers with type: "delete" and the externalId to remove from active retrieval.

{ "type": "upsert", "externalId": "faq_123", "projectId": "proj_456", "projectSlug": "help-center", "status": "published", "tags": ["billing", "subscription"], "occurredAt": "2026-05-17T10:30:00.000Z", "content": [ { "locale": "en", "question": "How do I update my billing details?", "answer": "Open Billing, update the billing profile, then save the new payment method." } ] }

Webhook Handler Example

Engammo signs the raw request body. The timestamp and signature headers must be verified before parsing JSON, and X-Engammo-Event-Id must be treated as the idempotency key.

import { NextRequest, NextResponse } from 'next/server'; import { verifyEngammoWebhookSignature } from '@/backend/lib/engammoAuth'; export async function POST(request: NextRequest) { const eventId = request.headers.get('x-engammo-event-id'); const rawBody = await request.text(); const verification = verifyEngammoWebhookSignature({ secret: process.env.ENGAMMO_SIGNING_SECRET, rawBody, signatureHeader: request.headers.get('x-engammo-signature'), timestampHeader: request.headers.get('x-engammo-timestamp'), }); if (!eventId) { return NextResponse.json({ error: 'auth_missing' }, { status: 401 }); } if (!verification.ok) { return NextResponse.json({ error: verification.code }, { status: 401 }); } const payload = JSON.parse(rawBody); // Deduplicate by eventId, validate payload, then upsert or soft-delete the FAQ. return NextResponse.json({ status: 'accepted', externalId: payload.externalId }); }

Limitations

  • The ingestion contract accepts one FAQ change per request.
  • Delete events soft-delete FAQs to preserve audit history.
  • Ingested FAQs stay separate from manually authored FAQs to keep ownership and edit history clear.
  • Only transient 5xx and signature-related 401 errors should be retried by Engammo.

Troubleshooting

  • If health checks fail, verify the bearer key and organization ID header.
  • If FAQ ingestion returns signature_invalid, recompute HMAC-SHA256(secret, "t.rawBody") using the exact request body.
  • If events duplicate, confirm Engammo sends a stable X-Engammo-Event-Id per source event.
  • If imported answers do not appear, check RAG indexing status and confirm the FAQ status is published.