• 5
    • 44
    • We collect Jira Service Desk feedback from various sources, and we evaluate what we've collected when planning our product roadmap. To understand how this piece of feedback will be reviewed, see our Implementation of New Features Policy.

      NOTE: This suggestion is for JIRA Service Desk Server. Using JIRA Service Desk Cloud? See the corresponding suggestion.

      Problem Definition

      Configuring a Service Desk and would like to Bulk Add New Customers via CSV or other External File. Not having an import method like this is a problem for Service Desk users that have an existing customer base configured in another system but are moving towards JIRA Service Desk.

      Suggested Solution

      Add an option to Import Customers into a Service Desk Project similar to a User/Group Import via CSV

      Workaround

      • New Customers can be created manually
        • Use the Invite Customers Link and specify each Email Address for New Customers (space delimited for multiple addresses; eg email1@domain.com email2@domain.com etc)
      • Each Customer can self-register to access the Service Desk (if configured for self sign-up)

            [JSDSERVER-1829] Bulk Import Customers from External File

            skavatekar added a comment - https://getsupport.atlassian.com/browse/GHS-226431  

            Heather R added a comment -

            We want to automatically add users to their organizations based on their @ email domain. Also, it would help if Jira allowed us to set a default organization for all new users added.

            Heather R added a comment - We want to automatically add users to their organizations based on their @ email domain. Also, it would help if Jira allowed us to set a default organization for all new users added.

            Leos Junek added a comment - - edited

            Andreyev, the situation is this: I do not want invite customers to a project. I just want to add many customers to a project without disturbing them with an e-mail. They are customers under contract and they do not need to be notified about they can join or they are added to some servicedesk system.  

            So my original problem (that is not supported directly with JIRA SD UI and we can discuss workarounds here) is

            • to add many customers to a single project with no e-mail notifications or invitations
            • each project has its own set of customers

            Steps to resolve the problem:

            1. Set project permission Service Desk Customer - Portal Access for browsing and commenting and other operations in project. It causes only customers with that role can have all customer privileges. (JIRA even offered this permission change to me to prevent all customers access all customer portals, so I did it with a single click on the offered link.)
            2. Create a customer account with a REST call
              curl -H "X-ExperimentalApi: true" -H "Content-Type: application/json" -u admin:password -X POST --data '{ "email": "customer1@company.com", "fullName": "Customer Viktor" }' 
            3. Add customer(s) to a project with call
              curl -H "X-ExperimentalApi: true" -H "Content-Type: application/json" -u adminuser:password -X POST --data '{ "usernames": ["customer1@company.com", "customer2@company.com"]}' "http://jirasdtest.company.com/rest/servicedeskapi/servicedesk/3/customer"
              

              where 3 is serviceDeskId. It is the number that is on the end of URL of servicedesk customer portal, e.g. the number 3 is found from URL

              http://jirasdtest.company.local/servicedesk/customer/portal/3

            More info:

            Leos Junek added a comment - - edited Andreyev, the situation is this: I do not want invite customers to a project. I just want to add many customers to a project without disturbing them with an e-mail. They are customers under contract and they do not need to be notified about they can join or they are added to some servicedesk system.   So my original problem (that is not supported directly with JIRA SD UI and we can discuss workarounds here) is to add many customers to a single project with no e-mail notifications or invitations each project has its own set of customers Steps to resolve the problem: Set project permission Service Desk Customer - Portal Access for browsing and commenting and other operations in project. It causes only customers with that role can have all customer privileges. (JIRA even offered this permission change to me to prevent all customers access all customer portals, so I did it with a single click on the offered link.) Create a customer account with a REST call curl -H "X-ExperimentalApi: true " -H "Content-Type: application/json" -u admin:password -X POST --data '{ "email" : "customer1@company.com" , "fullName" : "Customer Viktor" }' Add customer(s) to a project with call curl -H "X-ExperimentalApi: true " -H "Content-Type: application/json" -u adminuser:password -X POST --data '{ "usernames" : [ "customer1@company.com" , "customer2@company.com" ]}' "http: //jirasdtest.company.com/ rest /servicedeskapi/servicedesk/3/customer" where 3 is serviceDeskId . It is the number that is on the end of URL of servicedesk customer portal, e.g. the number 3 is found from URL http://jirasdtest.company.local/servicedesk/customer/portal/3 More info: https://confluence.atlassian.com/cloudkb/how-to-restrict-customers-access-to-specific-projects-only-in-jira-service-desk-cloud-815566896.html https://docs.atlassian.com/jira-servicedesk/REST/server/#servicedeskapi/servicedesk/

            Ops, I'm sorry @Leos Junek, misunderstood your question. What if you invite the same user (by their email) to each project it should be?

            Andreyev Dias de Melo added a comment - Ops, I'm sorry @Leos Junek, misunderstood your question. What if you invite the same user (by their email) to each project it should be?

            Leos Junek added a comment - - edited

            Andreyev, it does not work. Do not mix JIRA user groups (applicable in all JIRA editions) with organizations that are used only in JIRA Service Desk (database table AO_54307E_ORGANIZATION).

            The method you mentioned may add user to a group, but cannot add customer to a service desk project nor service desk project organisation.

            In my opinion there is no appropriate JIRA Service Desk REST API method/call that assigns a customer to a particular project, removes a customer from a project, adds/removes a customer from an organisation or edits a customer. It has not been developed yet.

            Leos Junek added a comment - - edited Andreyev, it does not work. Do not mix JIRA user groups (applicable in all JIRA editions) with organizations that are used only in JIRA Service Desk (database table AO_54307E_ORGANIZATION ). The method you mentioned may add user to a group, but cannot add customer to a service desk project nor service desk project organisation. In my opinion there is no appropriate JIRA Service Desk REST API method/call that assigns a customer to a particular project, removes a customer from a project, adds/removes a customer from an organisation or edits a customer. It has not been developed yet.

            Great junek! What about create a group which is in project and add users to it?

            curl -fs -u "${JIRAUSER}:${JIRAPASS}" -X POST --data "{\"name\": \"${EMAIL}\"}" -H "${HEADER}" "${JIRAURL}/rest/api/2/group/user?groupname=${COMPANY}"

            Andreyev Dias de Melo added a comment - Great  junek ! What about create a group which is in project and add users to it? curl -fs -u "${JIRAUSER}:${JIRAPASS}" -X POST --data "{\" name\ ": \" ${EMAIL}\ "}" -H "${HEADER}" "${JIRAURL}/ rest /api/2/group/user?groupname=${COMPANY}"

            Leos Junek added a comment -

            Hi Andreyev, thanks for your post. However I did not want to invite customers, only to add customers without sending any e-mail. 

            Finally I got it and found the right syntax. JIRA Service Desk REST API refused parameter displayName. I also forgot to use appropriate JSON header in my command.

            Here is the right syntax with response

            curl -H "X-ExperimentalApi: true" -H "Content-Type: application/json" -u admin:password -X POST --data '{ "email": "customer@company.com", "fullName": "Customer Viktor" }' "http://jiraservicedesk.company.com/rest/servicedeskapi/customer" | python -mjson.tool
            % Total % Received % Xferd Average Speed Time Time Time Current
            Dload Upload Total Spent Left Speed
            100 786 0 720 100 66 3769 345 --:--:-- --:--:-- --:--:-- 3789
            {
            "_links": {
            "avatarUrls": {
            "16x16": "http://jiraservicedesk.company.com/secure/useravatar?size=xsmall&avatarId=10122",
            "24x24": "http://jiraservicedesk.company.com/secure/useravatar?size=small&avatarId=10122",
            "32x32": "http://jiraservicedesk.company.com/secure/useravatar?size=medium&avatarId=10122",
            "48x48": "http://jiraservicedesk.company.com/secure/useravatar?avatarId=10122"
            },
            "jiraRest": "http://jiraservicedesk.company.com/rest/api/2/user?username=customer%40company.com",
            "self": "http://jiraservicedesk.company.com/rest/api/2/user?username=customer%40company.com"
            },
            "active": true,
            "displayName": "Customer Viktor",
            "emailAddress": "customer@company.com",
            "key": "customer@oksystem.cz",
            "name": "customer@oksystem.cz",
            "timeZone": "Europe/Prague"
            }
            
            

            Unfortunately I cannot see any option to add the customer to a particular project. It has to be done manually, as well as removing the customer from project.

            Leos Junek added a comment - Hi Andreyev, thanks for your post. However I did not want to invite customers, only to add customers without sending any e-mail.  Finally I got it and found the right syntax. JIRA Service Desk REST API refused parameter displayName. I also forgot to use appropriate JSON header in my command. Here is the right syntax with response curl -H "X-ExperimentalApi: true " -H "Content-Type: application/json" -u admin:password -X POST --data '{ "email" : "customer@company.com" , "fullName" : "Customer Viktor" }' "http: //jiraservicedesk.company.com/ rest /servicedeskapi/customer" | python -mjson.tool % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 786 0 720 100 66 3769 345 --:--:-- --:--:-- --:--:-- 3789 { "_links" : { "avatarUrls" : { "16x16" : "http: //jiraservicedesk.company.com/secure/useravatar?size=xsmall&avatarId=10122" , "24x24" : "http: //jiraservicedesk.company.com/secure/useravatar?size=small&avatarId=10122" , "32x32" : "http: //jiraservicedesk.company.com/secure/useravatar?size=medium&avatarId=10122" , "48x48" : "http: //jiraservicedesk.company.com/secure/useravatar?avatarId=10122" }, "jiraRest" : "http: //jiraservicedesk.company.com/ rest /api/2/user?username=customer%40company.com" , "self" : "http: //jiraservicedesk.company.com/ rest /api/2/user?username=customer%40company.com" }, "active" : true , "displayName" : "Customer Viktor" , "emailAddress" : "customer@company.com" , "key" : "customer@oksystem.cz" , "name" : "customer@oksystem.cz" , "timeZone" : "Europe/Prague" } Unfortunately I cannot see any option to add the customer to a particular project. It has to be done manually, as well as removing the customer from project.

            JP Rowan added a comment - - edited

            Andreyev, Is there a version of that endpoint that can be called to a cloud instance?

            I would love to be able to send/resend invites to customers since for my use case we need to create users with custom properties utilizing the APIs.  Currently no email is sent on creation, I would love to add sending an invite to my application layer.

            JP Rowan added a comment - - edited Andreyev, Is there a version of that endpoint that can be called to a cloud instance? I would love to be able to send/resend invites to customers since for my use case we need to create users with custom properties utilizing the APIs.  Currently no email is sent on creation, I would love to add sending an invite to my application layer.

            To invite a new customer I usually run:

            curl -fs -u "${JIRAUSER}:${JIRAPASS}" -X POST --data "{\"emails\":[\"${EMAIL}\"]}" -H "${HEADER}" ${JIRAURL}/rest/servicedesk/1/pages/people/customers/${PROJECT}/invite
            

            Andreyev Dias de Melo added a comment - To invite a new customer I usually run: curl -fs -u "${JIRAUSER}:${JIRAPASS}" -X POST --data "{\" emails\ ":[\" ${EMAIL}\ "]}" -H "${HEADER}" ${JIRAURL}/ rest /servicedesk/1/pages/people/customers/${PROJECT}/invite

            There is an experimental method intended to add a new customer in JIRA Service Desk Rest API Reference.

            I successfully run method info with this syntax

            curl -H "X-ExperimentalApi: true" -u user:password -X GET  "http://jirasdtest.company.local/rest/servicedeskapi/info" | python -mjson.tool
            

            but when I tried to run method customer, I still get an 404 error (null for uri). Here is my command:

            curl -H "X-ExperimentalApi: true" -u user:password -X POST --data '{ "email":"customer@company1.com", "fullName":"Customer Name" }' -H "Content-Type: application/json" "http://jirasdtest.company.local/rest/servicedeskapi/customer"
            

            Could anyone help me, please?

            I did not found any example of running POST method in JIRA Service Desk, so there may be a mistake.

            Leos Junek added a comment - There is an experimental method intended to add a new customer in JIRA Service Desk Rest API Reference . I successfully run method info with this syntax curl -H "X-ExperimentalApi: true " -u user:password -X GET "http: //jirasdtest.company.local/ rest /servicedeskapi/info" | python -mjson.tool but when I tried to run method customer , I still get an 404 error (null for uri). Here is my command: curl -H "X-ExperimentalApi: true " -u user:password -X POST --data '{ "email" : "customer@company1.com" , "fullName" : "Customer Name" }' -H "Content-Type: application/json" "http: //jirasdtest.company.local/ rest /servicedeskapi/customer" Could anyone help me, please? I did not found any example of running POST method in JIRA Service Desk, so there may be a mistake.

              Unassigned Unassigned
              scranford Shawn C
              Votes:
              125 Vote for this issue
              Watchers:
              79 Start watching this issue

                Created:
                Updated: