Skip to content

Function: createCustomer() ​

ts
function createCustomer(
   client, 
   parameters, 
   options?
): Promise<{
[key: string]: unknown;
  _links?: {
   [key: string]: unknown;
     avatarUrls?: Record<string, string>;
     jiraRest?: string;
     self?: string;
  };
  accountId?: string;
  active?: boolean;
  displayName?: string;
  emailAddress?: string;
  key?: string;
  name?: string;
  timeZone?: string;
}>;

Defined in: src/serviceDesk/api/customer.ts:15

This method adds a customer to the Jira Service Management instance by passing a JSON file including an email address and display name. The display name does not need to be unique. The record's identifiers, name and key, are automatically generated from the request details.

Permissions required: Jira Administrator Global permission

Parameters ​

ParameterTypeDescription
clientClient-
parameters{ displayName?: string; email?: string; fullName?: string; strictConflictStatusCode?: boolean; }-
parameters.displayName?stringCustomer's name for display in the UI.
parameters.email?stringCustomer's email address.
parameters.fullName?stringDeprecated, please use 'displayName'.
parameters.strictConflictStatusCode?booleanOptional boolean flag to return 409 Conflict status code for duplicate customer creation request
options?RequestOptions-

Returns ​

Promise<{ [key: string]: unknown; _links?: { [key: string]: unknown; avatarUrls?: Record<string, string>; jiraRest?: string; self?: string; }; accountId?: string; active?: boolean; displayName?: string; emailAddress?: string; key?: string; name?: string; timeZone?: string; }>