Introduction
The IntegrationCollections module stores data used for integrating different services and systems.
To integrate third-party services, you first need to create and configure collections.
More information about the module's user interface https://doc.oneentry.cloud/docs/category/integration-collections
🎯 What does this module do?
The IntegrationCollections module lets you read and manage collections — structured tables of records used to integrate OneEntry with external services and systems. Each collection is defined by a form (its schema); each record (row) holds the submitted formData.
Define a collection and its form in the admin panel, then fetch, create, update, and delete its rows from your app.
🚀 Quickstart
Initialize the module from defineOneEntry:
const { IntegrationCollections } = defineOneEntry( "your-project-url", { "token": "your-app-token" });
Fetch all collections and read their fields:
// Returns an array of collections (langCode defaults to the configured language).
const collections = await IntegrationCollections.getICollections("en_US");
collections.forEach((collection) => {
console.log(collection.id, collection.identifier, collection.formId);
});
✨ Key Concepts
Collection vs. Row
- Collection (
ICollectionEntity) — the container/schema. It references a form (formId) and an attribute set, and carries localized info. - Row (
ICollectionRow) — a single record inside a collection, holdingformData(an array of{ marker, type, value }), timestamps, and an optional linked entity (entityType/entityId).
Collection Structure
{
id: 1,
identifier: 'collection1',
formId: 1234,
localizeInfos: { title: 'Admins text' },
attributeSetId: 1234,
selectedAttributeMarkers: 'collection_marker'
}
Row Structure
{
id: 1,
createdDate: '2025-06-06T19:08:54.616Z',
updatedDate: '2025-06-06T19:08:54.616Z',
collectionId: 1,
formData: [
{ marker: 'name_1', type: 'string', value: 'Value' }
],
entityType: null,
entityId: null,
attributeSetIdentifier: null
}
Creating or updating rows
Pass a form object (ICollectionFormObject) with the form identifier and the field values:
const body = {
formIdentifier: 'collection-form',
formData: [
{ marker: 'collection_marker', type: 'string', value: 'Collection marker' }
]
};
await IntegrationCollections.createICollectionRow('collection1', body);
📋 What You Need to Know
Collections are defined in the admin panel
Collections and their forms are created and configured in the OneEntry admin panel. The SDK is for reading collections and managing their rows (create / update / delete).
Deleting rows requires a permission
deleteICollectionRowByMarkerAndId() requires the collections.row.delete right; without it the deletion fails.
📊 Quick Reference Table
| Method | Description |
|---|---|
| getICollections() | Get all collections. |
| getICollectionById() | Get a single collection by id. |
| getICollectionRowsById() | Get all rows of a collection by collection id. |
| getICollectionRowsByMarker() | Get all rows of a collection by marker. |
| getICollectionRowByMarkerAndId() | Get a single row by collection marker and row id. |
| validateICollectionMarker() | Check whether a collection marker exists. |
| createICollectionRow() | Create a row in a collection. |
| updateICollectionRow() | Update a row in a collection. |
| deleteICollectionRowByMarkerAndId() | Delete a collection row (requires the collections.row.delete right). |
❓ Common Questions (FAQ)
Where are collections created?
Collections and their forms are created and configured in the OneEntry admin panel. The SDK is for reading collections and managing their rows (create / update / delete).
What's the difference between a collection and a collection row?
A collection is the table definition (its form schema and metadata). A collection row is a single record stored in that collection, carrying its formData values.
🎓 Best Practices
- Define collections in the admin panel - The SDK reads collections and manages their rows, not the schema.
- Validate markers before use - Use
validateICollectionMarker()to confirm a collection marker exists. - Match form fields to the schema -
formDatamarkers/types must match the collection's form. - Ensure the delete permission -
deleteICollectionRowByMarkerAndId()needs thecollections.row.deleteright.
🔗 Related Documentation
- Forms Module - Understand form structures used by collections
- FileUploading Module - Upload files and store URLs in collection rows
- Products Module - Link collection rows to products
- Pages Module - Link collection rows to pages