Skip to main content

Introduction

A config stores one customer’s choices for an integration: which objects and fields to read, how to write, and which events to subscribe to. Every installation has one config. Your manifest (amp.yaml) defines what an integration can do for every customer. The config defines what it does for one customer. Fields you leave out of the config fall back to the revision deployed from amp.yaml. Learn more in Concepts.
The OpenAPI spec for the config is available on GitHub.

Full example

This config reads and writes HubSpot contacts, subscribes to contact events, and enables proxy calls. The sections below explain each field.

Top-level structure

This is the config.content object. All sections other than provider are optional. Include the ones your integration uses.

Read

read.objects maps each object name to its read settings. Each object must be defined in the read section of amp.yaml. Learn more in Read Actions.

Read object

*Required when creating an installation. An empty map {} is allowed.

Choosing fields

There are three ways to choose which fields are read. You can combine them. Rules:
  • Required fields are always read. Fields in requiredFields in amp.yaml are read even if you leave them out of selectedFields. Setting one to false causes an error.
  • Required mappings must be filled in. If amp.yaml has a required field with a mapToName and no fieldName, the customer must pick a field for it, and it must appear in selectedFieldMappings.
  • Read at least one field. Each object needs at least one field from selectedFields, selectedFieldMappings, selectedFieldsAuto, or amp.yaml.
  • No duplicate field names. selectedFields can’t contain two names that differ only in case, such as Id and id.
  • Nested fields use JSONPath bracket notation, such as $['address']['city']. See Nested field mapping.

Backfill

Controls how much historical data is read when the installation is created. Learn more in Backfill behavior.

Filters

Filters control which records are read. Filters only exist in the config. You can’t set them in amp.yaml. Field filters match on field values. Multiple conditions are joined with AND, and each field can have only one condition. Learn more in Filter by field values.
Raw filters use the provider’s own query syntax, such as SOQL for Salesforce. Learn more in Filter with a raw filter.
An object can’t have both fieldFilters and rawFilter. The same rule applies inside backfill.

Value mappings

selectedValueMappings maps your app’s values to the provider’s values for a field. In each inner map, the key is the value delivered to your destination and the value is the provider’s value. Learn more in Mapping values.

Write

write.objects maps each object name to its write settings. Learn more in Write Actions.

Write object

Field settings

Subscribe

subscribe controls real-time events. Learn more in Subscribe Actions.

Subscribe object

The manifest field is inheritFieldsAndMapping (singular). The config field is inheritFieldsAndMappings (plural).

Provider options

Proxy

From manifest to config

How each amp.yaml field shows up in the config:

Creating and updating a config

Create

Send the full content when you create an installation:
With Headless UI, build the config with useLocalConfig and pass config.get() to createInstallation.

Update

To change part of a config, update the installation. List each path you’re changing in updateMask. Each path replaces that whole section, so send the complete object, not just the changed fields.
To change a single field without resending the whole object, use Update an installation object, which accepts JSON Patch operations.