You can have Polytomic Connect sync updates from your sources to custom webhooks. You can do this by creating a Model Sync that maps fields from a Polytomic Model to your webhook destination.
When creating a Model Sync to a custom webhook destination, set each field’s target to record. Additionally, the target.object must be http and the sync mode is always updateOrCreate.
The below request creates a Model Sync to a custom webhook:
Polytomic’s payloads will arrive in this format:
Polytomic delivers payloads as a gzipped response to minimize bandwidth use. Your client likely supports decoding this automatically.
Polytomic delivers its webhooks payloads as json only. This header will always be present.
This signature lets your backend know when the request was created. In the future it may be used in combination with message signing to provide security. In general, it is a good idea to reject requests older than you expect (more than a few minutes old).
This should be Bearer token matching the same value that was provided as the Secret during connection setup. For now, this is the only request authorization and is a static value.
Polytomic will strip away characters from your field names that do not match any of these criteria:
For example, if your source field is named $first_name, your webhook payload will contain the field first_name because the $ character does not match any of the above criteria.
This normalization can be turned off if you desire.
Requests will arrive from Polytomic IP addresses. You may need to whitelist them if your webhook host is behind a firewall. You can find the list of Polytomic IP addresses here.
On receipt of the payload, your API should return 200 OK. Any 4xx or 5xx error will cause Polytomic to declare the sync to have failed.