💬 RevOps Discussions

EConsulting
Member

Workflow using Date property, possibly might need to be coded

SOLVE

I have a use case workflow that I need help with. What needs to happen is when a record gets created the date property needs to have the first every record date there instead of having the new record date created on that property.Screenshot 2023-06-14 at 11.28.52 PM.png

 

An example, So if a contact -- we'll call them Raj -- has multiple Volunteer Hour records, you want "First Volunteer Date" to show the date of the first Volunteer Hour record associated with Raj?

 

0 Upvotes
1 Accepted solution
KimM
Solution
Top Contributor

Workflow using Date property, possibly might need to be coded

SOLVE

Hi @EConsulting ,

 

Apologies for the delayed response, I’ve been on leave.

 

So as far as I understand it, you’ve got a custom object called ‘Volunteer Hours’ which is associated with the relevant contact. Then you’ve got a property on the contact record called ‘First volunteer date’ which you want to copy the ‘start date’ to for only the very first ‘Volunteer Hours’ custom object associated with that contact. Is this correct?

 

If so, I think this could be achieved very simply by just adding an additional enrolment criteria:

‘First Volunteer Date’ is not known

 

This will not solve the issue of backdating data however, it will only work with any future volunteers.

 

If you’re looking to backdate the data, you could approach it one of two ways:

  1. Export all of your data, manipulate it manually and import it. Then you could just turn your workflow on and it should all work fine.
  2. Create a contact-based workflow to handle all backdated data, run it for all relevant contacts and turn it off. Then turn on the workflow you have now with the additional enrolment criteria.

 

If you go with option 2 there will be some custom code required. Do you have operations hub?

 

If you do, my recommendation would be to set up a contact-based workflow triggered by contacts with an associated ‘volunteer hours’ object.

 

Then add a custom code workflow step which utilises the ‘Search’ endpoint for the custom object api (https://developers.hubspot.com/docs/api/crm/crm-custom-objects). You would filter by the contact association, sort by the create date of the custom object record (ascending) and return only 1 result (limit:1).

 

This can return the create date for the first volunteer hour custom object record associated with that contact. Which you can then copy to your contact record.

 

If you need some further guidance on the custom code part, I’m happy to help. But thought I’d better check you have that functionality in your account first.

 

I should note, the above suggestions assume that there is only one contact associated with a volunteer hours object record. We may need to take a slightly different approach if that is not the case.

 

I hope this helps, and do let me know if you need any further guidance.

 

Thanks,

Kim

View solution in original post

2 Replies 2
KimM
Solution
Top Contributor

Workflow using Date property, possibly might need to be coded

SOLVE

Hi @EConsulting ,

 

Apologies for the delayed response, I’ve been on leave.

 

So as far as I understand it, you’ve got a custom object called ‘Volunteer Hours’ which is associated with the relevant contact. Then you’ve got a property on the contact record called ‘First volunteer date’ which you want to copy the ‘start date’ to for only the very first ‘Volunteer Hours’ custom object associated with that contact. Is this correct?

 

If so, I think this could be achieved very simply by just adding an additional enrolment criteria:

‘First Volunteer Date’ is not known

 

This will not solve the issue of backdating data however, it will only work with any future volunteers.

 

If you’re looking to backdate the data, you could approach it one of two ways:

  1. Export all of your data, manipulate it manually and import it. Then you could just turn your workflow on and it should all work fine.
  2. Create a contact-based workflow to handle all backdated data, run it for all relevant contacts and turn it off. Then turn on the workflow you have now with the additional enrolment criteria.

 

If you go with option 2 there will be some custom code required. Do you have operations hub?

 

If you do, my recommendation would be to set up a contact-based workflow triggered by contacts with an associated ‘volunteer hours’ object.

 

Then add a custom code workflow step which utilises the ‘Search’ endpoint for the custom object api (https://developers.hubspot.com/docs/api/crm/crm-custom-objects). You would filter by the contact association, sort by the create date of the custom object record (ascending) and return only 1 result (limit:1).

 

This can return the create date for the first volunteer hour custom object record associated with that contact. Which you can then copy to your contact record.

 

If you need some further guidance on the custom code part, I’m happy to help. But thought I’d better check you have that functionality in your account first.

 

I should note, the above suggestions assume that there is only one contact associated with a volunteer hours object record. We may need to take a slightly different approach if that is not the case.

 

I hope this helps, and do let me know if you need any further guidance.

 

Thanks,

Kim

kvlschaefer
Community Manager
Community Manager

Workflow using Date property, possibly might need to be coded

SOLVE

Hi @EConsulting,

 

Thanks for reaching out to the Community!

 

I wanted to invite our subject matter experts to this conversation.

Hi @KimM@JBeatty@Teun - Do you have any advice for @EConsulting's workflow use case?

Thank you!

 

Best,

Kristen


Did you know that the Community is available in other languages?
Join regional conversations by changing your language settings !
0 Upvotes