Invite non-customers to project through Automation
Asked by reno.dormanns:

Hello,

Using the following option:  

![Sharing.png](https://community.atlassian.com/t5/image/serverpage/image-id/333304i0B17D6D57EFAB328/image-size/large?v=v2&px=999 "Sharing.png")  

I've found customers can add other non-customers to their issues and therefore invite these non-customers to our environment, making them customers. They can do this via the "Shared with" option in the portal after an issue has been sent. JSM even sends a nice invitation email. This is a functionality we seek, as our customers need to open their issues to other customers that may not have logged in to our environment before.

However, I would like to extend this feature to **before** customers have send in their request type. I use custom fields to note down the email addresses of the non-customers and use Edit issue - request participants to add these persons to the issue as participants via the aforementioned custom fields, hoping that the Automation makes use of the same customer sharing feature. However, the rule fails to add the email addresses to the request participants field with error: "Inactive user". And thus it seems the Automation cannot or does not make use of the customer sharing feature.  

Is there a way around this?

Thank you in advance,

Reno Dormanns


Answers:
author: Tim Kopperud
body: Hi [@reno.dormanns](/t5/user/viewprofilepage/user-id/5469789), You don't think you can add to request participants before they becomes a user. As you mentioned, the added customer recieves an invitation mail. Accepting this invitation will create the user in Jira, and then they will become a requerst participant in the issue that triggered the invitation.

You might use the REST API to create the users before adding them as participants. In the automation rule you kan use **Send web request** to call the API.

See this article <https://developer.atlassian.com/cloud/jira/service-desk/rest/api-group-customer/#api-group-customer>

TimK

comments: author: reno.dormanns
body: Hi Tim,

Thank you! Your comment has helped me find the right track to solve this issue. Using web request to add users as customers worked and a bit later I actually found that the Automation has an "Add service project customer" feature, which is a bit cleaner.

However, the rule still returned "Inactive user". I tried some different things which led me to believe the customer list takes some time to update because the added customer could not be used as a parameter immediately. It still returned "Inactive user".

Fortunately, adding a delay using <https://httpbin.org/delay/10> does actually fix this whole ordeal and, while talking this over with a colleague, he linked me a suggestion with a comment: [https://jira.atlassian.com/browse/AUTO-238?focusedId=3460034\&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-3460034](https://jira.atlassian.com/browse/AUTO-238?focusedId=3460034&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-3460034) which describes exactly this problem.

So, for this all to work one needs a custom delay.

The solution works now!


author: Tim Kopperud
body: Hi [@reno.dormanns](/t5/user/viewprofilepage/user-id/5469789), thanks for informing about the **Add new customer** feature, this had simply passed me.

For a delay, there is a new component for this called **Delay**. You might use something like his

![image.png](https://community.atlassian.com/t5/image/serverpage/image-id/334201i405304E08CDE3074/image-size/large?v=v2&px=999 "image.png")

So it seems the delay component is allready implemented, though it is currently only available on Premium and Enterprise plans, as seen in the "Read more about delay" explanation link.

![image.png](https://community.atlassian.com/t5/image/serverpage/image-id/334203iC49F0220FB5ABCED/image-size/large?v=v2&px=999 "image.png")

I notice you have tagged your original post as having the Premium plan, so you should see the Delay component.

Also thanks for accepting the answer.

TimK.


author: reno.dormanns
body: Happy to help and thank you for the further help! We are indeed on Premium and I have just checked but Delay does not appear in our Automation. Maybe this feature is still in its rollout phase? Not to worry, our developer wrote a quick API endpoint to call for a delay so we are not reliant on a third-party endpoint anymore.


Tags: automation

cloud

custom-field

jira-service-management

jira-service-management-cloud

request-participants