Find Contact operation

The Find Contact operation retrieves the details of a contact.

The following table describes the elements of the <items> XML element and the adapter request. If not specified, the valid value for an element should be assumed to be a string.

Elements for the <items> XML element and adapter request for the Find Contact operation

Element

Definition

Required

<operation-name>

Specifies the name of the operation: retrieve-contact

Yes

<model>

Contains the other elements in the request

Yes

<keys>

Contains elements that uniquely identify a record

If you do not specify the child elements of the <keys> element, the application tries to find <contact-name> in the <instance> element.

You can specify the value for <contact-name> in the <keys> element, in the <instance> element, or in both elements.

Yes

<instance>

Specifies a unique record

The children of the <instance> element describe the fields of the record.

The only two higher-level elements are <keys> and <instance>. All other elements are child elements of the <instance> element.

Yes

<contact-name>

Specifies the contact name related to the contact

The <contact-name> element must be used as the key.

Valid value: Any string

No

<employee-i-d>

Specifies the employee ID of the contact

Valid value: Any string

No

<shift>

Specifies the business shift of the contact

Valid value: Any string

No

<department>

Specifies the department of the contact

Valid value: Any string, or an existing record from the application

No

<last-name>

Specifies the last name of the contact

Valid value: Any string

No

<first-name>

Specifies the first name of the contact

Valid value: Any string

No

<work-phone>

Specifies the work phone number of the contact

Valid value: Any string

No

<extension>

Specifies the extension number of the contact

Valid value: Any string

No

<location>

Specifies the location of the contact

Valid value: Any string

No

<floor>

Specifies the floor of the contact

Valid value: Any string

No

<email>

Specifies the email ID of the contact

Valid value: Any string

No

<home-phone>

Specifies the home phone number of the contact

Valid value: Any string

No

<primary-configuration-item>

Specifies the primary configuration item related to the contact

Valid value: Any string

No

<building>

Specifies the building related to the contact

Valid value: Any string

No

<mobile-phone>

Specifies the mobile phone number of the contact

Valid value: Any string

No

<company>

Specifies the name of the company of the contact

Valid value: Any string, or you can select any existing record

No

<manager>

Specifies the manager of the contact

Valid value: Any string

No

<contract-i-d>

Specifies the contract ID of the contact

Valid value: Any decimal value

No

<critical-user>

Specifies whether the contact is a critical user

Valid values: true, false

No

<requires-entitlement>

Specifies whether the contact requires an entitlement

Valid values: true, false

No

<full-name>

Specifies the full name of the contact

Valid value: Any string

No

The following figure displays the sample adapter request for the Find Contact operation.

Sample adapter request for the Find Contact operation


 <hp-service-manager-request>
    <entity>configurationitem</entity>
    <entity-type>contact</entity-type>
    <request>
      <operation-name>retrieve-contact</operation-name>
      <parameters>
        <retrieve-contact-request>
          <model>
            <keys>
              <contact-name>
                <value>MyContactName2</value>
                <type>String</type>
              </contact-name>
            </keys>
            <instance>
              <contact-name>
                <value>MyContactName2</value>
                <type>String</type>
              </contact-name>
              <employee-i-d>
                <value>employee i d</value>
                <type>String</type>
              </employee-i-d>
              <shift>
                <value>Shift</value>
                <type>String</type>
              </shift>
              <department>
                <value>department</value>
                <type>String</type>
              </department>
              <last-name>
                <value>last name</value>
                <type>String</type>
              </last-name>
              <first-name>
                <value>first name</value>
                <type>String</type>
              </first-name>
              <work-phone>
                <value>Work phone</value>
                <type>String</type>
              </work-phone>
              <extension>
                <value>Extension</value>
                <type>String</type>
              </extension>
              <location>
                <value>Location</value>
                <type>String</type>
              </location>
              <floor>
              <value>Floor</value>
                <type>String</type>
              </floor>
              <email>
                <value>Email</value>
                <type>String</type>
              </email>
              <home-phone>
                <value>Home phone</value>
                <type>String</type>
              </home-phone>
              <primary-configuration-item>
                <value>Primary Configuration Item</value>
                <type>String</type>
              </primary-configuration-item>
              <building>
                <value>Building</value>
                <type>String</type>
              </building>
              <mobile-phone>
                <value>Portable</value>
                <type>String</type>
              </mobile-phone>
              <company>
                <value>Company</value>
                <type>String</type>
              </company>
              <manager>
                <value>Manager</value>
                <type>String</type>
              </manager>
              <contract-i-d>
                <value>19</value>
                <type>Decimal</type>
              </contract-i-d>
              <critical-user>
                <value>true</value>
                <type>Boolean</type>
              </critical-user>
              <requires-entitlement>
                <value>true</value>
                <type>Boolean</type>
              </requires-entitlement>
              <full-name>
                <value>FullNamenew</value>
                <type>String</type>
              </full-name>
            </instance>
          </model>
        </retrieve-contact-request>
      </parameters>
    </request>
</hp-service-manager-request>


The following figure displays an adapter response for the Find Contact operation.

Sample adapter response for the Find Contact operation


<hp-service-manager-response>
  <metadata>
    <count>1</count>
  </metadata>
  <responses>
    <response>
      <metadata>
        <count>1</count>
      </metadata>
      <item>
        <metadata>
          <status>success</status>
        </metadata>
        <parameters>
          <model>
            <keys>
              <contact-name>
                <value>MyContactName2</value>
                <type>String</type>
              </contact-name>
            </keys>
            <instance>
              <contact-name>
                <value>MyContactName2</value>
                <type>String</type>
              </contact-name>
              <employee-i-d>
                <value>employee i d</value>
                <type>String</type>
              </employee-i-d>
              <shift>
                <value>Shift</value>
                <type>String</type>
              </shift>
              <department>
                <value>department</value>
                <type>String</type>
              </department>
              <last-name>
                <value>last name</value>
                <type>String</type>
              </last-name>
              <first-name>
                <value>first name</value>
                <type>String</type>
              </first-name>
              <work-phone>
                <value>Work phone</value>
                <type>String</type>
              </work-phone>
              <extension>
                <value>Extension</value>
                <type>String</type>
              </extension>
              <location>
                <value>Location</value>
                <type>String</type>
              </location>
              <floor>
                <value>Floor</value>
                <type>String</type>
              </floor>
              <email>
                <value>Email</value>
                <type>String</type>
              </email>
              <home-phone>
                <value>Home phone</value>
                <type>String</type>
              </home-phone>
              <primary-configuration-item>
                <value>Primary Configuration Item</value>
                <type>String</type>
              </primary-configuration-item>
              <building>
                <value>Building</value>
                <type>String</type>
              </building>
              <mobile-phone>
                <value>Portable</value>
                <type>String</type>
              </mobile-phone>
              <company>
                <value>Company</value>
                <type>String</type>
              </company>
              <manager>
                <value>Manager</value>
                <type>String</type>
              </manager>
              <contract-i-d>
                <value>19</value>
                <type>Decimal</type>
              </contract-i-d>
              <critical-user>
                <value>true</value>
                <type>Boolean</type>
              </critical-user>
              <requires-entitlement>
                <value>true</value>
                <type>Boolean</type>
              </requires-entitlement>
              <full-name>
                <value>FullNamenew</value>
                <type>String</type>
              </full-name>
              <uniquequery>contact.name="MyContactName2"</uniquequery>
              <recordid>MyContactName2</recordid>
            </instance>
          </model>
          <status>SUCCESS</status>
          <message>Success</message>
          <schema-revision-date>2005.03.15 00:00:00</schema-revision-date>
          <schema-revision-level>0</schema-revision-level>
          <return-code>0</return-code>
        </parameters>
      </item>
    </response>
  </responses>
</hp-service-manager-response>
Was this page helpful? Yes No Submitting... Thank you

Comments