All Classes Pages
EditGroupCustomerPage Class Reference

More...

Detailed Description

Edit Group Customer

Overview

This API allows user to modify an existing group customer.

This API also allows user to:

  • Modify the existing contact persons and contact points of the customer.
  • Add new contact persons and contact points for the customer.
Since
11.6

APIs

Method URL Description
PUT /ws/v12/interaction/customer Modify an existing group customer.

Authentication

Authentication is required. The client must be logged in to call this API. Each API request must contain X-egain-session request header returned by Login API.

Permissions

All of the following are required:

  • User must have 'Edit Customer' action.
  • If "Customer departmentalization" setting is enabled in the application, then the customer being modified must belong to either the user's home department, or to the department where the user is a foreign user.
  • If preferred agent of the customer has to be modified:
    • User must have view permission on the target preferred agent.
    • If "Customer departmentalization" setting is enabled in the application, the department of the customer must either be the home department of the target preferred agent or the target preferred agent must be a foreign user in the customer's department.

Licenses

The logged in user must have the following licenses:

Request

Request headers

Name Description Allowed values Default value
X-egain-session Session ID obtained from Login API response header N/A N/A
Accept Content type accepted by client. application/xml or application/json N/A
Content-Type Media type sent by the client application/xml or application/json N/A
Accept-Language Language locale accepted by client (used for locale specific fields in resource representation and in error responses) Supported 'Accept-Language' header codes default system language

Request Body

The request body is mandatory. Request body can be in either XML or JSON format:

Elements required in request body

Name Description
id ID of the customer.

Optional elements allowed in request body

Name Description
customerName Must not exceed 124 characters.
type.group.type.value Must be one of the values configured in application.
level.value Must be one of the values configured in application.
role.value Must be one of 'Partner', 'Reseller' or 'Customer'.
pin Must not exceed 255 characters.
howReferred.value Must be one of 'Website', 'Customer', 'Partner', 'Employee' or 'Reseller'.
industry.value Must be one of the values configured in application.
marketSegment Must not exceed 50 characters.
preferredAgent.id Must match the ID of a user in application.
entitlements Must not exceed 1024 characters.
type.group.region Must be one of the values configured in application.
type.group.numberOfMembers Must not exceed 19 digits.
type.group.income Must not exceed 20 characters.
type.group.currency Must not exceed 255 characters.
type.group.registrationNumber Must not exceed 255 characters.
type.group.sector Must not exceed 50 characters.
contactPersons.contactPerson Can have multiple contact persons.
customAttributes Name must match one of the custom attributes configured in application. If the custom attribute is configured as an enumeration, the value must be one of the predefined values.
For string type of custom attribute that is not configured as an enumeration, refer list of Allowed Characters For Custom Attributes.

NOTE: To remove value of any element of type "String", set the value to an empty string.

Request body XML schemas:

  • schema-interaction-Customers

Supported API specific query parameters

None

Supported common query parameters

None

Response

Response headers

Name Description Possible values
X-egain-session ID of the current user session N/A
Content-Type Media type of response body application/xml or application/json

Response body

The response body will be sent only in case of error. It can be in either XML or JSON format.

Response body XML schemas:

  • schema-kb-WSError - used in case of error

HTTP status codes

Success Status codes

204 - No Content

  • Successfully modified the customer.

Failure Status codes

400 - Bad Request

  • Any query parameter is sent in the request.
  • Request body does not contain the required elements.
  • Unsupported element is present in the request body.
  • Any criteria for successful execution mentioned in the Request Body section is violated.

401 - Unauthorized

  • X-egain-session request header is missing.
  • Session is invalid or expired.

403 - Forbidden

  • The user does not have sufficient permissions. Refer Permissions section for details.

406 - Not Acceptable

  • Invalid 'Accept-Language' header value.

500 - Internal server error

Examples:

Example 1 - Edit customer attributes of a group customer
Example 2 - Edit existing contact person for the customer
Example 3 - Add new contact person for the customer
Example 4 - Add and edit contact points for the customer