Automation to Add Request Participant from Email field

Kristin Lyons
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 30, 2021

I have an automation that I am creating where based on an email address field, it will create a customer - but we also want to then add that customer in the request participant field for the existing issue.  What would be the best way to do this?  This is what I have so far, creating the customer works but not adding the request participant.

Screen Shot 2021-09-30 at 4.06.36 PM.png

 

{
"update": {
"Request participants" : [
{
"add": {
"id":"{{issue.Email Address}}"
}
}
]
}
}

 

 

1 answer

1 vote
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 30, 2021

Hi @Kristin Lyons 

You appear to be updating (add) the "id" field with an email address, and I believe you instead need that person's account id for the customer you are adding.  Here is the documentation for updating request participant with advanced edit:

https://support.atlassian.com/jira-service-management-cloud/docs/advanced-field-editing-json/#Advancedfieldediting-JSON--Requestparticipants

Kind regards,
Bill

Kristin Lyons
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 1, 2021

@Bill SheboyIs there a way to do this without having the ID?  We will be creating the customer's account in the same automation.

Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 1, 2021

Yes, I believe you need to use the accountId value since the GDPR (general data protection regulation) changes went into effect, and...

To be honest, I am not using JSM and my next answer is based on how I believe it works.

With my disclaimer out of the way, the documentation for the action to add a customer says the {{customer}} smart value becomes available after the add completes: https://support.atlassian.com/jira-service-management-cloud/docs/automation-actions/#Automationactions-Addtruecustomer

You may need to slow down the rule by putting in a Re-fetch action after the customer is created before the smart value is searchable when the rule is running.

Afterwards, you can try the {{customer.accountId}} smart value to make the edit with the JSON.

Suggest an answer

Log in or Sign up to answer