Custom event notification

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.

  

This article is part of the guide to creating a custom integration.

 

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.

Notificar_evento_personalizado_01.png

The notification will look like this:

connectif.managed.sendEvents(
    [
        {
            type: 'custom',
            eventId: '635feb9a4168beeaf0ae6a46',
            payload: {
                email: 'test@example.org',
                productId: 1234,
            }
        }
    ]
, { entityInfo, cart });

 

 

Congratulations!
You’ve reached the end of the tutorial.

  

Do you have questions?
Don’t forget, our Connectif specialists are here to help you. To contact them, just open a Support ticket by clicking the blue “Help” button on your dashboard.


Keep learning!

To make the most of your Connectif account, we recommend reading these articles next:

Cet article vous a-t-il été utile ?
Utilisateurs qui ont trouvé cela utile : 0 sur 0