Custom Table Administration - Output Parameters – CPQ Online Help

Custom Table Administration - Output Parameters

TagData TypeDescriptionRequiredComments
ResultXMLThis function will generate XML document as result of the performed actionsYesResult is always generated

XML definition

Element NameData TypeDescriptionRequiredComments
Result Y
StatusString(10)OK if passed values are verified and successfully passed requested action, otherwise NOKY
MessageString (500)Message generated by CPQY
Root NFor search, if any row matches provided conditions, it will contain XML for result
Error NIf any error occurs this node will contain info about it.
ErrorCodeString(50)Error codeY
DescriptionString(500)Error description messageY

Result XML Examples

Result XML for CREATETABLE action


Use case - Custom table successfully created.

<?xml version="1.0" encoding="utf-8"?>
<Result>
  <Status>OK</Status>
  <Message>Table Created</Message>
</Result>


Use case - Custom table creation failed. The reason of failure is that column names contain blank spaces.

<?xml version="1.0" encoding="utf-8"?>
<Result>
  <Status>NOK</Status>
  <Message>Creation failed</Message>
      <Error>
            <ErrorCode>xxxxxxx</ErrorCode>
            <Description> Column names containing blank spaces </Description>
    </Error>
<Error>


Result XML for EXPORTROWS action


Successful rows export based on the search criteria

<?xml version="1.0" encoding="utf-8"?>
<Result>
  <Status>OK</Status>
  <Message>Search succeded</Message>
  <Root>
    <Columns>
      <Column>CpqTableEntryId</Column>
      <Column>AccountId</Column>
      <Column>FirstName</Column>
      <Column>SecondName</Column>
    </Columns>
    <Rows>
      <Row>
        <Value>23</Value>
        <Value>23</Value>
        <Value >Jack</Value>
        <Value >Longly</Value>
      </Row>
      <Row>
        <Value>27</Value>
        <Value>25</Value>
        <Value >Denis</Value>
        <Value >Longly</Value>
      </Row>
       <Row>
        <Value>55</Value>
        <Value>33</Value>
        <Value >Rod</Value>
        <Value >Dard</Value>
      </Row>
    </Rows>
  </Root>
</Result>


Result XML for UPSERTROWS action


Use case - Rows get updated / inserted during UPSERTROWS action

<Result xmlns="http://webcominc.com/">
  <Status>OK</Status>
  <Message>action 'UPSERTROWS' for CustomUsers succeeded</Message>
  <Root>
    <Columns>
      <Column key="1">Username</Column>
      <Column>Name</Column>
      <Column>Email</Column>
    </Columns>
    <Rows>
      <Row>
        <Value>jsummers</Value>
        <Value>John Summers</Value>
        <Value>jsummers@something.com</Value>
        <Result>
          <Status>OK</Status>
          <Message>Table entries have been successfully updated</Message>
          <ActionTaken>Updated</ActionTaken>
        </Result>
      </Row>
      <Row>
        <Value>jlongly</Value>
        <Value>Jack Longly</Value>
        <Value>jlongly@something.com</Value>
        <Result>
          <Status>OK</Status>
          <Message>Table entries have been successfully inserted</Message>
          <ActionTaken>Inserted</ActionTaken>
          <CpqTableEntryId>5</CpqTableEntryId>
        </Result>
      </Row>
    </Rows>
  </Root>
</Result>


Use case - One row get updated while another causes an error

<Result xmlns="http://webcominc.com/">
<Status>NOK</Status>
  <Message>Row action(s) failed for action 'UPSERTROWS' performed on table CustomUsers   </Message>
  <Root>
    <Columns>
      <Column key="1">Username</Column>
      <Column>Name</Column>
      <Column>Email</Column>
    </Columns>
    <Rows>
      <Row>
        <Value>jsummers</Value>
        <Value>John Summers</Value>
        <Value>jsummers@something.com</Value>
        <Result>
          <Status>OK</Status>
          <Message>Table entries have been successfully updated</Message>
          <ActionTaken>Updated</ActionTaken>
        </Result>
      </Row>
      <Row>
        <Value>jlongly</Value>
        <Value>Jack Longly</Value>
        <Value>jlongly@something.com</Value> 
        <Value>Test data</Value> 
        <Result>
          <Status>NOK</Status>
          <Message>Row action failed</Message>
          <Error>
            <ErrorCode>105013</ErrorCode>
            <Description>Number of values doesn't match the number of columns provided</Description>
          </Error>
        </Result>
      </Row>
    </Rows>
  </Root>
</Result>

Result XML for DELETEROWS action


Use case - Rows get deleted while some rows cause an error

In this example, username ’jsummers’ exists in the database while username ’mbill’ does not. The first row will be deleted while the error message will be displayed for the second one as shown in next figure.

<Result xmlns="http://webcominc.com/">
  <Status>NOK</Status>
  <Message>Row action(s) failed for action 'DELETEROWS' performed on table 'CustomUsers'</Message>
  <Root>
    <Columns>
      <Column>Username</Column>
    </Columns>
    <Rows>
<Row>
        <Value>jsummers</Value>
        <Result>
          <Status>OK</Status>
          <Message> Table entries have been successfully deleted </Message>
          <ActionTaken>Deleted</ActionTaken>
        </Result>
      </Row>
      <Row>
        <Value>mbill</Value>
        <Result>
          <Status>NOK</Status>
          <Message>Row action failed</Message>
          <Error>
            <ErrorCode>105016</ErrorCode>
            <Description>No entries found for provided search criteria</Description>
          </Error>
        </Result>
      </Row>
    </Rows>
  </Root>
</Result>

Result XML for UPDATEROWS action


Use case - Rows get updated while some errors cause an error

<Result xmlns="http://webcominc.com/">
<Status>NOK</Status>
  <Message>Row action(s) failed for action 'UPDATEROWS' performed on table CustomUsers   </Message>
  <Root>
    <Columns>
      <Column key="1">Username</Column>
      <Column>Name</Column>
      <Column>Email</Column>
    </Columns>
    <Rows>
      <Row>
        <Value>jsummers</Value>
        <Value>John Summers</Value>
        <Value>jsummers@something.com</Value>
        <Result>
          <Status>OK</Status>
          <Message>Table entries have been successfully updated</Message>
          <ActionTaken>Updated</ActionTaken>
        </Result>
      </Row>
      <Row>
      <Value>mbill</Value>
      <Value>Michael Bill</Value>
      <Value>mbill@something.com</Value> 
        <Result>
          <Status>NOK</Status>
          <Message>Action update row failed</Message>
          <Error>
            <ErrorCode>105016</ErrorCode>
            <Description>Entry is missing for provided columns</Description>
          </Error>
        </Result>
      </Row>
    </Rows>
  </Root>
</Result>

Result XML for INSERTROWS action


Rows successfully inserted.

<Result xmlns="http://webcominc.com/">
  <Status>OK</Status>
  <Message>action 'INSERTROWS' for CustomUsers succeeded</Message>
  <Root>
    <Columns>
      <Column key="1">Username</Column>
      <Column>Name</Column>
      <Column>Email</Column>
    </Columns>
    <Rows>
      <Row>
        <Value>jsummers</Value>
        <Value>John Summers</Value>
        <Value>jsummers@something.com</Value>
        <Result>
          <Status>OK</Status>
          <Message>Table entries have been successfully inserted</Message>
          <ActionTaken>Inserted</ActionTaken>
          <CpqTableEntryId>4</CpqTableEntryId>
        </Result>
      </Row>
      <Row>
        <Value>jlongly</Value>
        <Value>Jack Longly</Value>
        <Value>jlongly@something.com</Value>
        <Result>
          <Status>OK</Status>
          <Message>Table entries have been successfully inserted</Message>
          <ActionTaken>Inserted</ActionTaken>
          <CpqTableEntryId>5</CpqTableEntryId>
        </Result>
      </Row>
    </Rows>
  </Root>
</Result>
You are here: CallidusCloud CPQ Online HelpCallidusCloud CPQ APICustom Table Administration Web MethodCustom Table Administration - Output Parameters