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:
- This value must find its way into the additional contact.
- 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.