function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Robert Jeffress 7Robert Jeffress 7 

How to ensure PricebookEntry is update when a new Product is created via integration?

I have a daily integration job, using Jitterbit Cloud Data Loader (the free version), that creates or updates products from an external system using a custom field set as External ID.  When a product is created, It must be associated or related to the standard Pricebook using PricebookEntry object. SF doesn't seem to do that automatically; I assume that is why one Pricebook is set as the Standard (IsStandard = true).  Looks like I need to do a second job to query Products not currently related to the standard price book and create an entry in PricebookEntry object for the missing ones.   In Jitterbit, I cannot use SF as the Source and the Target on the same job.  Using a Trigger on Product2 seems a little over the top for this.  I am sure others are integrating products and have solutions to share.  What is the best solution for doing this?  (I swear I so something like this on the certification exam)
Ashima nidhiAshima nidhi
You can use a trigger in case if there is any developer and customize the code using the logic of pricebook association as you want . In the second case using salesforce admin you can check for Flows/Process builder to write custom logic.
Hope the  above information was helpful.

Please mark as Best Answer so that it can help others in the future.