Skip to content

Conversation

ivannovosad
Copy link
Contributor

Context

An edge case might occur when there's already a contact created in Netsuite but there's also another job that is trying to create the same contact. In that case another contact in netsuite was created (with new external_id) but then the job failed when trying to save the duplicate in the DB

Description

This PR fixes creating duplicate contacts in IntegrationCustomers::NetsuiteService by first checking if the record exists in integration_customerstable in which case it doesn't even call the nango endpoint and returns the existing integration customer.

@ivannovosad ivannovosad merged commit e6fec3a into main Jun 9, 2025
14 checks passed
@ivannovosad ivannovosad deleted the fix-netsuite-create-contact branch June 9, 2025 12:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants