Delete Vendor operation

The Delete Vendor operation deletes the details of a vendor.

Delete wrappers can delete only a single record. If information provided in the request refers to zero or more than one record, then no record is deleted. The entry to be deleted is first located by executing a logical AND operation using the elements provided in request. The located entry is then deleted.

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 Delete Vendor operation

Element

Definition

Required

<operation-name>

Specifies the name of the operation: delete-vendor

Yes

<model>

Contains the other elements in the request

Yes

<keys>

Contains elements that uniquely identify a record

The combination of the <vendor-name> and <location> elements must be used as the key.

If you do not specify the combination of the <vendor-name> and <location> elements in the <keys> element, the application tries to find the combination in the <instance> element.

You can specify the values for the combination in the <keys> element, or 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

<vendor-name>

Specifies the vendor name.

Valid value: Any string

Yes

<location>

Specifies the location information for the vendor

Valid value: Any string

No

<address>

Specifies the address of the vendor; is an array-type element

No

<city>

Specifies the city where the vendor is located

Valid value: Any string

No

<zip-code>

Specifies the zip code of the place where the vendor is located

Valid value: Any string

No

<sales-rep>

Specifies details about the sales representative

Valid value: Any string

No

<sales-manager>

Specifies the name of the sales manager

Valid value: Any string

No

<sales-manager-phone>

Specifies the phone number of the sales manager

Valid value: Any string

No

<service-contact>

Specifies the details of the service contact for the vendor

Valid value: Any string

No

<service-phone>

Specifies the service phone number of the vendor

Valid value: Any string

No

<after-hours-phone>

Specifies the phone number of the vendor to contact after working hours

Valid value: Any string

No

<open-time>

Specifies the opening time for the service

Valid value: Any input in the HH:MM:SS format

No

<close-time>

Specifies the date and time of closing the vendor details

Valid value: Date and time in the YYYY.MM.DD HH:MM:SS format

No

<sale-rep-phone>

Specifies the phone number of the sales representative

Valid value: Any string

No

<country>

Specifies the country in which the vendor is located

Valid value: Any string

No

<email>

Specifies the email ID of the vendor

Valid value: Any string

No

<vendor-i-d>

Specifies the identification number of the vendor

Valid value: Any string

No

<contact-number>

Specifies the contact number of the vendor

Valid value: Any string

No

<contract-person>

Specifies the name of the contract person

Valid value: Any string

No

<contact phone>

Specifies the phone number of the contract person

Valid value: Any string

No

<order-person>

Specifies the name of the person associated with the order

Valid value: Any string

No

<order-phone>

Specifies the phone number of the person associated with the order

Valid value: Any string

No

<is-vendor>

Specifies whether the record is for a vendor

Valid values: true, false

No

<is-manufacturer>

Specifies whether the record is for a manufacturer

Valid values: true, false

No

<u-r-l>

Specifies the URL associated with the record

Valid value: Any string

No

The following figure displays the sample adapter request for the Delete Vendor operation.

Sample adapter request for the Delete Vendor operation


 <hp-service-manager-request>
    <entity>configurationitem</entity>
    <entity-type>vendor</entity-type>
    <request>
      <operation-name>delete-vendor</operation-name>
      <parameters>
        <delete-vendor-request>
          <model>
            <keys>
              <vendor-name>
                <value>MyVendorName10</value>
                <type>String</type>
              </vendor-name>
              <location>
                <value>location10</value>
                <type>String</type>
              </location>
            </keys>
            <instance>
              <vendor-name>
                <value>MyVendorName10</value>
                <type>String</type>
              </vendor-name>
              <location>
                <value>location10</value>
                <type>String</type>
              </location>
              <address>
                <type>Array</type>
                <address>
                  <element>
                    <value>Address</value>
                    <type>String</type>
                  </element>
                </address>
              </address>
              <city>
                <value>Noida-updated</value>
                <type>String</type>
              </city>
              <zip-code>
                <value>111111</value>
                <type>String</type>
              </zip-code>
              <sales-rep>
                <value>Sales Rep</value>
                <type>String</type>
              </sales-rep>
              <sales-manager>
                <value>Sales Manager</value>
                <type>String</type>
              </sales-manager>
              <sales-manager-phone>
                <value>Phone</value>
                <type>String</type>
              </sales-manager-phone>
              <service-contact>
                <value>Technician</value>
                <type>String</type>
              </service-contact>
              <service-phone>
                <value>Phone</value>
                <type>String</type>
              </service-phone>
              <after-hours-phone>
                <value>Phone</value>
                <type>String</type>
              </after-hours-phone>
              <open-time>
                <value>08:00:00</value>
                <type>Time</type>
              </open-time>
              <close-time>
                <value>09:00:00</value>
                <type>Time</type>
              </close-time>
              <sales-rep-phone>
                <value>Phone</value>
                <type>String</type>
              </sales-rep-phone>
              <country>
                <value>Country</value>
                <type>String</type>
              </country>
              <email>
                <value>Email</value>
                <type>String</type>
              </email>
              <vendor-i-d>
                <value>ID</value>
                <type>String</type>
              </vendor-i-d>
              <contract-number>
                <value>Contact No</value>
                <type>String</type>
              </contract-number>
              <contract-phone>
                <value>Phone</value>
                <type>String</type>
              </contract-phone>
              <order-person>
                <value>Order Contact</value>
                <type>String</type>
              </order-person>
              <order-phone>
                <value>Phone</value>
                <type>String</type>
              </order-phone>
              <contract-person>
                <value>Contact Person</value>
                <type>String</type>
              </contract-person>
              <URL>
                <value>URL</value>
                <type>String</type>
              </URL>
              <is-vendor>
                <value>true</value>
                <type>Boolean</type>
              </is-vendor>
              <is-manufacturer>
                <value>false</value>
                <type>Boolean</type>
              </is-manufacturer>
              <u-r-l>
                <value>u r l</value>
                <type>String</type>
              </u-r-l>
            </instance>
          </model>
        </delete-vendor-request>
      </parameters>
    </request>
  </hp-service-manager-request>


The following figure displays an adapter response for the Delete Vendor operation.

Sample adapter response for the Delete Vendor 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>
              <vendor-name>
                <value>MyVendorName10</value>
                <type>String</type>
              </vendor-name>
              <location>
                <value>location10</value>
                <type>String</type>
              </location>
            </keys>
            <instance>
              <vendor-name>
                <value>MyVendorName10</value>
                <type>String</type>
              </vendor-name>
              <location>
                <value>location10</value>
                <type>String</type>
              </location>
              <address>
                <type>Array</type>
                <address>
                  <element>
                    <value>Address</value>
                    <type>String</type>
                  </element>
                </address>
              </address>
              <city>
                <value>Noida-updated</value>
                <type>String</type>
              </city>
              <zip-code>
                <value>111111</value>
                <type>String</type>
              </zip-code>
              <sales-rep>
                <value>Sales Rep</value>
                <type>String</type>
              </sales-rep>
              <sales-manager>
                <value>Sales Manager</value>
                <type>String</type>
              </sales-manager>
              <sales-manager-phone>
                <value>Phone</value>
                <type>String</type>
              </sales-manager-phone>
              <service-contact>
                <value>Technician</value>
                <type>String</type>
              </service-contact>
              <service-phone>
                <value>Phone</value>
                <type>String</type>
              </service-phone>
              <after-hours-phone>
                <value>Phone</value>
                <type>String</type>
              </after-hours-phone>
              <open-time>
                <value>08:00:00.000Z</value>
                <type>Time</type>
              </open-time>
              <close-time>
                <value>09:00:00.000Z</value>
                <type>Time</type>
              </close-time>
              <sales-rep-phone>
                <value>Phone</value>
                <type>String</type>
              </sales-rep-phone>
              <country>
                <value>Country</value>
                <type>String</type>
              </country>
              <email>
                <value>Email</value>
                <type>String</type>
              </email>
              <vendor-i-d>
                <value>ID</value>
                <type>String</type>
              </vendor-i-d>
              <contract-number>
                <value>Contact No</value>
                <type>String</type>
              </contract-number>
              <contract-phone>
                <value>Phone</value>
                <type>String</type>
              </contract-phone>
              <order-person>
                <value>Order Contact</value>
                <type>String</type>
              </order-person>
              <order-phone>
                <value>Phone</value>
                <type>String</type>
              </order-phone>
              <contract-person>
                <value>Contact Person</value>
                <type>String</type>
              </contract-person>
              <URL>
                <value>u r l</value>
                <type>String</type>
              </URL>
              <is-vendor>
                <value>true</value>
                <type>Boolean</type>
              </is-vendor>
              <is-manufacturer>
                <value>false</value>
                <type>Boolean</type>
              </is-manufacturer>
              <uniquequery>vendor="MyVendorName10" and location="location10"</uniquequery>
              <recordid>MyVendorName10 - location10</recordid>
              <u-r-l>
                <value>u r l</value>
                <type>String</type>
              </u-r-l>
            </instance>
          </model>
          <messages>
            <element>
              <value>Vendor record deleted.</value>
            </element>
          </messages>
          <status>SUCCESS</status>
          <message>Success</message>
          <schema-revision-date>2010.01.20 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