I'm fairly new to Apex so please bear with me. I'm getting some error messages regarding reaching SOQL limits for a particular class and method that does a callout and loops through the results. I'm wondering now what exactly counts as a SOQL query, particularly, does setting a lookup field to a new record with an external ID as argument count as one (see code example below)? Note that the actual insertion (upsert) of the records is not done within the loop.
For example
sfticket.Contact__r = new Contact(TM_ID__c = tmOrder.customerId);
I found this documentation about Flow bulkification that got me to think about this. It says there "When fields on a record are looked up, the transaction performs a SOQL query."
Appreciate any insight in this!