Ir para o conteúdo principal
Adaptive Planning
importModeledSheet

importModeledSheet

Updated in API v40 (September 21, 2024)
Category
Metadata retrieval
Description
Imports the given modeled sheet.
Permissions Required To Invoke
MOD (create, edit, and delete sheets)
Parameters Required On Request
Credentials, and a specification of which sheet is being requested.

Request Format

<call method="importModeledSheet" callerName="a string that identifies your client application"> <credentials credentials login="sampleuser@company.com" password="my_pwd" /> <ConfigurableModel allow-actuals="false" allow-allocation="true" allow-edits-in-rollup-mode="false" breakback-pattern="0" code="Open Positions Clone" description="Open positions Clone to be filled" frozen-column-count="0" has-salary-detail="true" id="15" isglobal="1" prefix="OpeningsClone" revision="0" selected-plan-ids="1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18" state="A" strata-code="month"> <Columns> <AssignablePlan abbr="" code="Plan" id="0" is-splitable="false" name="Plan" read-only="false" show-total-at-bottom="false" tool-tip="" /> <Driver abbr="" code="PositionCode" decimal-precision="0" driver-type="0" id="22" is-split-key="false" is-splitable="false" name="Position Code" read-only="false" show-total-at-bottom="false" tool-tip="" /> <Dimension abbr="" code="Department" codeHasBeenUpdated="false" hasOverriddenTitle="false" id="6" is-splitable="true" isEditDimension="false" isHiddenOnSheet="false" isTextSelector="false" name="Department" read-only="false" show-total-at-bottom="false" tagType="0" tool-tip="" requiredColumn="true"> <DimensionValue abbr="" id="7" in-use="1" name="Engr" sort-order="0" /> <DimensionValue abbr="" id="40" in-use="0" name="QA" sort-order="1" /> <DimensionValue abbr="" id="8" in-use="0" name="PS" sort-order="3" /> <DimensionValue abbr="" id="41" in-use="0" name="Dev" sort-order="2" /> <DimensionValue abbr="" id="9" in-use="1" name="G & A" sort-order="4" /> <DimensionValue abbr="" id="10" in-use="1" name="Sales" sort-order="5" /> <LookupTables /> </Dimension> <Dimension abbr="" code="Title" codeHasBeenUpdated="false" hasOverriddenTitle="false" id="16" is-splitable="true" isEditDimension="false" isHiddenOnSheet="false" isTextSelector="false" name="Title" read-only="false" show-total-at-bottom="false" tagType="0" tool-tip="" requiredColumn="false"> <DimensionValue abbr="" id="64" in-use="1" name="Sales Rep" sort-order="8" /> <DimensionValue abbr="" id="65" in-use="0" name="Engr Mgr" sort-order="10" /> <DimensionValue abbr="" id="66" in-use="1" name="Sr Engr" sort-order="11" /> <DimensionValue abbr="" id="67" in-use="0" name="Engr" sort-order="12" /> <DimensionValue abbr="" id="68" in-use="0" name="GUI Engr" sort-order="13" /> <DimensionValue abbr="" id="47" in-use="0" name="CFO" sort-order="1" /> <DimensionValue abbr="" id="48" in-use="0" name="VP Mkt" sort-order="3" /> <DimensionValue abbr="" id="49" in-use="0" name="Doc Mgr" sort-order="5" /> <DimensionValue abbr="" id="18" in-use="0" name="CEO" sort-order="0" /> <DimensionValue abbr="" id="50" in-use="0" name="VP Sales" sort-order="7" /> <DimensionValue abbr="" id="51" in-use="0" name="VP Engr" sort-order="9" /> <DimensionValue abbr="" id="61" in-use="0" name="Controller" sort-order="2" /> <DimensionValue abbr="" id="62" in-use="1" name="Mkt Assoc" sort-order="4" /> <DimensionValue abbr="" id="63" in-use="0" name="Doc Writer" sort-order="6" /> <LookupTables /> </Dimension> <Dimension abbr="" code="Base Pay" codeHasBeenUpdated="false" hasOverriddenTitle="false" id="1" is-splitable="true" isEditDimension="false" isHiddenOnSheet="false" isTextSelector="false" name="Base Pay" read-only="false" show-total-at-bottom="false" tagType="0" tool-tip="" requiredColumn="false"> <DimensionValue abbr="" id="22" in-use="1" name="60-80K" sort-order="3" /> <DimensionValue abbr="" id="23" in-use="0" name="80-100K" sort-order="4" /> <DimensionValue abbr="" id="24" in-use="0" name="100-120K" sort-order="0" /> <DimensionValue abbr="" id="25" in-use="1" name="120-150K" sort-order="1" /> <DimensionValue abbr="" id="26" in-use="0" name="150-200K" sort-order="2" /> <DimensionValue abbr="" id="27" in-use="0" name=">200K" sort-order="5" /> <LookupTables /> </Dimension> <Dimension abbr="" code="Position Type" codeHasBeenUpdated="false" hasOverriddenTitle="false" id="10" is-splitable="true" isEditDimension="false" isHiddenOnSheet="false" isTextSelector="false" name="Position Type" read-only="false" show-total-at-bottom="false" tagType="0" tool-tip="" requiredColumn="false"> <DimensionValue abbr="" id="28" in-use="1" name="Full Time" sort-order="1" /> <DimensionValue abbr="" id="29" in-use="1" name="Part Time" sort-order="2" /> <DimensionValue abbr="" id="30" in-use="1" name="Contract" sort-order="0" /> <LookupTables /> </Dimension> <Dimension abbr="" code="Education" codeHasBeenUpdated="false" hasOverriddenTitle="false" id="7" is-splitable="true" isEditDimension="false" isHiddenOnSheet="false" isTextSelector="false" name="Education" read-only="false" show-total-at-bottom="false" tagType="0" tool-tip="" requiredColumn="false"> <DimensionValue abbr="" id="32" in-use="1" name="Masters" sort-order="1" /> <DimensionValue abbr="" id="33" in-use="0" name="Phd" sort-order="2" /> <DimensionValue abbr="" id="31" in-use="1" name="Graduate" sort-order="0" /> <LookupTables /> </Dimension> <Driver abbr="" code="Rate" decimal-precision="0" display-as="1" driver-type="1" id="23" is-split-key="false" is-splitable="false" name="Rate" read-only="false" show-total-at-bottom="false" tool-tip="" /> <Driver abbr="" code="YearsOfExperience" decimal-precision="0" display-as="1" driver-type="1" id="24" is-split-key="false" is-splitable="false" name="Years Of Experience" read-only="false" show-total-at-bottom="false" tool-tip="" /> <Driver abbr="" code="FillBy" decimal-precision="0" driver-type="2" id="25" is-split-key="false" is-splitable="false" name="Fill By" read-only="false" show-total-at-bottom="false" tool-tip="" /> </Columns> <CalculatedAccounts /> <Assumptions /> </ConfigurableModel> </call>
The call element contains a credentials element, as well a single ConfigureableModel element.
Editable Sheet Codes (Applicable on API v39+)
Request Format for API v39+ configurableModelElement requiring name and code attribute
<call method="importModeledSheet" callerName="a string that identifies your client application"> <credentials login="sampleuser@company.com" password="my_pwd" /> <ConfigurableModel allow-actuals="false" allow-allocation="true" allow-edits-in-rollup-mode="false" breakback-pattern="0" name="Open Positions Clone" description="Open positions Clone to be filled" frozen-column-count="0" has-salary-detail="true" id="15" isglobal="1" code="OpeningsClone" revision="0" selected-plan-ids="1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18" state="A" strata-code="month"> ...
Model Data Validation Rules (Applicable on API v39 and onwards)
We support the ability to import data validation rules using importModeledSheet request. See sample request below:
<call method="importModeledSheet" callerName="a string that identifies your client application"> <credentials login="sampleuser@company.com" password="my_pwd" /> <ConfigurableModel allow-actuals="false" allow-allocation="false" allow-edits-in-rollup-mode="false" breakback-pattern="7" code="SampleDef" description="TestDef Sheet" frozen-column-count="0" has-salary-detail="false" id="142" isglobal="0" name="SampleDef" recalculateOnDemand="false" revision="0" selected-plan-ids="1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24" state="A" strata-code="month" strata-id="1"> <Columns> <Driver abbr="" code="InitialBalance" data-privacy="0" decimal-precision="0" display-as="0" driver-type="3" formula="0" hiddenColumn="true" id="1163" is-split-key="false" is-splitable="false" name="Initial Balance" read-only="false" show-total-at-bottom="false" tool-tip="" /> <Dimension abbr="" code="CorporateDiscount" codeHasBeenUpdated="false" hasOverriddenTitle="false" hiddenColumn="true" id="25" is-splitable="false" isEditDimension="false" isHiddenOnSheet="false" isTextSelector="false" name="CorporateDiscount" read-only="true" show-total-at-bottom="false" tagType="2" tool-tip=""> <DimensionValue abbr="" id="215" in-use="0" name="Not Applicable" sort-order="0" /> <DimensionValue abbr="" id="216" in-use="0" name="TBD" sort-order="1" /> <DimensionValue abbr="" id="217" in-use="1" name="Available" sort-order="2" /> <DimensionValue abbr="" id="218" in-use="1" name="Not Available" sort-order="3" /> <LookupTables /> </Dimension> <AssignablePlan abbr="" code="Plan" id="0" is-splitable="false" name="Level" read-only="false" show-total-at-bottom="false" tool-tip="" /> </Columns> <CalculatedAccounts /> <Assumptions /> <DataValidationRules> <Rule actionType="C" expression="if (ROW.InitialBalance=10, 1, 0)" helpText="Test" id="268" name="TestInitialBalance" status="A" /> <Rule actionType="C" expression="if (ROW.CorporateDiscount="na" , 1, 0)" helpText="Test" id="137" name="TestLAttribRule" status="A" /> </DataValidationRules> </ConfigurableModel> </call>
credentials element
Tag Name
credentials
Description
All API calls must contain a single credentials element to identify the user invoking the API. The API call is then performed as this user (any audit trail or history of actions in the system will show that this user performed the action), and therefore the user must have the required permissions to perform the action in order for the API call to succeed.
Attributes of the Element
Attribute Name
Required?
Value
Example
login
Y
The login name of the user invoking the API method. This user must have the required permissions to invoke the method.
sampleuser@company.com
password
Y
The password of the user invoking the API method.
my_password
locale
N
Specify the locale to be used to interpret incoming numbers and dates, and to format outgoing numbers and dates (using the proper thousands separator, month names, and date formatting). The locale is also used to specify the language in which any system messages in the response should appear. If not specified, en_US (American English) is used.
fr_FR
instanceCode
N
If the user specified in the credentials has access to more than one instance of
Adaptive Planning
, this attribute can be used to specify that the user is intending to access an instance other than their default instance. If not specified, the user's default instance will be used. To determine the available instance codes, use the exportInstances API.
MYINSTANCE1
Contents of the Element
(none)
ConfigurableModel element
Tag Name
ConfigurableModel
Description
Represents a single modeled sheet uploaded.
Attributes of the Element
Attribute Name
Required?
Value
Example
code (API v38 and below)
name (API v39+)
Y
The name of the sheet. This can be used to identify sheets in other API calls, such as importModeledSheet. The sheet will be imported if a sheet of this name does not already exist in the instance.
Open Positions Clone
prefix (API v38 and below)
code (API v39+)
Y
The prefix of the sheet used to prefix the sheet's accounts. This must be unique.
The code of the sheet used to prefix the sheet's accounts. This must be unique
OpeningsClone
description
N
The description of the sheet, if any.
Clone of Open positions to be filled
Contents of the Element
See the Request XML above

Response Format

<response success="true"> <messages> <message type="INFO">Dimension Created: Base Pay New</message> <message type="INFO">Dimension Created: ABC</message> </messages> </response>
The response will have the success attribute set to true if the import is successful. In addition, optionally, one or more informational messages will indicate if any new dimensions have been created.
If the creation fails due to a system error, the response will be as follows:
<response success="false"> <messages> <message key="exception-caught">Caught Exception: Failed to create modeled sheet. </message> </messages> </response>
Response Format when creating Level Attribute
<?xml version="1.0" encoding="UTF-8"?> <response success="true"> <messages> <message type="INFO">Level attribute created: CorporateDiscount</message> <message type="INFO">The modeled sheet named SampleDef has been created.</message> </messages> </response>

Modeled Sheet Display Column Codes for API v40+

ImportModeledSheet
supports unique codes for display columns. If a modeled sheet has a display column, the
exportModeledSheet
api response will include a new property for
DisplayColumn
:
<DisplayColumn abbr="" account-code="PayRate" account-id="370" code="PayRateDisplay" hiddenColumn="true" id="7" is-splitable="false" months="6" name="Pay Rate Display Column" read-only="true" show-total-at-bottom="true" start-time-adjust="1" start-time-index="2" start-time-relative-to="C" strata-code="qtr" tool-tip="Display Column" />
Note the new property,
account-code
, which now points to the code for the associated account. Meanwhile the code property remains but can now be used to create an editable, unique identifier for the given column. However, to maintain backwards compatibility, the
account-code
property is optional. If the
account-code
is not included in the request, the unique code will be procedurally generated, and instead the code property will be used to link the display column to a given account.