I have created a custom field on my AccountContactRelation called SurrogateId__c and I set configured it to be an External Identifier.
When I create an AccountContactRelation from an external service, a trigger performs text-extraction from the surrogate id (something like "companyIdentifier_contactIdentifier"), looks up both account and contact and set them.
This works great the first time a record with a given SurrogateId companyIdentifier_contactIdentifier is upserted, but on the second upsert my code fails:
System.DmlException: Upsert failed. First exception on row 0; first error: DUPLICATE_VALUE, This contact already has a relationship with this company.: [ContactId]
Are external ID correclty supported by AccountContactRelation? Is there another solution to this problem?