Hi there. In this solution guide we are going to look at how to create customers that may be sub-customers to another customer. This may be useful for Salesforce -> QuickBooks recipes, where a Salesforce user is a sub customer to another type of Salesforce user.
These 9 steps involved will set you up to create a sub-customer relationship between two customers. Step 1 and 2 are Search actions. These actions will search for the relevant record that you would like to have in your QuickBooks.
Step 3 says that if both Search actions return results, we will proceed to step 4 and 5, which checks again that if the intended sub-customer (Step 2 search) does not have a customerID it it's parent customer field, then proceed to step 5 to update the sub-customer with the intended parent customerID from step 1.
If you are not sure where do you get Step 4's Parent customerID from, Look into the search action for QuickBooks customer. In this case, because Step 2 Search action is the action that I used to search for a customer that will be a sub-customer, I used the customerID from this step's Parent details and check if it is present.
In Step 5, I updated the customer I found from Step 2's search action with the customerID from Step 2. The sub-customer is now linked to the parent customer found from Step 1.
Step 6 to 9 then deals with data duplication. We say that if the Search customers action does not return any result (shown by customerID not present), then go ahead and create the customer. Note the arrangement of the creation of the customers. I created the parent customer first, in order for me to link to parent customer to the sub-customer when I create it in Step 9. When creating the sub-customer in Step 9 and you would want to link the parent customer to it, click on the toggle button (the two circles button on the right side of the field). Then, choose the customerID either from Step 1 or Step 7.
This is because if the parent customer already exist, then you will need to get the customerID from Step1. If it doesn't exist, we will be creating it in Step 7, and we will need to take the customerID from Step 7. Remember, to use the or keyword the formula mode must be turned on. For more information about formula mode, check out the link here.