Please note that:
- Subscribe actions are supported for a subset of providers. See the provider guides to check whether your provider supports subscribe actions and whether any additional setup is required.
- Subscribe actions do not produce Operations or Logs that can be viewed in the Ampersand dashboard.
- It takes 1-2 minutes, and occasionally up to 10 minutes, for the first events to arrive after the initial installation.
Defining subscriptions
To subscribe to an object, you need to specify:- objectName: to indicate which object you’d like to subscribe to. This should match the name of the object in the official documentation for the SaaS API.
- destination: the name of the destination that you’ve defined
- inheritFieldsAndMapping: required when using
createEvent,updateEvent,deleteEvent, orassociationChangeEvent. Set this totrueso the subscribe action inherits the mapped and unmapped fields from the matching Read Action.trueis currently the only supported value. Learn more in Fields and mapping.
- createEvent: triggers when a new record is created in the SaaS application.
-
updateEvent: triggers when any existing record is modified. The
watchFieldsAuto: allsetting ensures that you subscribe to all field changes. Alternatively, you can list specific fields to watch inrequiredWatchFields. Note: Only one ofrequiredWatchFieldsorwatchFieldsAutoshould be provided. - deleteEvent: triggers when a record is removed from the system.
- associationChangeEvent: triggers when a record’s associations have been modified. This is only supported for HubSpot. Please see Association changes.
- otherEvents: gives you the ability that listen to any other events that are available in the provide API that Ampersand doesn’t natively support. Please see Other Events.
Specify fields to watch
You can provide fields to watch for update events and specify them in a list. Note: Only one ofrequiredWatchFields or watchFieldsAuto should be provided.
Here is an example amp.yaml
amp.yaml, please see Subscribe action webhooks.
Association changes
In HubSpot, association changes do not trigger update events, you must subscribe to them specifically usingassociationChangeEvent. On the other hand, in Salesforce, you can subscribe to fields that refer to associations (e.g. You can subscribe to update events on the accountid field of contacts).
HubSpot example:
Other events
Beyond the standard events that Ampersand supports, you have the ability to subscribe to any other event that that underlying platform supports. The event names listed inotherEvents must match the provider’s raw event names exactly.
For Salesforce this includes events like:
UNDELETE
{OBJECT_NAME}.restore(e.g.contact.restore){OBJECT_NAME}.merge(e.g.contact.merge)
otherEvents array to the subscribed object in your amp.yaml. If an object is subscribing only to otherEvents (no createEvent, updateEvent, or deleteEvent), it does not need its own matching entry in the read block, and inheritFieldsAndMapping is not required for that object. The read block itself must still exist on the integration.
In the example below, the customers object uses create/update/delete events and therefore must have a matching read object with inheritFieldsAndMapping: true. The job.appointments object subscribes only to otherEvents and has no matching read entry:
otherEvents with standard events on the same object. In this Salesforce example, the account object subscribes to both createEvent and the non-standard UNDELETE event. Because it uses createEvent, it requires a matching read entry and inheritFieldsAndMapping: true:
Specify backfill behavior
By combining subscribe actions with read actions, you can get a full picture of all the data in your customer’s SaaS instance. You can:- Do a full backfill when the user first installs the integration to get historic data.
- Then, receive real-time updates about changes in their SaaS instance
amp.yaml:
Fields and mapping
Your read action’s set of fields and field mappings will apply to the subscribe action. When we deliver you the webhook, it will containfields and mappedFields based on the fields and mapped fields from your read action. You can learn more in Object and field mapping.

