Saltar al contenido principal
Adaptive Planning
importDimensionMapping

importDimensionMapping

Supported in API v19 +
Category
Metadata submission
Description
The importDimensionMapping API can be used to import derived dimension values.
Permissions Required To Invoke
Parameters Required On Request
Credentials
The importDimensionMapping API can be used to import the mapping conditions that determine the mapping dimension values to automatically populate on modeled sheet rows. It can be used to create, update, and delete mapping conditions. Derived dimension values on modeled sheet rows don't support virtual versions.

Request Format

<?xml version='1.0' encoding='UTF-8'?> <call method="importDimensionMapping" callerName="a string that identifies your client application"> <credentials login="sampleuser@company.com" password="my_password"/> <version name="Budget 2017" id="7"/> <dimensions> <dimension id="345" name="Area"> <mappingCriteria> <mappingCriterion id="121"> <mapTo dimensionValueId="877" dimensionValue="East"/> <dimension name="Level" valueId="1" value="HQ"/> <dimension name="State" valueId="15" value="MA"/> </mappingCriterion> <mappingCriterion id="122"> <mapTo dimensionValueId="876" dimensionValue="West"/> <dimension name="Level" valueId="1" value="HQ"/> <dimension name="State" id="5"> <dimensionValue id="900" code="CA"/> <dimensionValue id="901" code="CO"/> </dimension> </mappingCriterion> </mappingCriteria> </dimension> </dimensions> </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, time period 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 method.
MYINSTANCE1
Contents of the Element
(none)
version Element
Tag Name
version
Description
Specifies the version for which to import mappings.
Attributes of the Element
Attribute Name
Required?
Value
Example
Name
Required when id is not specified.
The name of the version.
Budget 2017
id
Required when name is not specified.
The version id
7
Contents of the Element
Contains one or more level elements.
dimensions Element
Tag Name
dimensions
Description
Container for a list of <dimension> elements.
Attributes of the Element
Attribute Name
Required?
Value
Example
(none)
Contents of the Element
dimension elements
dimension Element
Tag Name
dimension
Description
Describes a dimension for which we want to import mappings.
Attributes of the Element
Attribute Name
Required?
Value
Example
name
Required when id is not specified.
The name of the dimension to import mappings
Area
id
Required when name is not specified.
The id of the dimension to import mappings.
15
Contents of the Element
A mappingCriteria element.
mappingCriteria Element
Tag Name
mappingCriteria
Description
Description
Container for a list of <mappingCriterion> elements
Attributes of the Element
Attribute Name
Required?
Value
Example
id
N
If a id is provided, an existing mapping criterion with this id will be updated. If no id is provided, a new mapping criterion is added to the dimension.
12
Contents of the Element
mappingCriterion elements for each dimension value for the derived dimension.
mappingCriterion Element
Tag Name
mappingCriterion
Description
Description
Describes the individual dimensions and dimension values that govern if a dimension value is being mapped to. Must be followed by a group of
mapTo
,
dimension
and
dimensionValue
tags.
Attributes of the Element
Attribute Name
Required?
Value
Example
id
N
If a id is provided, an existing mapping criterion with this id will be updated. If no id is provided, a new mapping criterion is added to the dimension.
12
delete
N
Enter "yes" to delete all mapping conditions in the mappingCriterion. An empty value or any value other than "yes" is ignored and mapping conditions are not deleted.
yes
Contents of the Element
Contains one mapTo element and up to six dimension elements.
mapTo Element
Tag Name
mapTo
Description
Specifies the dimension value that is derived based on the mapping criteria.
Attributes of the Element
Attribute Name
Required?
Value
Example
dimensionValue
Required when dimensionValueId is not specified.
The name of the dimension value this mapping criterion maps to.
Area
dimensionValueId
Required when dimensionValue is not specified.
The name of the dimension value id this mapping criterion maps to.
12
Contents of the Element
(none)
dimension Element
Tag Name
dimension
Description
Describes one of the dimensions being used to derive the
mapTo
dimension value. At minimum, one dimension element for the 'Level' dimension is required as well as one dimension element for a custom dimension.
Attributes of the Element
Attribute Name
Required?
Value
Example
name
Required when id is not specified.
The name of the dimension
Industry
id
Required when name is not specified.
The id of the dimension
value
N
The name of the dimension value. Required unless there are
dimensionValue
Retail
valueId
N
The id of the dimension value. Either this or value is required unless there are
dimensionValue
elements
Contents of the Element
dimensionValue elements
dimensionValue Element
Tag Name
dimensionValue
Description
(Optional) If more than one dimension value needs to be listed for a
dimension
tag, a series of
dimensionValue
tags can be used instead of the
value
attribute.
Attributes of the Element
Attribute Name
Required?
Value
Example
name
Y
The name of the dimension value
Retail
code
In API v30+ use code instead of name.
Required when id is not specified.
The code of the dimension value
Retail
id
Required when code is not specified.
The id of the dimension value
25
Contents of the Element
(none)
Examples:
Mapping criterion to map the dimension values HQ in the level dimension and MA in the state dimension to the East dimension value in the Area dimension. Rows where both values match will be augmented with East.
<dimension name="Area"> <mappingCriteria> <mappingCriterion> <mapTo dimensionValue="East"/> <dimension name="Level" value="HQ"/> <dimension name="State" value="MA"/> </mappingCriterion> </mappingCriteria> </dimension>
Mapping criterion to map the dimension values HQ in the level dimension and MA in the state dimension to the East dimension value in the Area dimension. Rows where both values match will be augmented with East. Since the id attribute is specified, this mapping criterion will replace an existing mapping criterion with this id.
<dimension name="Area"> <mappingCriteria> <mappingCriterion id="123"> <mapTo dimensionValue="East"/> <dimension name="Level" value="HQ"/> <dimension name="State" value="MA"/> </mappingCriterion> </mappingCriteria> </dimension>
Mapping criterion to map the dimension values HQ in the level dimension and CA or CO in the state dimension to the East dimension value in the Area dimension. Rows where both values match will be augmented with East.
<dimension name="Area"> <mappingCriteria> <mappingCriterion> <mapTo dimensionValue="East"/> <dimension name="Level" value="HQ"/> <dimension name="State"> <dimensionValue code="CA"/> <dimensionValue code="CO"/> </dimension> </mappingCriterion> </mappingCriteria> </dimension>

Response Format

Success Response
<?xml version="1.0" encoding="UTF-8"?> <response success="true"/>
Failure Response
<?xml version="1.0" encoding="UTF-8"?> <response success="false"> <messages> <message>There are duplicate mapping conditions. Make all mappingCriterion conditions unique</message> </messages> </response>
response Element
Tag Name
response
Attributes of the Element
Attribute Name
Required?
Value
Example
success
Y
Either true or false, indicating whether the API call was successful or not. Even successful calls may contain warning messages in their response.
true
Contents of the Element
A single optional messages element, and exactly one required output element.
messages Element
Tag Name
messages
Description
Container for one or more message elements.
Attributes of the Element
(none)
Contents of the Element
One or more message elements.
message element
Tag Name
message
Description
Represents a message being sent from the system back to the caller. Messages are used for error messages when requests do not succeed, for warning messages when requests do succeed, and for confirmation messages upon success.
Attributes of the Element
Attribute Name
Required?
Value
Example
key
N
When given, a key is a way to identify a particular message or type of message, useful for purposes of automated error logging and recovery in client programs. Keys do not change under different locales of requests, even when the language of the message changes. Keys also are unlikely to change in the future due to wording adjustments or terminology changes.
invalid-attributevalueid
Contents of the Element
The text of the message. This text is in the language of the locale specified on the request (assuming that locale is supported). The text may also contain variable information such as the number of rows which were processed, or the particular column or value which caused an error.