The custom event is used to create adapted notifications between your ecommerce and Connectif. To do this, it reports Custom Integration events via JavaScript to receive data in Connectif, using the connectif.managed.sendEvents function.
How to use it
The custom integration event report uses the entityInfo option in the sendEvents method to enrich the information about the sent events.
In addition, it will contain the type field with the literal value "custom", and there will be an eventId field with the event identifier in the custom integration. In the payload se encontrarán, field you will find, if any, the fields of the integration event.
Example
For a custom integration for receiving data, which is sent when a user Likes a product, which includes the fields email, productId in the payload and an eventId.
The notification will look like this:
connectif.managed.sendEvents( [ { type: 'custom', eventId: '635feb9a4168beeaf0ae6a46', payload: { email: 'test@example.org', productId: 1234, } } ] , { entityInfo, cart });
Keep learning!
To make the most of your Connectif account, we recommend reading these articles next:
- Add Connectif JavaScript to your website, to insert the code and start collecting information about the visits to your site.
- Tag integration, to discover all the notifications you can send from your ecommerce to Connectif and how they work.
- Integration with Connectif via API, to synchronize contacts, products, purchases and vouchers.
- Check the integration with your ecommerce, so you can be confident that your data is syncing correctly with your Connectif account.