CCMP는 rest api 와 SOAP 모두 사용하여 개발을 할 수 있으며

SOAP를 이용할 경우 더욱 많은 기능을 구현할 수 있다고 한다

 

 

1. TEAM 조회 
 url : /resourcemanagement/rest/resources/agent-teams/9

1. TEAM member 조회 URL 
 url : /resourcemanagement/rest/resources/agent-agent-team-members/25
 25 - select * from Portal.dbo.TB_DIM_AGENT_AGENT_TEAM_MEMBER 테이블 - MEMBER_URN 컬럼 참조 
 
 2. TEAM 에 상담원 등록 
  url : /resourcemanagement/rest/resources/agent-agent-team-members
  방식 : POST 
  Json Request : 

{
    "Resources": [
        {
            "Type": "Agent Agent Team Member",
            "Status": "R",
            "Changestamp": 0,
	    "RefURL": "",
            "Fields": [
                {
                    "Name": "ParentId",   -- Team ID
                    "Value": "9"
                },
                {
                    "Name": "ChildId",    -- 상담원 ID
                    "Value": "65"
                },
                {
                    "Name": "Supervisor",
                    "Value": "false"
                },
                {
                    "Name": "PrimarySupervisor",
                    "Value": "false"
                },
                {
                    "Name": "PhysicalMember",
                    "Value": "true"
                }
            ]
        }
    ]
}



3. TEAM 상담원 삭제 
 url : /resourcemanagement/rest/resources/agent-agent-team-members/33
 방식 : DELETE 
 파람 : 33 - select * from Portal.dbo.TB_DIM_AGENT_AGENT_TEAM_MEMBER 테이블에서 MEMEBER_URN 컬럼의 Key 값을 삭제 
 
 
 4. 상담원 GET 
 URL : /resourcemanagement/rest/resources/agents/37
 Method : GET
 결과 : 

<Resources xmlns="http://www.exony.com/schemas/2009/10/resourcemanagement" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
   <RestResource>
      <Identity>37</Identity>
      <Type>Agent</Type>
      <EffectiveFrom>2000-01-01T00:00:00.000Z</EffectiveFrom>
      <EffectiveTo>2079-06-06T00:00:00.000Z</EffectiveTo>
      <Status>R</Status>
      <Changestamp>0</Changestamp>
      <Fields>
         <NameValuePair>
            <Name>DepartmentBizUrn</Name>
            <Value>-1</Value>
            <StorageType>Standard</StorageType>
         </NameValuePair>
         <NameValuePair>
            <Name>ParentAgentDesktopDisplayName</Name>
            <Value>KE</Value>
            <StorageType>Standard</StorageType>
         </NameValuePair>
         <NameValuePair>
            <Name>ParentDepartmentDisplayName</Name>
            <Value/>
            <StorageType>Standard</StorageType>
         </NameValuePair>
         <NameValuePair>
            <Name>ParentPeripheralDisplayName</Name>
            <Value>CCM01</Value>
            <StorageType>Standard</StorageType>
         </NameValuePair>
         <NameValuePair>
            <Name>ParentPersonDisplayName</Name>
            <Value>XXXXX</Value>
            <StorageType>Standard</StorageType>
         </NameValuePair>
         <NameValuePair>
            <Name>ParentPersonFirstName</Name>
            <Value>A</Value>
            <StorageType>Standard</StorageType>
         </NameValuePair>
         <NameValuePair>
            <Name>ParentPersonLastName</Name>
            <Value>XXXX</Value>
            <StorageType>Standard</StorageType>
         </NameValuePair>
         <NameValuePair>
            <Name>ParentPersonLoginName</Name>
            <Value>1004</Value>
            <StorageType>Standard</StorageType>
         </NameValuePair>
         <NameValuePair>
            <Name>ParentPersonLoginEnabled</Name>
            <Value>True</Value>
            <StorageType>Standard</StorageType>
         </NameValuePair>
         <NameValuePair>
            <Name>HierarchyParentUrn</Name>
            <Value>-1</Value>
            <StorageType>Standard</StorageType>
         </NameValuePair>
         <NameValuePair>
            <Name>ItemBusinessUrn</Name>
            <Value>37</Value>
            <StorageType>Standard</StorageType>
         </NameValuePair>
         <NameValuePair>
            <Name>OwnerId</Name>
            <Value>348bd122-104d-4959-a78c-731c8f8e47ec</Value>
            <StorageType>Standard</StorageType>
         </NameValuePair>
         <NameValuePair>
            <Name>ParentOwnerName</Name>
            <Value>XXXX</Value>
            <StorageType>Standard</StorageType>
         </NameValuePair>
         <NameValuePair>
            <Name>SubTypeId</Name>
            <Value>00000000-0000-0000-0000-000000000010</Value>
            <StorageType>Standard</StorageType>
         </NameValuePair>
         <NameValuePair>
            <Name>TenantBizUrn</Name>
            <Value>-1</Value>
            <StorageType>Standard</StorageType>
         </NameValuePair>
         <NameValuePair>
            <Name>TimeZoneUrn</Name>
            <Value>2</Value>
            <StorageType>Standard</StorageType>
         </NameValuePair>
         <NameValuePair>
            <Name>FolderId</Name>
            <Value>348bd122-104d-4959-a78c-731c8f8e47ec</Value>
            <StorageType>Standard</StorageType>
         </NameValuePair>
         <NameValuePair>
            <Name>ParentFolderPath</Name>
            <Value>/XXXX</Value>
            <StorageType>Standard</StorageType>
         </NameValuePair>
         <NameValuePair>
            <Name>DisplayName</Name>
            <Value>1004</Value>
            <StorageType>Standard</StorageType>
         </NameValuePair>
         <NameValuePair>
            <Name>Name</Name>
            <Value>1004</Value>
            <StorageType>Standard</StorageType>
         </NameValuePair>
         <NameValuePair>
            <Name>InternalName</Name>
            <Value>1004</Value>
            <StorageType>Standard</StorageType>
         </NameValuePair>
         <NameValuePair>
            <Name>Description</Name>
            <Value>XXXXXX</Value>
            <StorageType>Standard</StorageType>
         </NameValuePair>
         <NameValuePair>
            <Name>CreatedById</Name>
            <Value>00000003-0000-0000-0000-000000000006</Value>
            <StorageType>Standard</StorageType>
         </NameValuePair>
         <NameValuePair>
            <Name>ParentCreatedByLoginName</Name>
            <Value/>
            <StorageType>Standard</StorageType>
         </NameValuePair>
         <NameValuePair>
            <Name>ModifiedById</Name>
            <Value>00000003-0000-0000-0000-000000000006</Value>
            <StorageType>Standard</StorageType>
         </NameValuePair>
         <NameValuePair>
            <Name>CreationDate</Name>
            <Value>2019-05-31T08:28:43.973Z</Value>
            <StorageType>Standard</StorageType>
         </NameValuePair>
         <NameValuePair>
            <Name>ModifiedDate</Name>
            <Value>2019-05-31T08:28:43.973Z</Value>
            <StorageType>Standard</StorageType>
         </NameValuePair>
         <NameValuePair>
            <Name>Deleted</Name>
            <Value>false</Value>
            <StorageType>Standard</StorageType>
         </NameValuePair>
         <NameValuePair>
            <Name>Enabled</Name>
            <Value>true</Value>
            <StorageType>Standard</StorageType>
         </NameValuePair>
         <NameValuePair>
            <Name>Hidden</Name>
            <Value>false</Value>
            <StorageType>Standard</StorageType>
         </NameValuePair>
         <NameValuePair>
            <Name>Latest</Name>
            <Value>true</Value>
            <StorageType>Standard</StorageType>
         </NameValuePair>
         <NameValuePair>
            <Name>System</Name>
            <Value>false</Value>
            <StorageType>Standard</StorageType>
         </NameValuePair>
         <NameValuePair>
            <Name>PeripheralUrn</Name>
            <Value>1</Value>
            <StorageType>Standard</StorageType>
         </NameValuePair>
         <NameValuePair>
            <Name>AgentDesktopUrn</Name>
            <Value>21</Value>
            <StorageType>Standard</StorageType>
         </NameValuePair>
         <NameValuePair>
            <Name>PersonUrn</Name>
            <Value>2841</Value>
            <StorageType>Standard</StorageType>
         </NameValuePair>
         <NameValuePair>
            <Name>PeripheralNumber</Name>
            <Value>1004</Value>
            <StorageType>Standard</StorageType>
         </NameValuePair>
         <NameValuePair>
            <Name>PeripheralName</Name>
            <Value>1004</Value>
            <StorageType>Standard</StorageType>
         </NameValuePair>
         <NameValuePair>
            <Name>Supervisor</Name>
            <Value>false</Value>
            <StorageType>Standard</StorageType>
         </NameValuePair>
         <NameValuePair>
            <Name>AgentStateTrace</Name>
            <Value>false</Value>
            <StorageType>Standard</StorageType>
         </NameValuePair>
         <NameValuePair>
            <Name>DomainName</Name>
            <Value/>
            <StorageType>Standard</StorageType>
         </NameValuePair>
         <NameValuePair>
            <Name>DomainLoginName</Name>
            <Value/>
            <StorageType>Standard</StorageType>
         </NameValuePair>
         <NameValuePair>
            <Name>DomainUserName</Name>
            <Value/>
            <StorageType>Standard</StorageType>
         </NameValuePair>
         <NameValuePair>
            <Name>DomainUserGuid</Name>
            <Value/>
            <StorageType>Standard</StorageType>
         </NameValuePair>
         <NameValuePair>
            <Name>UserDeletable</Name>
            <Value>true</Value>
            <StorageType>Standard</StorageType>
         </NameValuePair>
         <NameValuePair>
            <Name>UserGroupId</Name>
            <Value i:nil="true"/>
            <StorageType>Standard</StorageType>
         </NameValuePair>
         <NameValuePair>
            <Name>PkeyChangestamp</Name>
            <Value>0</Value>
            <StorageType>Standard</StorageType>
         </NameValuePair>
         <NameValuePair>
            <Name>ClusterResourceType</Name>
            <Value>CRT_CISCO_CICM</Value>
            <StorageType>Standard</StorageType>
         </NameValuePair>
         <NameValuePair>
            <Name>Pkey1</Name>
            <Value>5165</Value>
            <StorageType>Standard</StorageType>
         </NameValuePair>
         <NameValuePair>
            <Name>Pkey2</Name>
            <Value i:nil="true"/>
            <StorageType>Standard</StorageType>
         </NameValuePair>
         <NameValuePair>
            <Name>MappedClusterResources</Name>
            <Value>XXXXXXX-1a74-43fc-bf49-8b67d9cbe721</Value>
            <StorageType>Standard</StorageType>
         </NameValuePair>
         <NameValuePair>
            <Name>MappedClusterResourceDetails</Name>
            <Value>XXXXXXX-1a74-43fc-bf49-8b67d9cbe721|ucdev|CRT_CISCO_CICM|188.1</Value>
            <StorageType>Standard</StorageType>
         </NameValuePair>
      </Fields>
      <EquipmentMapping/>
      <RefURL>https://XXX.XXX.XXX.XXX:8085/resourcemanagement/rest/resources/agents/37</RefURL>
   </RestResource>
</Resources>


-------------------------

5. 상담원 Update 
  URL : /resourcemanagement/rest/resources/agents/37
  Method : PUT
  Request : 

{
    "Resources": [
        {
            "Identity" : "37",
			"Type": "Person",
            "Status": "R",
            "Changestamp": 0,
	    "RefURL": "",
            "Fields": [
                {
                    "Name": "Description",   
                    "Value": "XXXXXX"
                }
            ]
        }
    ]
}

** Update의 경우 Chagestamp 값은 반드시 넣어야 한다 

[Changestamp]

1. 최초 변경사항이 없을 경우 : 0 

2. 변경이 될경우 Request에서 0 값을 넣음 (숫자 형태로 넣어야 함)

3. CCMP가 변경이 이루어지면 DB에 Changestamp 값을 1로 설정 

4. 다음에 동일한 상담원을 변경할 경우 Changestamp 값을 1로 설정 

5. CCMP가 변경이 이루어질때마다 자신이 Changestamp를 +1 시킴 

 

{"Resources":
	[
		{
			"RefURL":"https://XXX.XXX.XXX.XXX:8085/resourcemanagement/rest/resources/persons/45117"
			,"Status":"S"
			,"Type":"Person"
			,"Fields":
				[
					{"Value":"32f17327-bcde-4534-af00-2a5ed260794a","Name":"FolderId"}
					,{"Value":"","Name":"Name"}
					,{"Value":"","Name":"InternalName"}
					,{"Value":"XXXXXX","Name":"Description"}
					,{"Value":"A","Name":"FirstName"}
					,{"Value":"테스트","Name":"LastName"}
					,{"Value":"XXXXX","Name":"LoginName"}
				]
			,"Changestamp":0
			,"Identity":"45117"}
	]
}

Response : 

 [{
   "Identity": "37",
   "Type": "Person",
   "Name": "",
   "Status": "S",
   "Errors": [],
   "RefURL": "https://XXX.XXX.XXX.XXX:8085/resourcemanagement/rest/resources/persons/37"
}]
 

'Cisco > ICM' 카테고리의 다른 글

[CCMP] rest api를 이용한 상담원 설정 환경  (1) 2019.06.14
[CCMP] 계정 Lock 또는 비밀번호 변경 사항  (0) 2019.06.14
[EV] Logger Event ID 7399 Error  (4) 2019.04.28
CallType ICM DB Code  (2) 2019.04.05
Call Disposition ICM DB Code  (1) 2019.04.05
[라이센스] IPCE-NPSENT-EC  (0) 2019.03.14
  1. Favicon of https://iamnot1ant.tistory.com BlogIcon 베짱이 2019.06.24 01:12 신고

    xml 데이터를 활용하는 거 같.....

    어렵네요. ㅋㅋ