-
Using Network cards for dynamic org charts
Hi,
We came across org charts (Hierarchy Charts) which are a great functionality. However, we want the client to be able to do scenario planning on the hierarchy and by Month. E.g. John could report to Smith in Jan, but in Feb , he report to Molly.
Since Org Charts cannot refresh dynamically unless you incorporate time dimension in the hierarchy itself, we were hoping this could be achieved with Network cards, as we could keep a parent child mapping by month.
Can anyone please help understanding if this is the best approach and / or are there any limitations of this? We are talking about a 10 level reporting hierarchy.
Regards,
Aakash Sachdeva
-
CloudWorks—This is how we use it, Part 3: The CloudWorks API
In Part 3 of our CloudWorks - This is how we use it series, we will introduce you to the CloudWorks API.
This is typically for an audience comfortable with REST APIs concepts and programming.
If you need a refresher on What CloudWorks is, see Part 1 or, for how to set it up, see Part 2.
CloudWorks API will allow you to create and execute connections and integrations extending integration automation capabilities between Amazon AWS S3 and Anaplan.
We will use a typical CloudWorks workflow to build and run integrations using REST API and Postman. To follow along, download the set of Jupyter Notebooks and data set that will walk you through each step of this workflow using Python (CloudWorksAPIBasic.zip and AccountDetailsS3.zip).
The following are minimum requirements to be able to perform the steps described in this blog.
* Required software* Download and install Postman (https://www.postman.com/downloads), Python 3.8.2, Jupyter notebook
* Anaplan: Create a Model, LIST (Accounts), Module (AccountDetails), Import AccountDetailsS3.csv into LIST (Create Import Action), Import AccountDetailsS3.csv into Module (Create Import Action)
* AWS S3: AWS Account, Create Access Key, Secret Access Key, Create a bucket, upload Source File (AccountDetailsS3.csv) to S3 Bucket
* Working knowledge of Anaplan Model Building Concepts, REST API, Postman, Python, Jupyter
* Familiarity with Anaplan Authentication and Integration REST APIs
Step 1 - Anaplan setup
* Download AccountDetailsS3.csv from this blog and save it to your workstation
* Create a new Anaplan Model. Provide an appropriate model name.
* Create LIST named Accounts. Import AccountID into this LIST from AccountDetailsS3.csv
* Create a Module named AccountDetails with Accounts as a dimension
* Create the following line items:* AccountName (Text), Industry (Text), AnnualRevenue (Number), EmployeeCount (Number)
* Import AccountDetailsS3.csv into AccountDetails Module.
* Import Action Name for LIST (Accounts): ______________________
* Import Action Name for Module (AccountDetails): __________________________
Step 2 - AWS setup
* Assumptions: AWS Access Key & Secret Access Key have been generated in AWS Console
* Create an S3 bucket named anaplandemo
* Create a folder named source
* Upload AccountDetailS3.csv to anaplandemo/source in AWS S3
Step 3 - Postman setup
* Create a collection named CloudWorks
* Create following folder structure in collection CloudWorks
* We will use variables in API requests. Create the following variables in collection CloudWorks.
Now that we have completed the required prep-work in Anaplan, AWS S3 & Postman, we will make CloudWorks API requests to build and execute integrations to load data from AWS S3 to Anaplan. We will follow steps outlined in a typical CloudWorks task, outlined below, to build this integration. CloudWorks REST API requests will be made using Postman.
Step 4 - CloudWorks API
Each Anaplan API request begins with generating an Authentication Token using Anaplan Authentication Services REST API. Generated Auth Token is then passed in the header of CloudWorks API request for Anaplan authentication. Keep in mind, Anaplan Authtoken is valid for only 30 min. Once expired, you will need to regenerate the token and update CloudWorks API header.
We will perform the following tasks in Postman to bring AWS S3 data to Anaplan.
* Create a connection: Using AWS S3 connector, we will create a CloudWorks connection to AWS S3 Bucket.
* Create an integration: Using AWS connection and Anaplan information (workspaceid, modelid, fileid, import action id), we will create a CloudWorks integration.
* Run an integration: Run integration using CloudWorks API.
* Retrieve Integration Information: Get integration run information.
Generate Authentication Token (Basic Authentication)
The first step in any Anaplan API request, including CloudWorks, is generating Anaplan Authentication Token. The authentication token can be generated using Anaplan Authentication Services API. URL for authentication services is https://auth.anaplan.com/token/authentication.
Authentication Services API to generate token has the following REST structure:
Method
POST
API end point
https://auth.anaplan.com/token/authenticate
Headers
Authorization: Basic username:password (username:password string must be base64 encoded)
Copy value for tokenValue to collection variable token_value. You will use variables instead of hard coding values in your API requests. Token values expire every 30 minutes. You will need to re-generate a token and update the token_value value variable if you encounter authentication failures.
Create a connection using CloudWorks API
The first step in building a CloudWorks integration is to create a connection to AWS S3 bucket. Passing AuthToken in the header of API request, we will create a connection to AWS S3 bucket in this step. Create connection API has the following REST structure.
Method
POST
API end point
https://api.cloudworks.anaplan.com/1/0/integrations/connection
Authorization
No Auth
Headers
Authorization: AnaplanAuthToken {{token_value}}
Content-Type: application/json
Body
{
"type": "AmazonS3",
"body": {
"name":"AWS_CW_API",
"accessKeyId":"XXXXXXXXXXXXXXXX",
"secretAccessKey":"XXXXXXXXXXXXXXXXXXXXXXX",
"bucketName":"anaplandemo"
}
}
Do not change the value for “type”.
Provide name for following elements: name, accessKeyId, secretAccessKey, & bucketName
* Select POST method and API end point. https://api.cloudworks.anaplan.com/1/0/integrations/connections.
* Select “NoAuth” for Authorization Type. We will pass the authentication token in the header of the request.
* Create the following headers: Authorization and Content-Type.
* Copy and paste the following JSON structure into the Body of your request. Replace values for accessKeyId, secretAccessKey, and bucketName with your values.
{
"type": "AmazonS3",
"body": {
"name":"AWS_CW_API",
"accessKeyId":"XXXXXXXXXXXXXXXX",
"secretAccessKey":"XXXXXXXXXXXXXXXXXXXXXXX",
"bucketName":"anaplandemo"
}
}
* Once the API request is submitted, the service should return a successful response back with HTTP code 200 and a value for connection id. You will save this connection id, to be used in the next API request in creating a CloudWorks integration. Copy the value for connectionId in a notepad and update it for collection variable connection_id.
* Log into Anaplan CloudWorks. You should see the connection you created under Connections.
Create an integration using CloudWorks API
In this second step, we will create a CloudWorks integration. In the integration, we will provide connectivity information for both AWS S3 and Anaplan. Two types of integrations can be built:
* AWS S3 (Source) Anaplan (Target): Data from a file on AWS S3 is selected as a source and Anaplan Import Action as a target.
* Anaplan (Source) AWS S3: Data from Anaplan is exported using Export Action (Source) and written to a file on AWS S3 Bucket (Target).
Create integration API has the following REST structure:
Method
POST
API end point
https://api.cloudworks.anaplan.com/1/0/integrations
Authorization
No Auth
Headers
Authorization: AnaplanAuthToken {{token_value}}
Content-Type: application/json
Body
{
"name": "CWAPI_AWSS3_Anaplan",
"jobs": [
{
"type": "AmazonS3ToAnaplan",
"sources": [
{
"type": "AmazonS3",
"connectionId": "a2fb43a9-3bc8-4bcb-9f37-dd59a75eb940",
"file": "source/AccountsS3.csv"
}
],
"targets": [
{
"type": "Anaplan",
"actionId": "112000000005",
"fileId": "113000000000",
"workspaceId": "8a81b09d5e8c6f27015ece3402487d33",
"modelId": "35A6EF893D7F47EEA5A554D5CC7DC330"
}
]
}
]
}
Do not change the value for “type”: “AmazonS3ToAnaplan”, “type”:”AmazonS3”, “type”:”Anaplan”
Provide values for following elements: connectionId, actionId, fileId, workspaceId, modelId.
* Select POST method and API end point https://api.cloudworks.anaplan.com/1/0/integrations. Also, select “No Auth” for Authorization.
* Create the following headers: Authorization and Content-Type
* Copy and paste the following JSON structure into the Body of your request. Replace values for connectionId, file, actionId, fileId, workspaceId, and modelId. You may obtain values for your import action (actionId) and Data Source File (fileId) using Anaplan Integration API. Details on Integration APIs can be found on Anapedia. You can obtain values for workspaceId & modeled from Anaplan UX.
{
"name": "CWAPI_AWSS3_Anaplan",
"jobs": [
{
"type": "AmazonS3ToAnaplan",
"sources": [
{
"type": "AmazonS3",
"connectionId": "a2fb43a9-3bc8-4bcb-9f37-dd59a75eb940",
"file": "source/AccountsS3.csv"
}
],
"targets": [
{
"type": "Anaplan",
"actionId": "112000000005",
"fileId": "113000000000",
"workspaceId": "8a81b09d5e8c6f27015ece3402487d33",
"modelId": "35A6EF893D7F47EEA5A554D5CC7DC330"
}
]
}
]
}
* Once the API request is submitted, the service should return a successful response back with HTTP code 200 and a value for integration id. Copy & paste value for integrationId to collection variable s3_anaplan_int_id. We will use integrationId in a later step when we gather run details for an integration.
* Log into Anaplan CloudWorks. You should see the integration you created under Integrations.
Run an integration using CloudWorks API
Now that we have created an integration, we will run the integration that loads data from a file on AWS S3 bucket to an Anaplan module. Once the integration is run, we will retrieve a history of integration runs and its details. We will do this in the next step. CloudWorks APIs can be used to schedule integrations. However, in this blog, we will focus on executing integrations via API.
You will need to provide the following details in your API request:
Method
POST
API end point
https://api.cloudworks.anaplan.com/1/0/integrations/<integration_id>/run
Authorization
No Auth
Headers
Authorization: AnaplanAuthToken {{token_value}}
Content-Type: application/json
Body
None
* Select POST method and API end point https://api.cloudworks.anaplan.com/1/0/integrations. Also, select “No Auth” for Authorization.
* Create the following headers: Authorization and Content-Type
* Once the API request is submitted, the service should return a successful response back with HTTP code 200.
* View integration run status & details in Anaplan CloudWorks UX.
* If an integration run fails, you will also be notified via email.
Get history of integration runs
CloudWorks API provides end points to get details on integration run history. REST structure for this end point is:
Method
GET
API end point
https://api.cloudworks.anaplan.com/1/0/integrations/runs/<integrationId>
Parameters
Offset = 0
limit = 2
Authorization
No Auth
Headers
Authorization: AnaplanAuthToken {{token_value}}
Content-Type: application/json
Body
None
* Select POST method and API end point https://api.cloudworks.anaplan.com/1/0/integrations/runs/<integrationId>. Also select “No Auth” for Authorization.
* Create two parameters offset & limit. Set their values to 0 & 2 respectively.
* Create the following headers: Authorization and Content-Type
* The service request should return a successful response back with HTTP code 200 and details for each run for selected integration.
Contributing authors: Pavan Marpaka, Scott Smith, and Christophe Keomanivong.
-
Error in Uploading Screenshot for Anaplan ADO Maps.
Hi All,
Facing an issue while uploading the screenshot as it is showing "error while uploading the file". Is it only for me or is anyone else facing the same. Can anyone help in resolving this at earliest? Attaching the screenshot of the error below.
Thanks,
-
Returning same value from same Line Item but different items
Hi all,
Is it possible to return a value from an item on the same line item? For example, picture this as my module:
I want to be able to calculate a delta between S1 and S2 or S3 and S1, like this:
Here I'm using SELECT but this will be a lookup since I want the user to be able to select which scenarios he want to compare, of course this formula won't work because this is a circular reference, is there a way to make it work?
The user wants to have a Delta on the same table as the scenarios, that's why I'm not creating a second module to calculate it.
-
Date Line Item using Min Summary
Hello
I am using line item formatted as date with 6 level hierarchy. I am using summary as Min for the same.
I am facing issues where if there is no date in my list P6, i am getting 12/31/2399 for all NonBlank list members. Please advise best way to handle it without doing any hardcoding.
Regards
MO
-
Add note / comment out in the formula editor
Ability to add notes / comment out formula parts in the formula editor similar to '- -' in SQL or ' in Microsoft Visual Basic
-
Inquiry Regarding Zero Chunk Count in Anaplan Integration API V2 Downloads
I am currently working with the Anaplan Integration API V2 to download a list of files and obtain their corresponding file IDs. In previous downloads, the chunk count for the files was correctly indicated. However, I have noticed that the chunk count for the same files now shows as zero, despite no changes being made to the model or files in Anaplan.
This discrepancy in the chunk count is preventing me from downloading the files as expected. Could you please provide some insights into why the chunk count has suddenly become zero? Additionally, why is Anaplan not allowing us to determine the appropriate chunk size for downloading files? Any guidance on resolving this issue would be greatly appreciated.
-
Email Notification
I created a action - to add list member. Additionally also a notification to notify me via email if there will be a new List member added. But unfortunately it is showing me two different buttons to execute the process. Is there any way i can create in one process the adding of list member followed by Email notification?
Thanks in Advance.
-
Automate model copy
Is there a way to schedule or automate the process of copying a model?
-
Need to know if we can take out some GB from 1 workspace and put that space into different workspace
Hi,
I have a question where I want to split out like 30 GB from one of my workspace and put that 30 GB into different workspace.
Current Situation
Workspace 1= 130 GB
Workspace 2= 300 GB
Required Situation
Workspace 1 = 160 GB
Workspace 2= 270 GB
If its possible how can we do this.
Thanks
-
Enhancing Your Anaplan Audit History Reporting with Model History Export
We are excited to announce a significant upgrade to the existing Anaplan Audit History Reporting project written in Python. This project now includes the ability to export Model History. This enhancement provides a more comprehensive view of data changes within your Anaplan models, allowing for deeper analysis and better archiving capabilities.
Key Features:
* Inclusion of Model History Export: The Anaplan Audit History Reporting has been upgraded to include Model History Export. This new feature ensures that all changes in data within individual Anaplan modules are tracked and exportable.
* Tracking Changes: Anaplan Model History meticulously records all data changes in individual Anaplan modules, offering a detailed log that is essential for auditing and reviewing historical data modifications.
* Flexible Export: The export functionality dynamically updates the export column names in a SQLite table. This flexibility ensures compatibility and ease of integration with various data processing workflows.
* Offloading to Robust Databases: For enhanced analysis and archiving, it is recommended to offload the exported data to a more robust relational database. This approach facilitates extensive data analysis and long-term storage, ensuring your data is accessible and secure.
* Using the New Feature: To utilize this new feature, set up an Anaplan Export Action and save the Export Action from the Model History interface. The export action must be named "MODEL_HISTORY_EXPORT". Once this action is configured, the model history will be dynamically exported to a new table created in the SQLite database where the Python script executes. The table and column names will be slightly modified to ensure they are SQL-friendly.
Step-by-Step Instructions:
* Set Up Anaplan Export Action:* Navigate to the Model History interface in your Anaplan model.
* Set up, save, and run the Export Action
* Execute the Audit History Export Script:* When the current Audit History export process is run, the Python script automatically detects any Export Action named "MODEL_HISTORY_EXPORT" in a given Module.
* On the first run, once the model history has been downloaded, the script will dynamically create a new table in the SQLite database and ensure all column names are SQL-compatible.
Note: The table and column names may differ slightly as the script will modify all Workspace, Model, Module, and Line Item names to be "SQL Compatible".
* On subsequent runs, the SQL table may include additional columns as other Modules are included in the Model History.
Note: Similar to the Audit History Export, it is important to run the Model History Export frequently, such as every 24 hours, to ensure the output is up-to-date.
* Deployment Instructions:* For detailed deployment instructions, please follow the guide provided in this link.
* Please be advised that this continues to be considered a custom solution and, as such, is not directly supported by Anaplan Support.
Conclusion: By incorporating the Model History Export into your Anaplan Audit History Reporting, you gain a powerful tool for tracking, analyzing, and archiving data changes within your Anaplan models. This feature enhances the audit capabilities and ensures that your data management processes are robust and flexible.
For further details and to start using this feature, visit the Anaplan Community Discussion.
Author: Quin Eddy, @QuinE - Director of Data Integration, Operational Excellence Group (OEG)
-
How to create in a module a quarter option?
Hello,
I have a forecast module, with monthly TimeScale and I want to create, in this module, an option for a quarterly view. So basicly, if the client wants to see the data quarterly, he should be able.
I also have a MOD02 Quarter Time Settings and also a filter module for the quarter part.
At this moment, my data is being taken from other modules and each line has a lookup formula. Example :
Forecast = ModelA.Data[LOOKUP: ' MOD01 Lookups Seetings.Forecast, Lookup:' MOD01 Lookups Seetings.AMOUNT].
Is there a way to make this formula optional for quarter view? Client should be able to choose from the UX page the year, the Quarter (if he wants) and then the month. AT this moment, he is able to choose only year and month.
Thanks