Skip to main content
Solved

Detailed documentation or example scripts for use in Automation to update Subscriptions

  • November 17, 2025
  • 7 replies
  • 102 views

Hello LeanIX community:

I’m in the need for detailed documentation or example scripts for use in Automation to update subscriptions in one factsheet with the subscriptions in another factsheet.  I have already gone through the LeanIX Documentation for Automations and Automations with Scripts, and have not found the information I need.  Especially with the latter, the examples of scripts, as the examples in the documentation do not fit my case and there’s not enough detailed information on the syntax of the script code to generate different scripts for other uses.

I would like to generate a script for use in an Automation that would for any Application factsheets that have changed (for example Application Location field) will Set Subscription for a New Subscriber equal to User with an existing Subscription from the IT Component factsheet (with a relationship to the Application factsheet) where Subscription Type is equal to Responsible and Subscription Roles equal to the value of “Service Manager”.

Where can I find documentation about the automation script code to help me generate such a script to use in an Automation?

Is there a SAP/LeanIX GitHub or something similar with various examples of scripts that can be used with the Automation feature?  Sorry, I’m not a coder or software developer, just an EA trying to extend the usage of LeanIX beyond basic configurations in Administration to make daily EA work with the factsheets easier.

Any assistance or pointers would be greatly appreciated.

Thanks in advance!

Best answer by Carsten

Hello ​@rudy_torres ,

You have to write code, I recommend Python. You can solve the task by a local running scheludeld job or in real-time by using azure functions.

Using GraphQL with Python | SAP Help Portal

Managing Fact Sheet Subscriptions | SAP Help Portal

There is no easy solution for that now. For a scheduled job (if you are not familiar with azure functions) you can query for all FS created (e.g. yesterday)  and get the subscriber and related FS. Then you can update the subscriptions for the relates FS by a graphql mutation. 
Very useful is the graphiql explorer:
 

Best regards,
Carsten

 

7 replies

Thomas Schreiner
Forum|alt.badge.img+3

Hi ​@rudy_torres 

With standard automations, it’s not (yet) possible to inherit subscriptions in an automated way. There are several ways how you can achieve this:

  1. Develop it yourself using webhooks and the LeanIX GraphQL API. If you are not a developer, expect a bit of a learning curve :-)
  2. Use the standard automation of Aronis Automation Platform to inherit subscriptions, which does exactly what you want. You can also use the platform for simple LeanIX scripting of automations if you do not want to dig deep into the details of LeanIX APIs and GraphQL.

Carsten
Forum|alt.badge.img+1
  • Everlasting Love
  • Answer
  • November 18, 2025

Hello ​@rudy_torres ,

You have to write code, I recommend Python. You can solve the task by a local running scheludeld job or in real-time by using azure functions.

Using GraphQL with Python | SAP Help Portal

Managing Fact Sheet Subscriptions | SAP Help Portal

There is no easy solution for that now. For a scheduled job (if you are not familiar with azure functions) you can query for all FS created (e.g. yesterday)  and get the subscriber and related FS. Then you can update the subscriptions for the relates FS by a graphql mutation. 
Very useful is the graphiql explorer:
 

Best regards,
Carsten

 


  • Author
  • Rookie
  • November 18, 2025

Hello ​@rudy_torres ,

You have to write code, I recommend Python. You can solve the task by a local running scheludeld job or in real-time by using azure functions.

Using GraphQL with Python | SAP Help Portal

Managing Fact Sheet Subscriptions | SAP Help Portal

There is no easy solution for that now. For a scheduled job (if you are not familiar with azure functions) you can query for all FS created (e.g. yesterday)  and get the subscriber and related FS. Then you can update the subscriptions for the relates FS by a graphql mutation. 
Very useful is the graphiql explorer:
 

Best regards,
Carsten

 

Hi Carsten,

 

Thanks for the suggestion of writing an external script in Python executing outside of the LeanIX.  I don’t think there are either internal skilled resources or financial funding to go that route.

I noticed that the “example” scripts in the LeanIX Automation documentation is JavaScript (i.e., “Automations with Scripts”).

Is there no documentation that goes deeper into the LeanIX data structure as it relates to JavaScript code, so that I can use our internal Generative AI to generate a JavaScript based script to be executed in the Automation itself?  For example, LeanIX documentation that describes the structure and fields of “data.factSheet” or “data.factSheet.subscriptions” for use in generating scripts (for further use with LeanIX  Automations)?

LeanIX Automation allows for simple scripts to be executed within the automation (as per the LeanIX documentation:  “Automations with Scripts”)?

 

Then

    ACTION

        Run Script

        [New Script] <= JavaScript to do what I’d like to do… updating the Subscriptions of the Application factsheet with the Subscriptions of the IT Component factsheet related to that Application factsheet.

 

 

I haven’t done coding in 27 years (not my role), but it seems from the LeanIX documentation (i.e., “Automations with Scripts”) that this can be done easily with a simple JavaScript within the LeanIX Automation functions without needing to write a complex Python external program running in a cloud?

Other LeanIX users must have created scripts for use in the Automation function to do things beyond configurations and basic automations...(?)… willing to share their knowledge...(?)

Kind regards,

Rudy


  • Author
  • Rookie
  • November 18, 2025

Hi ​@rudy_torres 

With standard automations, it’s not (yet) possible to inherit subscriptions in an automated way. There are several ways how you can achieve this:

  1. Develop it yourself using webhooks and the LeanIX GraphQL API. If you are not a developer, expect a bit of a learning curve :-)
  2. Use the standard automation of Aronis Automation Platform to inherit subscriptions, which does exactly what you want. You can also use the platform for simple LeanIX scripting of automations if you do not want to dig deep into the details of LeanIX APIs and GraphQL.

Hi Thomas,

Is this route really necessary?  Does the LeanIX client/user really need to buy/rent a software development tool to generate scripts to run in LeanIX Automations?

I noticed that the “example” scripts in the LeanIX Automation documentation are JavaScript (i.e., “Automations with Scripts”).

Is there no documentation that goes deeper into the LeanIX data structure as it relates to JavaScript code, so that I can use our internal Generative AI to generate a JavaScript based script to be executed in the Automation itself?  For example, LeanIX documentation that describes the structure and fields of “data.factSheet” or “data.factSheet.subscriptions” for use in generating scripts (for further use with LeanIX  Automations)?

LeanIX Automation allows for simple scripts to be executed within the automation (as per the LeanIX documentation:  “Automations with Scripts” - https://help.sap.com/docs/leanix/ea/automations-with-scripts?locale=en-US&q=automation)?

 

Then

    ACTION

        Run Script

        [New Script] <= JavaScript to do what I’d like to do… updating the Subscriptions of the Application factsheet with the Subscriptions of the IT Component factsheet related to that Application factsheet.

 

 

Other LeanIX users must have generated scripts for use in the Automation function to do things beyond configurations and basic automations...(?)… willing to share their knowledge...(?)

I don’t think my client has the technical resources or the financial funding to go outside of LeanIX to make more complex Automations (i.e., hiring technical resources, bringing IT service firms, buying new tools, etc.).

 

Kind regards,

Rudy


Thomas Schreiner
Forum|alt.badge.img+3

Hi ​@rudy_torres ,

Automations and Calculations are relatively new features and they are constantly extended. Code execution in Automations is brand new, only 1-2 months old. Setting subscriptions dynamically in calculations or in code snippets of automations is not yet possible, but given the current speed of LeanIX development, it might be possible in a few months.


  • Author
  • Rookie
  • November 18, 2025

Hi ​@rudy_torres ,

Automations and Calculations are relatively new features and they are constantly extended. Code execution in Automations is brand new, only 1-2 months old. Setting subscriptions dynamically in calculations or in code snippets of automations is not yet possible, but given the current speed of LeanIX development, it might be possible in a few months.

Thanks Thomas.  I’ll reach out to our LeanIX Customer Success Manager (Pablo Torre) to see if I can get unpublished or not for the public documentation on the JavaScript examples and metamodel data structures used for scripts to write our own scripts for use with Automations (as per “Automations with Scripts” in LeanIX).  Trying to avoid to spend or buy extra things to make things happen in LeanIX.  Cheers!


justinharclerode
Community Manager
Forum|alt.badge.img+1

Hi ​@rudy_torres ,

Automations and Calculations are relatively new features and they are constantly extended. Code execution in Automations is brand new, only 1-2 months old. Setting subscriptions dynamically in calculations or in code snippets of automations is not yet possible, but given the current speed of LeanIX development, it might be possible in a few months.

Thanks Thomas.  I’ll reach out to our LeanIX Customer Success Manager (Pablo Torre) to see if I can get unpublished or not for the public documentation on the JavaScript examples and metamodel data structures used for scripts to write our own scripts for use with Automations (as per “Automations with Scripts” in LeanIX).  Trying to avoid to spend or buy extra things to make things happen in LeanIX.  Cheers!

Hi you can get you LeanIX data mode by navigating below:

Admin panel → Integration API → Integration example applications → top right corner clicking three dots and get data model → In output log you will find the keys for different attributes for your data model. This will help you know what to call to write to or get updates.