Menu
Feedback
Start here

Troubleshooting

Troubleshooting
Trigger in Master Data v2 is not working
Published on 12/10/2024
•
Last update on 12/10/2024

When creating a trigger to notify changes to a data entity in Master Data v2, some users may notice that no requests are sent to the configured endpoint, even after configuring the trigger.

This issue may result from an incorrect trigger configuration or problems with permissions and authentication. Follow the instructions in this guide to identify and resolve the issue.

Solution

Here are a few approaches to address the issue:

Double-check the trigger configuration

Follow the instructions in the guide Setting up triggers in Master Data v2 to review the trigger configuration. Check the following details to avoid mistakes:

  • Confirm that the trigger structure in v-triggers is accurate and includes the required fields: name, active, action, type, uri, method, headers, and body.

  • If the trigger is set to make requests to an external API, verify that the endpoint URL (uri) is correct and accessible. You can test the URL directly to ensure it is ready to receive POST requests.

  • Check the JSON syntax in the trigger body, as simple syntax errors can cause the trigger to fail silently.

  • If the trigger is associated with a specific entity or operation, make sure these conditions are met.

  • Verify that the data entity exists and is properly configured in Master Data v2. Data entities in Master Data v1 and v2 are independent, so documents created in Master Data v1 cannot be accessed or edited using Master Data v2 resources, and vice versa.

    To test triggers with Master Data v1 entities, follow the instructions for setting up triggers in Master Data v1.

Test the endpoint independently

Manually send a request to the endpoint using a tool like Postman. This will help ensure that the endpoint is receiving requests correctly and working as expected.

  • When making a manual change to the data entity, make sure it fires the trigger as expected.
  • Make sure the id field is correctly included in the request body. This will identify the document that initiated the trigger.

Check permissions and authentication

  • Make sure your credentials have the appropriate permissions to send requests to the specified endpoint.
  • If the trigger makes a request to an external endpoint, check if no additional authentication or security headers are required for the target endpoint.

If none of these solutions resolve the issue, please contact our Support.

Was this helpful?
Yes
No
Suggest Edits (GitHub)
Contributors
1
Photo of the contributor
+ 1 contributors
Contributors
1
Photo of the contributor
+ 1 contributors
On this page
Still got questions?
Ask the community
Find solutions and share ideas in the VTEX community.
Join our community
Request support from VTEX
For personalized assistance, contact our experts.
Open a support ticket
GithubDeveloper portalCommunityFeedback