We use cookies to make HubSpot's community a better place. Cookies help to provide a more personalized experience and relevant advertising for you, and web analytics for us. To learn more, and to see a full list of cookies we use, check out our Cookie Policy (baked goods not included).
Nov 28, 2022 3:04 PM
I am looking for some ideas on how to solve an issue we're experiencing with a workflow. If the enrollment criteria is met, the first step in the workflow creates a new record in a custom object for that particular contact. The workflow will then copy several contact properties that were updated from Salesforce. The copy steps will update the new record in the custom object with the latest values of those contact properties. However, the issue is that if that contact already has existing records in the custom object, the copy process will also step on those existing records.
I am not sure how to prevent the existing records from getting stepped on. Do we need a different approach to the workflow?
Any suggestions would be greatly appreciated.
Thanks,
Terry McMillan
Nov 30, 2022 8:50 AM
Hi Terry. I saw this on LinkedIn recently and wonder if some branching logic might help.
That may spark an idea for you.
Did this post help solve your problem? You can help others find answers when you accept a reply as a solution. (I also appreciate it!)
|
![]() |
Nov 30, 2022 9:59 AM
@weiliang_lee @danmoyle @deepikaverma
First of all, thanks for the willingness to help out and offer suggestions. I truly appreciate it.
Let me give some background on the process so that you can have a better understanding of how it works.
Contact (new or existing) fills out a test questionaire answering various questions with a an answer of 1-10. The contact info and test answers are then updated to Salesforces where calculations are conducted and a score is determined for 5 categories. The scores are then updated back to Hubspot for that contact. The custom object is meant to store all of the scores for a contact each time they take the test. The scores in the custom object are displayed in charts on a dashboard website page that the contact can log into. The dashboard will only show the scores for the contact logged in and contains other information as well.
The workflow was created to copy those test scores (contact properties) to the custom object each time they are updated from Salesforce. The workflow works correctly when the contact is taking the test for the first time. However, if the contact already has existing scores in the custom object, the workflow will step on them when copying the latest scores in.
The If/then branch seems like the logical solution where we could have some sort of data validation before executing the copy steps. However, it doesn't appear that I can validate against the custom object. See attached screenshot of my options-
As I mentioned previously, the first step in the workflow, if the enrollment criteria is met, is creating a new record for the contact in the custom object. The new record has "0" for the 5 test scores which would then get stepped on with the real scores by the copy steps.
Thanks,
Terry
Dec 1, 2022 7:50 AM - edited Dec 1, 2022 7:51 AM
Hi @tmcmillan99
To make if then condition successful, make a custom object based wf and then perform that copy step. It will work.
I hope it helps!
Thanks!
Dec 1, 2022 10:03 AM
Hey @deepikaverma
Thanks for the suggestion. I started a workflow based on the custom object, however, when I start building it out, I am not able to access the contact properties for the copy steps. It will only allow me to copy from properties in the custom object. Maybe I am not setting it up correctly initially. I will review it again.
Thanks,
Terry
Nov 29, 2022 1:59 PM
Hi, @tmcmillan99 👋 Thanks for the great question. Workflow options are always an interesting challenge.
Thanks for the suggestion @weiliang_lee. I appreciate the simplicity. One related follow-up question for @tmcmillan99 — if the first property checked using an if/then branch is known, is it safe to assume all are known? Or would it need to always check against each of the properties it needs to copy every time?
I ask because if one property is known, is it safe to assume all are known? This would require only one branch.
Hey, @deepikaverma @danmoyle, do you have any additional light to shine here?
Thank you very much! — Jaycee
Nov 29, 2022 2:47 PM
Thanks for the suggestion. I had originally thought about the if/then branch and added a checkbox to the custom object in order to show a record as "processed". The idea was to only copy to the custom object if the checkbox is not checked or is "not processed". However, when I go to set up the if branch, none of the custom object properties are available to use.
Is that a possible custom object settings issue?
Thanks,
Terry
Nov 29, 2022 11:19 PM
Hi @tmcmillan99
Help me understand a little more about the flow:
I don't quite get the use case - what is purpose of your Custom Object? Perhaps if we look at your original intention, we could put our heads together to find out if this approach is the best way.
Cheers
WL
Nov 29, 2022 1:18 AM
Hi,
It seems that you could use the If/Then branch action. From here you could set a filter that checks if "your custom object's property is unknown" - which then leads to your step of copying the contract property over.
Cheers
WL
Nov 30, 2022 6:52 AM
Hi @tmcmillan99
As you have mentioned that you are creating new record in custom objects, so how the property values on that custom ojecect can be preoccupied as its a new record.
Please correct me if I have wrongly interpretated your request.
Thanks!