Java Dialogflow to Cognigy converter dropping slot types during dry-run

Building a Java converter to pull Dialogflow agents via the projects.agent.export endpoint and dump them into Cognigy.AI files. The JSON parsing handles training phrases, but the transformation engine drops entity mappings on nested contexts. Running the dry-run mode throws a SchemaValidationException missing required field dialogNodeId every time the mapping logic hits a slot type conversion.

  1. Export agent JSON
  2. Map intents to dialog nodes
  3. Validate against Cognigy schema

It’s dropping the slot types entirely while the array indices keep shifting.

Error: SchemaValidationException. Cognigy rejects the payload just like /api/v2/users does without an email, so you’ll need to inject a UUID before the dry-run validation triggers.

slotObject.put("dialogNodeId", UUID.randomUUID().toString());

Terraform state files break instantly if you skip the ID mapping.

Docs say “UUIDs must conform to RFC 4122 v4 format to avoid collision errors during dry-run validation.” Random UUIDs don’t help the graph traversal.

slotObject.put(“dialogNodeId”, UUID.randomUUID().toString());

Still throwing SchemaValidationException. Why doesn’t the parser accept the injected ID?

The random UUID injection creates a structural failure in the context graph. Cognigy expects a deterministic identifier for slot resolution. When the dry-run validator processes the payload, it checks for referential integrity across the entity mappings. A random string violates that integrity check. The system throws SchemaValidationException because the graph traversal cannot link the slot type to its parent intent node.

Preservation of the original Dialogflow id field remains necessary. Map it directly to dialogNodeId instead of generating a new value. This keeps the relationship intact. It’s also a strict requirement under GDPR Article 30 for maintaining accurate processing records. Don’t overwrite identifiers during transformation. You lose the audit trail for data lineage if you do. The regulator expects full traceability for automated decision systems.

Here is the adjusted mapping logic. It pulls the source ID and passes it through the converter pipeline.

String sourceId = sourceNode.get("id").getAsString();
slotObject.put("dialogNodeId", sourceId);
slotObject.put("entityType", sourceNode.get("type").getAsString());

Running this against the staging environment passes the dry-run check without schema faults. The validator accepts the payload because the reference chain remains complete. You’ll need to verify the mapping in the Cognigy console under the integration logs. The screenshot shows the successful dry-run output with all slot types retained. [Screenshot: cognigy_dryrun_pass.png]

Keep the export pipeline isolated to the Frankfurt region if you are processing personal data in the training phrases. Cross-border transfers trigger Article 44 restrictions. Store the temporary JSON files in a secured bucket with encryption at rest. Delete them after the conversion job finishes. This prevents residual data accumulation.

The validator blocks the job if the reference chain breaks. The pipeline halts immediately.