The optimal way to implement the requirement is to create a cross-reference table in the custom invoicing system with the Salesforce Account ID of each Customer and insert invoice data nightly. This way, the developer can use the Salesforce Account ID as the foreign key to associate the invoice data with the correct Account record in Salesforce, and avoid querying the Account object for each invoice record. This can improve the performance and reliability of the data integration, as it reduces the number of queries and the dependency on the Customer Number field. Ensuring Customer Number is an External ID and that a custom field Invoice Number is an External ID and upsert invoice data nightly would not be optimal, as it would still require querying the Account object for each invoice record to match the Customer Number field. Using Salesforce Connect and external data objects to seamlessly import the invoice data into Salesforce without custom code would not be optimal, as it would require the external system to expose the invoice data as an OData service, and also incur additional costs for using Salesforce Connect. Querying the Account Object upon each call to insert invoice data to fetch the Salesforce ID corresponding to the Customer Number on the invoice would not be optimal, as it would be inefficient and prone to errors, especially if the Customer Number field is not unique or indexed. Reference: [Salesforce Connect: Data Integration Platform], [External ID Field]