Creating a Salesforce Task Based on Custom Object Creation

SKarmali
Member

I'm looking for some help with a set of workflows I'm building to support a partner référrąӏ* process.

 

We have a form that collects a referring partner's email address and various other fields related to the client they're referring, which are captured in a "Référrąӏ" custom object. Once the partner submits the form, a Référrąӏ object is created and triggers a workflow that updates the association label between the referring partner and Référrąӏ object, renames the Référrąӏ object, sends some notifications, and creates a new contact (if the form submission included information about the referred contact). 

 

The Référrąӏ object workflow is working perfectly and doing almost everything I need, except creating a Salesforce task (since the object-based workflow cannot use this action).

 

I have a simple secondary contact-based workflow that branches based on a fields from the most recently created associated référrąӏ, then creates the Salesforce task. It works for the most part, but I am running into trouble when the form is submitted multiple times in quick succession, because the contact can't clear the workflow fast enough to re-enroll. 

 

I have tested various ways to trigger the contact workflow (see below) but since the contact simply can't clear it in time to re-enroll, the ideal state would be for the object-based workflow to create the Salesforce task, as it is already running once per object vs. the contact workflow running multiple times for the same contact - can anyone suggest a solution/workaround for this?

 

Enrollment criteria I've tried for the contact-based workflow:

  • Trigger the contact-based workflow based on a new référrąӏ object being associated to the contact (cannot be used as re-enrollment criteria)
  • Use the object-based workflow to populate a field on the contact which triggers the contact-based workflow (can be used for re-enrollment, but gets cleared and repopulated too fast if a partner submits multiple forms in a row - they cannot be re-enrolled because they're still in the workflow)
  • Populate a field on the partner contact using a hidden form field (can be used for re-enrollment, but gets cleared and repopulated too fast if a partner submits multiple forms in a row - they cannot be re-enrolled because they're still in the workflow)

*weird characters because the actual word is not permitted in community posts 😕 

0 Upvotes
1 Accepted solution
RubenBurdin
Solution
Top Contributor

Hi @SKarmali 

That’s a smart workflow design and yes, the re-enrollment lag you’re hitting is a known limitation when mixing object-based and contact-based triggers.

 

Since object workflows can’t directly create Salesforce tasks, the cleanest workaround is to use a custom-coded workflow action or Webhook in your object workflow to call the Salesforce API and create the task externally (https://developers.hubspot.com/docs/api-reference/automation-actions-v4-v4/custom-code-actions )

 

This keeps everything tied to the “Référrąӏ” record and avoids timing issues with contact enrollment.

If you prefer to stay native, you can push a temporary flag field on the contact that expires after a short delay via a second workflow using a 1-minute delay before clearing it.

 

That small buffer often lets the re-enrollment window reset. When HubSpot and Salesforce need to exchange task or object data instantly, a two-way sync platform like Stacksync maps those actions across systems in real time so you never rely on workflow timing again.

Did my answer help? Please mark it as a solution to help others find it too.

Ruben Burdin Ruben Burdin
HubSpot Advisor
Founder @ Stacksync
Real-Time Data Sync between any CRM and Database
Stacksync Banner

View solution in original post

0 Upvotes
2 Replies 2
RubenBurdin
Solution
Top Contributor

Hi @SKarmali 

That’s a smart workflow design and yes, the re-enrollment lag you’re hitting is a known limitation when mixing object-based and contact-based triggers.

 

Since object workflows can’t directly create Salesforce tasks, the cleanest workaround is to use a custom-coded workflow action or Webhook in your object workflow to call the Salesforce API and create the task externally (https://developers.hubspot.com/docs/api-reference/automation-actions-v4-v4/custom-code-actions )

 

This keeps everything tied to the “Référrąӏ” record and avoids timing issues with contact enrollment.

If you prefer to stay native, you can push a temporary flag field on the contact that expires after a short delay via a second workflow using a 1-minute delay before clearing it.

 

That small buffer often lets the re-enrollment window reset. When HubSpot and Salesforce need to exchange task or object data instantly, a two-way sync platform like Stacksync maps those actions across systems in real time so you never rely on workflow timing again.

Did my answer help? Please mark it as a solution to help others find it too.

Ruben Burdin Ruben Burdin
HubSpot Advisor
Founder @ Stacksync
Real-Time Data Sync between any CRM and Database
Stacksync Banner
0 Upvotes
chighsmith
Community Manager
Community Manager

Hi @SKarmali,

Thank you for posting to the Community!

I understand that you’re having trouble creating a Salesforce task directly from an object-based workflow in HubSpot, as form submissions prevent the contact-based workflow from re-enrolling fast enough to trigger the needed task.


I'd like to tag in some of our Subject Experts to see if they have any advice on this -- Hi @LaurenRyan @MandyDROS and @Aakar Do you have any tips for @SKarmali?

Thank you!

Cassie, Community Manager





loop


Loop Marketing is a new four-stage approach that combines AI efficiency and human authenticity to drive growth.

Learn More




0 Upvotes