Skip to main content
The Enterspeed Ingest integration uses destinations to ingest generated views back into Enterspeed. Each view becomes a source entity in a source you choose. From there, other schemas can trigger on it like any other source entity. You decide on schema level which views to ingest. Set the destination on the entity schema whose views you want to ingest. All schema references are automatically resolved, so you don’t have to set it on referenced schemas. It’s possible to configure multiple Ingest destinations if you need to ingest into different sources.

When to use it

Use the Ingest destination when the output of a schema is itself useful input:
  • Chain schemas. Split a transformation into steps, where each step triggers on the source entities the previous step wrote.
  • Materialise a combined view. Store a view that joins several source entities as a single source entity, so later schemas read one entity instead of repeating the lookups.
  • Build a hierarchy. Give each ingested source entity a parent, so you can query everything under it.
  • Record workflow state. Write small records (a plan, a ticket, a result) that drive the next step of a multi-step process.

How it works

  1. A schema with the destination generates or updates a view.
  2. The destination fetches the view from the Delivery API, using the environment client you configured.
  3. It ingests the view as is into the source you selected in the connection. View references are already resolved by the Delivery API.
  4. When the view is deleted, the destination deletes the matching source entity again.
Before it ingests or deletes anything, the destination runs the self-overwrite guard.

Configuration

The destination is configured per Enterspeed environment. In order to set up the Ingest configuration you need the following: You select the environment client and the source from the ones in your tenant. You never paste or see an API key. Enterspeed looks up the keys when you save the connection. You can only select a source that is in the same tenant. A change to the connection applies to views queued after you save it. Views that are already queued still use the previous environment client and source.
A connection saved before this change has no environment client or source selected. Open it and save it again. Until you do, every view it receives fails with Connection.Configuration.EnvironmentClientMissing or Connection.Configuration.SourceMissing.

Options

Options are set on the destination in the schema’s actions method. All options are optional, and each one can differ per source entity.

Example of usage

This schema triggers on products and ingests a small summary record for each one. Other schemas can then trigger on the productSummary type.
Product schema with Ingest destination
A second schema then picks up the ingested source entities:
Schema that triggers on the ingested type
'pipeline' is the source group of the source the destination ingests into. The first schema prefixes originParentId the same way as originId. This makes the summaries form the same hierarchy as the products they came from. originParentId must point at an origin id in the target source, not the source the view came from. Otherwise the parent doesn’t resolve.

Designing a self-ingesting flow

Ingesting into Enterspeed from Enterspeed makes it easy to build flows that feed themselves. Follow these rules to keep them predictable.

Avoid loops

A schema must never trigger on a type it writes. If it does, every ingest triggers the schema again, and the flow never stops. The destination only detects the simplest case, described in self-overwrite guard. Other loops are not detected. Keep triggers apart by type. Give every ingested record a sourceEntityType of its own, and let each schema trigger on exactly the type it consumes.
Ingesting into the same source and type that the schema triggers on creates an endless loop, unless the guard stops it. Check the triggers of every schema that reads the target source before you enable the destination.

Self-overwrite guard

A view comes from a source entity in a source. The destination knows both, and it knows the source you ingest into. If the source is the same and the resolved originId is the same, the destination would replace the source entity with its own view. That reprocesses the schema that produced the view. In that case the destination refuses the view with Ingest.Loop.SelfOverwrite and doesn’t retry it. The error message tells you to set a distinct originId or ingest into another source. The Ingest API also rejects a changed type, but only when the types differ. The guard covers what that check doesn’t: same-type overwrites and deletions. It applies to changes and deletions:
  • Change. The source entity isn’t replaced with its own view.
  • Deletion. The destination doesn’t delete the original data. It only deletes copies it made itself.
This happens when a schema sends to a connection that points back at its own source and you haven’t set originId, because originId defaults to the origin id of the source entity the view came from. To ingest into the same source, set a different originId. This is allowed on purpose, for example to write records back into the source they came from:
Ingest into the same source under another origin id
The guard only compares the source and the originId. It doesn’t detect loops through another source in the same source group, or loops across two Ingest connections. You still need to keep the triggers apart.

Always set sourceEntityType

A source entity’s type can’t be changed after it’s first ingested. If you forget sourceEntityType, the view is ingested as document. To fix it, you have to delete the source entity and ingest it again.

Give each schema its own originId

originId defaults to the origin id of the source entity the view was generated from. If two schemas send views of the same source entity to the same Ingest destination, both write to the same source entity and overwrite each other. Set a distinct originId per schema, for example with a prefix such as summary- or plan|.

Keep the view deterministic

Publishing a schema reprocesses its source entities and sends their views to every destination again. Enterspeed reports a source entity whose content hasn’t changed as unchanged, so nothing downstream is triggered. Avoid values that change on every run, such as the current time. A view with new Date() in it is different every time, so each publish rewrites the source entity and retriggers every schema that reads it.
Use a timestamp from the source entity, such as sourceEntity.updatedAt, instead of the current time.

Errors

Errors the destination reports, and whether it retries them. Errors you can fix yourself are not retried.