Event references
The Event library provides event handlers and actions which are functions and triggers used to handle all the possible interactions of the NewGen SDK.
How and what each handler and action trigger is used for is documented in the step-by-step integration guide.
Below you will find the general definition for every function and trigger action available:
Reference List
Misc
Credentials
Channel Mapping
TrustBadge
Widgets
Reviews
- ACTIVATE_PRODUCT_REVIEW_FOR_CHANNEL
- DEACTIVATE_PRODUCT_REVIEW_FOR_CHANNEL
- SAVE_USE_ESTIMATED_DELIVERY_DATE_FOR_CHANNEL
- SAVE_USE_EVENTS_BY_ORDER_STATUS_FOR_CHANNEL
- GET_USE_ESTIMATED_DELIVERY_DATE_FOR_CHANNEL
- GET_USE_EVENTS_BY_ORDER_STATUS_FOR_CHANNEL
- GET_AVAILABLE_ORDER_STATUSES
- SET_AVAILABLE_ORDER_STATUSES
- GET_USED_ORDER_STATUSES
- SET_USED_ORDER_STATUSES
- SAVE_USED_ORDER_STATUSES
- EXPORT_PREVIOUS_ORDER
Settings
NOTIFICATION
Definition | Event handler | Action | Notification required | Code example |
---|---|---|---|---|
The notification event is used to fire up the success/failed message popup within the dashboard interface. This is typically fired up after other event handlers have been executed. To learn more about notifications, check out the general concept guide For the rest of this reference guide, all event handlers that require that a notification event be fired will be marked as Yes in the Notification required column. |
NA |
EVENTS.NOTIFICATION
|
NA |
Click to view
|
INFORMATION_OF_SYSTEM
Definition | Event handler | Action | Notification required | Code example |
---|---|---|---|---|
This event is used to set all identity, options, and plugin data needed to brand and customize the plugin. The options include but are not limited to the plugin/shop name and version as well as functionalities to display or leave out. checkout the general concept guide to learn more. |
GET_INFORMATION_OF_SYSTEM
|
SET_INFORMATION_OF_SYSTEM
|
No |
Click to view
|
GET_LOCALE
Definition | Event handler | Action | Notification required | Code example |
---|---|---|---|---|
This event is used to set the language to display the dashboard text in The list of locales supported at the moment includes: en-GB, de-DE, es-ES, fr-FR, it-IT, nl-NL, pl-PL, pt-PT checkout the general concept guide to learn more. |
GET_LOCALE
|
SET_LOCALE
|
No |
Click to view
|
ERROR
Definition | Event handler | Action | Notification required | Code example |
---|---|---|---|---|
This event is fired whenever the connector layer encouters an error. Thus this event will not be fired if the error is present in your code unless of cause your implementation leads to an error within the connector layer. |
ERROR
|
NA | No |
Click to view
|
Credentials
GET_CREDENTIALS_PROVIDED
Definition | Event handler | Action | Notification required | Code example |
---|---|---|---|---|
This handler when triggered allows you to fetch and set the stored credentials from storage if any. This is typically fired up after other event handlers have been fired up. The authentication guide explains the event in detail. |
GET_CREDENTIALS_PROVIDED
|
SET_CREDENTIALS_PROVIDED
|
No |
Click to view
|
SAVE_CREDENTIALS
Definition | Event handler | Action | Notification required | Code example |
---|---|---|---|---|
This event handler is triggered when the user provides their credentials and clicks the button to connect. The goal of this handler is to persist the credentials to storage. The `GET_CREDENTIALS_PROVIDED` is fired up after and the newly persisted credentials can then be used to authenticate the user. The authentication guide explains the event in detail. |
SAVE_CREDENTIALS
|
NA | yes |
Click to view
|
Channel Mapping
SAVE_MAPPED_CHANNEL
Definition | Event handler | Action | Notification required | Code example |
---|---|---|---|---|
Once the shop owner selects which shops match which channels and hits the save button the event is fired and you can then persist this to storage This is typically fired up after other event handlers have been fired up. Check out the channels setup guide to learn more. |
SAVE_MAPPED_CHANNEL
|
SET_MAPPED_CHANNELS
|
Yes |
Click to view
|
GET_MAPPED_CHANNELS
Definition | Event handler | Action | Notification required | Code example |
---|---|---|---|---|
Once the shop and channel mapping is stored, this event is used to fetch it from the DB each time the plugin dashboard loads up.
Check out the channels setup guide to learn more. |
GET_MAPPED_CHANNELS
|
SET_MAPPED_CHANNELS
|
No |
Click to view
|
GET_SALES_CHANNELS_PROVIDED
Definition | Event handler | Action | Notification required | Code example |
---|---|---|---|---|
This event is used to pull the list of all shops within the e-commerce platform belonging to the owner. This list is later shown in a popup during the shop-channel mapping process. Check out the channels setup guide to learn more. |
GET_SALES_CHANNELS_PROVIDED
|
SET_SALES_CHANNELS_PROVIDED
|
No |
Click to view
|
GET_TRUSTBADGE_CONFIGURATION_PROVIDED
Definition | Event handler | Action | Notification required | Code example |
---|---|---|---|---|
Once the TrustBadge configuration is set and stored to DB, whenever this event handler is fired the configuration will be used to set the dashboard to the chosen settings.
Checkout the Trustbadge guide to learn more. |
GET_TRUSTBADGE_CONFIGURATION_PROVIDED
|
SET_TRUSTBADGE_CONFIGURATION_PROVIDED
|
No |
Click to view
|
SAVE_TRUSTBADGE_CONFIGURATION
Definition | Event handler | Action | Notification required | Code example |
---|---|---|---|---|
The event handler is used to set and persist the TrustBadge configuration chosen by the shop owner. This event will be fired when the shop owner hits the save button. Checkout the Trustbadge guide to learn more. |
SAVE_TRUSTBADGE_CONFIGURATION
|
SET_TRUSTBADGE_CONFIGURATION_PROVIDED
|
Yes |
Click to view
|
GET_LOCATION_FOR_WIDGET
Definition | Event handler | Action | Notification required | Code example |
---|---|---|---|---|
The event handler is used to set all the different widget placement options you will like to make available to the shop owner. Each location has a name and an id. The name is shown to the shop owner and you can use the ID as an identifier to decide the placement of the widget. Check out the widget placement guide to learn more. |
GET_LOCATION_FOR_WIDGET
|
SET_LOCATION_FOR_WIDGET
|
No |
Click to view
|
SAVE_WIDGET_CHANGES
Definition | Event handler | Action | Notification required | Code example |
---|---|---|---|---|
The event handler is used to persist review widget changes |
SAVE_WIDGET_CHANGES
|
SET_WIDGET_PROVIDED
|
Yes |
Click to view
|
GET_AVAILABLE_PRODUCT_IDENTIFIERS
Definition | Event handler | Action | Notification required | Code example |
---|---|---|---|---|
Product identifiers are used to fetch and present specific products for review. There are different ways to identify products. For example, by using the SKU .
You can find the complete list of options in the integration guide
|
GET_AVAILABLE_PRODUCT_IDENTIFIERS
|
SET_AVAILABLE_PRODUCT_IDENTIFIERS
|
No |
Click to view
|
GET_WIDGET_PROVIDED
Definition | Event handler | Action | Notification required | Code example |
---|---|---|---|---|
This event handler is used to get and set the dashboard up using the persisted widget data (dashboard config, and shopfront widget components) from the DB. Check out the widgets guide to learn more. |
GET_WIDGET_PROVIDED
|
SET_WIDGET_PROVIDED
|
No |
Click to view
|
ACTIVATE_PRODUCT_REVIEW_FOR_CHANNEL
Definition | Event handler | Action | Notification required | Code example |
---|---|---|---|---|
For shop owners who have product reviews enabled, they will be able to toggle the activation button to enable product review collection. This event is called when the button is toggled to active mode, here you have to persist the shop owner's choice and use that data to decide whether to render the product review widget. Check out the product review collection guide to learn more. |
ACTIVATE_PRODUCT_REVIEW_FOR_CHANNEL
|
SET_PRODUCT_REVIEW_FOR_CHANNEL
|
Yes |
Click to view
|
DEACTIVATE_PRODUCT_REVIEW_FOR_CHANNEL
Definition | Event handler | Action | Notification required | Code example |
---|---|---|---|---|
For shop owners who have product reviews enabled, they will be able to toggle the activation button to disable product review collection. This event is called when the button is toggled to inactive mode. Here you can clear out the payload stored in the DB when set to inactive and further prevent the product review widget from rendering on the shopfront. Check out the product review collection guide to learn more. |
DEACTIVATE_PRODUCT_REVIEW_FOR_CHANNEL
|
SET_PRODUCT_REVIEW_FOR_CHANNEL
|
Yes |
Click to view
|
SAVE_USE_ESTIMATED_DELIVERY_DATE_FOR_CHANNEL
Definition | Event handler | Action | Notification required | Code example |
---|---|---|---|---|
When the shop owner selects to deliver review invites based on estimated delivery dates this event is fired. You can then go ahead and persist the option contained in the payload to DB for later use. Check out the invite timing guide to learn more. |
SAVE_USE_ESTIMATED_DELIVERY_DATE_FOR_CHANNEL
|
SET_USE_ESTIMATED_DELIVERY_DATE_FOR_CHANNEL
|
Yes |
Click to view
|
SAVE_USE_EVENTS_BY_ORDER_STATUS_FOR_CHANNEL
Definition | Event handler | Action | Notification required | Code example |
---|---|---|---|---|
When the shop owner selects to deliver review invites based on order status this event is fired. You can then go ahead and persist the option contained in the payload to DB for later use. Check out the invite timing guide to learn more. |
SAVE_USE_EVENTS_BY_ORDER_STATUS_FOR_CHANNEL
|
SET_USE_EVENTS_BY_ORDER_STATUS_FOR_CHANNEL
|
Yes |
Click to view
|
GET_USE_ESTIMATED_DELIVERY_DATE_FOR_CHANNEL
Definition | Event handler | Action | Notification required | Code example |
---|---|---|---|---|
Whenever the plugin dashboard is loaded this event is fired and you can then check your DB records to see if any data was stored for this. If so you can set this by dispatching it thereby setting the dashboard to reflect the chosen option. Check out the invite timing guide to learn more. |
GET_USE_ESTIMATED_DELIVERY_DATE_FOR_CHANNEL
|
SET_USE_ESTIMATED_DELIVERY_DATE_FOR_CHANNEL
|
No |
Click to view
|
GET_USE_EVENTS_BY_ORDER_STATUS_FOR_CHANNEL
Definition | Event handler | Action | Notification required | Code example |
---|---|---|---|---|
Whenever the plugin dashboard is loaded this event is fired and you can then check your DB records to see if any data was stored for this. If so you can set this by dispatching it thereby setting the dashboard to reflect the chosen option. Check out the invite timing guide to learn more. |
GET_USE_EVENTS_BY_ORDER_STATUS_FOR_CHANNEL
|
SET_USE_EVENTS_BY_ORDER_STATUS_FOR_CHANNEL
|
No |
Click to view
|
ORDER_STATUSES
Definition | Event handler | Action | Notification required | Code example |
---|---|---|---|---|
This event handler is used to fetch all touchpoints stored in the DB. You can find the full details on how to set this up from the review invites guide |
GET_AVAILABLE_ORDER_STATUSES
|
SET_AVAILABLE_ORDER_STATUSES
|
No |
Click to view
|
This event handler is get persisted touchpoints from the DB. You can find the full details on how to set this up from the review invites guide |
GET_USED_ORDER_STATUSES
|
SET_USED_ORDER_STATUSES
|
No |
Click to view
|
This event handler is used to persist selected touchpoints to DB. You can find the full details on how to set this up from the review invites guide |
SAVE_USED_ORDER_STATUSES
|
SET_USED_ORDER_STATUSES
|
Yes |
Click to view
|
EXPORT_PREVIOUS_ORDER
Definition | Event handler | Action | Notification required | Code example |
---|---|---|---|---|
This event handler is used to fetch customer details from the shop DB to use for review invites. You can find the full details on how to set this up from the review invites guide |
EXPORT_PREVIOUS_ORDER
|
SET_EXPORT_PREVIOUS_ORDER
|
No |
Click to view
|
Destructor (DISCONNECTED, SET_DISCONNECTED)
Definition | Event handler | Action | Notification required | Code example |
---|---|---|---|---|
Whenever the shop owner clicks on the disconnect button within the plugin dashboard this event handler is fired. From here you can clear out the plugin DB records and undo all configurations The settings guide covers this in detail |
DISCONNECTED
|
SET_DISCONNECTED
|
No |
Click to view
|
Updated 11 months ago