Server Side notification – new_tag_image (Webhook)
This article demonstrates how to create a webhook that will make requests to a predefined end-point whenever the event new_tag_image is emitted. This event is caused whenever a tag is applied to one or multiple images.
Note:
- To create a webhook, you will need access to the Administration Dashboard.
- To use webhooks, you should ensure that you have granted API access to SharinPix on your organization. To verify this, go to the SharinPix Settings tab and check if the second row, that is, Sharinpix -> Salesforce full API access, is highlighted in green.
In case the row, Sharinpix -> Salesforce full API access is still highlighted in red, simply click on the Grant button to grant API access.
For more detailed information on how to grant API access, please refer the the following article:
Basic Setup - Step 2 - Register your Salesforce organization to SharinPix
Create webhook
There are 2 types of web-hooks:
- Access the Administration Dashboard.
- Select the Webhooks menu item from the navigation bar.
- Click on the New Webhook button.
Call to a specific end-point URL
Configure the web-hook by filling the following values:
- Select the relevant Organization
- Select url as the Action Type.
- Inside the Url field enter the required endpoint.
- The value inside the secret field corresponds to the SharinPix Secret Header inside the POST request.
- The Type should be Webhooks::V2.
- In this case, the event to be detected should be New tag image.
- If you intend to emit the New tag image event when a specific tag is applied, enter the name of tag inside the Filter by tag name field.
- Click on V2 when you are done.
Call to a static method from an Apex Class
Configure the web-hook by filling the following values:
- Select the relevant Organization
- Select apex_method as the Action Type.
- Inside the Class name field enter the required Apex Class.
- Inside the Method name field enter the method to be invoked.
- The Type should be Webhooks::V2.
- In this case, the event to be detected should be New tag image.
- If you intend to emit the New tag image event when a specific tag is applied, enter the name of the tag inside the Filter by tag name field.
- Click on V2 when you are done.
0 Comments
Add your comment