Skip to content

Notifications

The following notification types are supported in the eSales Enterprise Web API and can all easily be sent with the JavaScript library. The examples have instantiated the esales object as a variable:

var esalesObj = window.apptus.esales("{cluster-id}", "{market}");

See also the Notification set-up recommendations and Working with Notifications.

Click notification

The click notification is sent with a ticket when the visitor clicks on a product, an ad, or any other eSales entities.

esalesObj.notifyClick("{ticket}");

Non-eSales click notification

The non-eSales click notification is sent when a visitor has clicked a product that is not returned by eSales (i.e. not having a ticket). Instead of a ticket, a product key (and if applicable, a variant key) is sent.

Variant key sent with null product key

A variant key can be sent without a related product key in a notification, as long as the product key in the notification is set to null.

esalesObj.notifyNonEsalesClick("{product_key_1}");
esalesObj.notifyNonEsalesClick("{product_key_2}", "{variant_key_1}");

Adding-to-cart notification

The adding-to-cart notification is sent with a ticket when a visitor adds an eSales product to their cart.

esalesObj.notifyAddingToCart("{ticket}");

Non-eSales adding-to-cart notification

The non-esales adding-to-cart notification is sent when a visitor adds a product not returned by eSales (i.e. not having a ticket) to their cart. Instead of a ticket, a product key (and if applicable, a variant key) is sent.

Variant key sent with null product key

A variant key can be sent without a related product key in a notification, as long as the product key in the notification is set to null.

esalesObj.notifyNonEsalesAddingToCart("{product_key_1}");
esalesObj.notifyNonEsalesAddingToCart("{product_key_2}", "{variant_key_1}");

Payment notification

Multiple payment notification methods

All payment notifications are recommended to be made as server side operations and not with the JavaScript library. Apptus eSales RESTful API includes two different payment notification methods. The recommended notification method to use is Secure Payment Notification.

The payment notification is sent when the visitor has placed an order and completed payment.

var payment = esalesObj.newPaymentNotification();
payment
    .addProduct("{product_key_1}")
    .quantity(2)
    .unitSellingPrice(99.90);

payment.addProductWithVariant("{product_key_2}", "{variant_key_1}")
    .quantity(1)
    .unitSellingPrice(150.00);

payment.addVariant("{variant_key_3}")
    .quantity(5)
    .unitSellingPrice(165.00);

payment.send();

End session notification

The end session notification is to be sent when the visitor session ends according to the level of personalisation. Visitors may experience strange or irrelevant recommendations if the session-handling is not supporting the selected level of personalisation.

esalesObj.endSession();
×
Copyright

This online publication is intellectual property of Apptus Technologies. Its contents can be duplicated in part or whole, provided that a copyright label is visibly located on each copy and the copy is used in conjunction with the product described within this document.

All information found in these documents has been compiled with utmost attention to detail. However, this does not guarantee complete accuracy. Neither Apptus Technologies nor the authors shall be held liable for possible errors or the consequences thereof.

Software and hardware descriptions cited in these documents might be registered trademarks. All trade names are subject to copyright restrictions and may be registered trademarks. Apptus Technologies essentially adheres to the manufacturer’s spelling. Names of products and trademarks appearing in this document, with or without specific notation, are likewise subject to trademark and trade protection laws and may thus fall under copyright restrictions.

CLOSE