Configure Server-side Events

The current article demonstrates how to configure Server-side SharinPix Events.

circle-check
circle-exclamation

Configure Server-side Events

  • Access the SharinPix Admin Dashboard to configure a server-side event.

  • Select the 'Webhooks' menu item from the navigation bar.

  • Click on the 'New Webhook' button.

  • Select your current Salesforce Organization.

  • Select whether to execute an Apex method or make a request to a specific endpoint.

  • Select the type of event to be detected.

  • Click on Create V2, when you are done.

Webhook in action

The objective of this section is to show how to detect the New Image event and call an Apex Method found on the SharinPix Package. The New Image event is triggered when a new image is added to a SharinPix Album. After detecting this event, the newImage method from the ImageSyncMigration class will be called and therefore perform a resync on the newly-added image.

  • The Webhook is configured as shown in the screenshot below where the method to be executed and the event that triggers this execution, are specified.

  • In this context, the related list of SharinPix Images and the SharinPix Album is present on the page-layout and page of the Account Object respectively.

  • A new image is added to the SharinPix Album as shown below.

  • Once the image has been uploaded, you need to refresh the current page. A new entry in the SharinPix Images related list has been added as shown in the image below.

Last updated

Was this helpful?