SharinPix Webhooks

Enrich image data through Webhooks

What is a Webhook?

A WebHook is a callback request (HTTP POST) made to a specific URL when something happens.

In our case, we have these configurable Webhooks available:

  • New image

  • Processed image

  • New publication

  • New tag image

  • Delete image

  • Delete tag image

  • Upload done

These callbacks can be configured on the admin page, in the Webhooks section. You can provide the URL on which you want the Webhook (callback) to occur.

triangle-exclamation
circle-check
circle-exclamation

Types of webhooks

To configure a webhook along with its endpoint url, access the Admin Dashboard and follow the instructions below.

Call to URL with JSON payload using HTTP POST

  • Select the ‘Webhooks ’ menu item from the navigation bar.

  • Click on the ‘New Webhook ’ button.

  • Enter the relevant details for the Webhook.

Call to a static method in an Apex class

In this case, we will use another type of webhook which will execute a static method on your Salesforce environment. The sample code below illustrates an example method which is called by a webhook.

  • payload is the json string containing the relevant actions.

  • webhookInformation contains information about the webhook such as the event type.

Next:

  1. Go to the SharinPix Administration dashboard.

  2. Click on the Webhooks menu followed by the New Webhook button.

  3. Select apex_method as the Action type and insert the class name and method name.

  4. Then, select the desired event.

  5. Click on Update V2 to save the configuration.

Last updated

Was this helpful?