Webhooks (legacy)

The Antavo Webhook module enables automatic interactions between the loyalty program and external systems. Webhook messages can be triggered by specific customer actions. You can define the endpoint where the messages are sent so that the external party can process and use the information subsequently.

Please note, that with the introduction of the new Webhooks module this module is not supported anymore, which means that it is still operational, but outdated. Please contact the Antavo Service Desk to consult about switching to the supported solution.

Find the configuration page of the Webhooks (legacy) module by typing ‘Webhooks' into the search bar of the Modules menu. You’ll be directed to the Settings tab where you can set up and update the settings of webhook communication.

Configuring the webhook settings

Basic settings

  • Decide if you want a proxy with a static IP address to be used to send requests

    • Leave the checkbox blank if Antavo should send the coupon request to the endpoint directly (various IP addresses might be used)

    • Tick the checkbox if Antavo should use a proxy with a static IP address to send requests (all requests will be sent from the same IP address)

  • Enter the endpoint URL
    Paste the external webhook endpoint your developers set up.

  • Set a timeout value for the webhook request in seconds
    This sets the interval while Antavo waits for a response before it registered the webhook message as a failed attempt.
    The configurable value is 60 seconds at maximum.
    When left blank, the default value will be applied, which is 1 second.

  • Select the content type
    The data can be sent in either URL-encoded or in JSON format, whichever is more comfortable for your developer.

  • Add actions
    Use the dropdown field to select the list of events that will trigger webhook messages.

  • Queue batches
    Webhook requests can be processed in parallel in multiple execution threads which can enhance performance.
    This functionality requires a background service to be set up. Please contact the Antavo Service Desk before enabling this option for the first time.

Authentication

The webhook authentication header ensures the security of server-to-server communications and lets external party make certain that the webhook data originates from Antavo. By default, the authentication type is set to none which means that the header will not be added to webhook messages.

To enable authentication, select one of the following 3 authentication methods from the dropdown list:

  • Basic
    Adds a webhook header of basic authentication fields in a Base64 encoded format.

    • Username

    • Password

  • AWS
    Adds a full AWS signature

    • Region

    • Service

    • Access Key ID

    • Access Key Secret

    • Algorithm prefix

    • Vendor key

  • AWS-S3
    Adds a full AWS signature compatible with Amazon Web Services S3 Bucket communications

    • Region

    • Service

    • Access Key ID

    • Access Key Secret

    • Filename format

Be sure to hit the ‘Save’ button before leaving the page.

Test the webhook mechanism

Test the configured webhook mechanism using the ‘Test’ button, which you can find on the upper right side of the Settings tab. This will allow making sure that the format is correct and that the request is returned without errors.

Webhook log

The Log tab helps to keep track of the webhook messages sent by Antavo. The list displays the following information about each webhook message trigger attempt:

  • Created at - the date when the webhook message was sent

  • Action - the event that triggered the webhook message

  • Customer - customer affected

  • Response code - the code that the external party responded with

  • Status - the status code of the webhook message

    • Queued - the webhook message will be sent shortly

    • Resent - the external party responded with an error, or not responded within the timeout interval, so a new webhook message with the same content has been resent in 10 seconds

    • Failed - Antavo attempts to resend the webhook message 5 times with a 10-second interval, the failed status is registered after 5 unsuccessful attempts.

    • Done - the external party responded with a success message

Log entries are retained for 90 days.

Filter the log list

You can filter the webhook messages based on the response status code by using the ‘Filter’ button on the upper right-hand side of the page.

Export the list

Click the ‘Export’ button in the sidebar to export the webhook message log in .csv and .psv formats through the Exports module. Check the user manual for instructions to configure an export.

Log items

To check the entire content of the request and response, click on the ‘View’ button of the relevant webhook message.
In the case that you encounter an error on your webhook endpoint, there’s a ‘Resend’ button at the top right corner of the page to retrigger webhook events to cover up the outage. Click ‘Resend’ on the upper right-hand corner of the page to retry

 

© Copyright 2022 Antavo Ltd.