Create 2nd contact and associate it with the ticket

Hi,

I have a form that, upon submission, will create a ticket associated with the contact. However, within the form, I have an option to create a 2nd contact. I would like this contact to be associated with the ticket as well, but I’m unsure how to do so.

So far, I have the following 2 workflows:

1. Create the ticket when the form is submitted. This also successfully associates the ticket with the first contact, using the setting within the “Create record” step.

2. Create a 2nd contact if a radiobox within the form is “Yes” and the fields for 2nd first name, last name, and email were filled.

I manage to make the 2nd contact associated with the 1st contact, but not to the ticket.

On the 2nd workflow, I tried to set a similar setting to the 1st one, having

Associate the contact with:

→ The records associated to the enrolled contact:

→ Associated: Ticket

→ And apply the label: No label

But it doesn’t seem to work.

Thank you in advance for helping!

Hi @hphan-trlaw,

To establish that association, you need to have a value on the additional contact and the ticked record that is shared and can serve as a key.

I played around a bit and found the following solution:

After creating your ticket – before creating the additional contact (!) – use the ‘Edit record’ workflow action to copy the ‘Create record’ output, specifically ‘The created object’ into a custom field on the submitting contact:

In my test, the value of this “The created object” was the following:

PORTALID-0-5-TICKETRECORDID

This is great, because it means that we can pass this on into the additional contact and then there is a clear link between the ticket and the additional contact.

Before we can do that, two things must be done:

  1. This value must find its way into the additional contact.
  2. The value must also be present on the ticket record which currently only has a record ID but not the entire thing with portal ID and -0-5-

The first part is easy: In your workflow, after creating the ticket and after copying the value as shown in the screenshot above, create your branch to check if an additional contact needs to be created. If yes, use the ‘Create record’ workflow action and simply click ‘Add more properties’ in the left sidebar to copy the value from step 2 in my screenshot into the newly created contact.

After creating the additional contact, use the ‘Edit record’ action to clear the value (the one we set in step 2 in my screenshot) on the original submitting contact. (Otherwise, the association workflow will later look at one contact unnecessarily.)

The second part is not so bad either: Create a ticket workflow that enrolls tickets, then uses ‘Edit record’ to set the value of a new property, e.g. “Portal ID + Record ID”, and set it to your PORTALID-0-5-TICKETRECORDID – where TICKETRECORDID is the personalization token for the enrolled ticket’s record ID.

Now, we’re almost done. We have a newly created contact with the PORTALID-0-5-TICKETRECORDID value and we have a ticket record with the PORTALID-0-5-TICKETRECORDID value.

Now create a second workflow for the association part. Create a contact based workflow that enrolls contacts when the value of the property holding PORTALID-0-5-TICKETRECORDID is known, then delays for 1 minute to give the ticket workflow a moment, then use ‘Create association’ to link the two records based on matching values in the field we populated on the ticket and the field on the contact.

Have a look, give it a try and let me know if you’re getting stuck somewhere.

Hi,

Thank you for the response. I’ve managed to add PORTALID-0-5-TICKETRECORDID to the 2nd contact’s custom field, but not sure how to add it to the ticket’s custom field. Is it within the same workflow or do I need to create another one.

Here’s what I have to far. Just to note, “Intake” is my term for ticket

@hphan-trlaw theoretically action 2 could be moved right above action 4, as it is only relevant when an additional contact is added, but otherwise this looks good, yes.

The ticket custom field would have to be filled by a separate ticket-based workflow. Alternatively, you could try a calculation property that simply concatenates the PORTALID-0-5-TICKETRECORDID parts: Create calculation and rollup properties

I’m not sure off the top of my head if calculation properties are accepted in the create associations workflow action but it’s worth a try :slightly_smiling_face:

Hi,

It seems I have found the solution.

In the workflow above, when creating the ticket record, I add record ID - Create Date to the custom field

Then, in the step to create the contact record, I add the same info to a similar custom field.

After that, I have a separate workflow that triggers when that custom field is known for the contact

I’m not sure if the 1-minute delay is necessary, but as a precaution, I left it in place. And it seems to work. I figure it could also work with just “Record ID”, don’t you think?

Anyway, thank you so much for the idea!

@hphan-trlaw sure, that also works – the solution lies within making a unique value available in the two records that should be associated :slightly_smiling_face:

Glad it worked!