Having trouble making a Invoice flow that takes them from Netsuite to Salesforce

I have the flow running off of a saved search in NetSuite that gets new invoices daily. The exporting from NetSuite process seems to be working fine but the importing to salesforce there seem to be some issues. The records that are failing are the ones where the company doesn’t exist inside of salesforce. Is there a way to make a condition so if the company doesn’t exist then create a record for that company in Salesforce? Also, the invoices related to companies that are already in Salesforce it still does not go through. Any ideas? Also cant figure out how to attach the invoice to the correct Order in Salesforce.

P.S: Accounts = Company for our Salesforce environment so those two are interchangeable.

Hi Moazzam,

Thank you for reaching out via Connective.

Looking at your inquiry, below are the possible reasons/options:

  • Flow may need a parent record Add/Update step. Salesforce will reject child records (Invoices) if the referenced parent (Account ID/ Company) is missing or invalid.
  • Mapping failures for existing Accounts typically occur when attempting to map NetSuite Internal IDs directly to Salesforce standard IDs instead of utilizing dynamic lookups or External IDs.
  • Salesforce Integration User authenticated in the connection lacks Field-Level Security (FLS) "Read" access sObject field, making it invisible to the API query.
  • Order failing because the mapping is likely passing a raw text value or NetSuite ID into a Salesforce Lookup relationship field, rather than dynamically querying Salesforce for the corresponding OrderId.
  • Also, have you tried to create a dedicated flow for Customer to Account flow scheduled run prior to Invoice flow, isolating Account creation from Invoice flow?

We may also need the following:

  • What is the exact error message?
  • Specific field used for mapping NetSuite Customer to Salesforce Account.
  • Does your Salesforce integration user profile has the necessary 'Create', 'Read', 'Update', and Field-Level Security (FLS) permissions for the Account, Order, and Invoice objects?

Possible related articles:
Import data into Salesforce

https://docs.celigo.com/hc/en-us/articles/360052223752-Import-data-into-Salesforce#import-data-into-salesforce-0

Create custom flows

https://docs.celigo.com/hc/en-us/articles/360025919171-Create-custom-flows#create-custom-flows-0

Add a lookup step in the middle to search Salesforce for Accounts = Company. If you get no results, then branch off an create a new account and then make the order/invoice. If you get results, you can go ahead and make the order/invoice.