How to configure System Notification Events

Introduction & Previous Concepts

In the system is possible to notify certain events to a channel. If you don’t have added any notification channels, please check out this document https://webforce-hq.atlassian.net/wiki/spaces/WFIO/pages/1547654

Procedure

  1. In the menu, go to Integrations.

  2. Click on Configuration in the System Notifications card.

  3. You will see a list of 10 notification events.

    1. Order completed: It gets triggered when a successful order is closed. In admin, quote or shop sells it happens in a successful purchase. In funnels, it happens when a user reaches the thank you page or after 30 minutes after the first purchase in a funnel page (this is to avoid the scenario when a customer purchases but never goes to the thank you page).

    2. Contact created: Is called in these situations:

      1. When a lead is created through the admin, shop, or funnel page.

      2. When a reactivation (we receive again the information for a contact already created) for a lead/customer occurs in the shop or a funnel page.

    3. Shipping tracking info updated: It happens when we update an order's tracking information.

    4. Product conflicts: Called when a product conflict occurs (a customer who purchased a digital product that he already has).

    5. Transaction declined: When a purchase transaction gets rejected in the system. Because this is at the transaction level (in funnels, an order can have many transactions if upsells are involved), this event could be triggered many times inside a funnel purchase. For example, the cart page sale was approved, but all the next upsells were declined due to insufficient funds.

    6. Refund applied: When a refund/void occurs.

    7. Subscription canceled: When a subscription gets canceled.

    8. Customer created: When a lead makes his first successful purchase in the system. Right now, it only works with postback channels.

    9. Approved transaction: When a purchase transaction succeeds in the system. Because this is at the transaction level (in funnels, an order can have many transactions if upsells are involved), this event could be triggered many times inside a funnel purchase. For example, the cart page sale was approved, and the next upsells were purchased.

    10. Survey completed: When a survey is finished. Right now, it only works with postback channels.

  4. If the event you want to use is disabled, enable it by toggling the switch on its right. On the contrary, if currently enabled, click over the event name.

  5. You will see a list of the current channels added to this event (the list will be empty if no channels were attached previously).

  6. Click on the bottom right button to attach a channel.

  7. You will see a form with these fields:

    1. Channel: You can select one of your channels created before. If you have none, click the Add button on the right. If you need to add a new channel, please read this document first https://webforce-hq.atlassian.net/wiki/spaces/WFIO/pages/1547654

    2. Sources: We have 3 sources: Admin, Shop, and Funnel. Every contact, order, and subscription is related to one of these 3. You can specify if you want to notify only if the event happened on some specific sources.

  8. Click on save to see that the channel was successfully linked to the event.

  9. If you click on the 3 vertical dots on the right, you will see two options available:

    1. Edit: Here, you can update the sources.

    2. Delete: You can remove the channel to being notified of this event.

 

Postback notes

Retry

We automatically retry a postback request a maximum of 3 times if we get any of these HTTP codes:

  • 408: Client request timeout

  • 429: Too many requests

  • 500-599: Any error in the 500-599 range

If a request failed the 3 times, you could make a manual retry only for these events through the Orders UI in the admin:

  • Order completed.

  • Approved transaction.

  • Transaction declined.

  • Refund applied.

We have a timeout of 30 seconds when dealing with these requests, so if your endpoint takes more than that time to respond, we will mark the operation as failed, and it won’t be retried automatically. If you need the data again, you would need to make a manual retry (that will still have the limitation of 30 seconds).

To avoid problems with the timeout, we recommend you not perform heavy operations in your endpoint, get only the data, and dispatch a background job to execute your needed processes.

 

Payloads

Here we will show you some examples of payloads you can receive when notifying postback channels.

This is only a reference, in some values that are objects you could receive null. For example, admin orders don’t have a funnel, you would receive a null value on the funnel key. If you need to access an object property in your end validate that such prop is not null first.