Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

The 4th edition of the Campaign Community Lens newsletter is out now!

getValue() doesn\'t exist in session.xml and include.xml doesn\'t either


Level 2

Hi, Im trying to use the xtk.session.getValue("name") method in my javascript file and also do a xtk.include("xtk:session.js") function with that. But when I look in datakit\xtk\eng\schema the include.xml doesnt exist. And when I look in the session.xml the method getValue() doesnt either.


How can I go on from here?


Best Regards,


4 Replies


Community Advisor

Hello @marting66652718 


To include any file in your JS file, you can use this syntax


Also, The getValue method is not available in the session class.


You can use options to save temporary data as key-value pairs.

set option value




Get the value of option






In ACC, Xtk code is used for server-side scripting and to interact with the platform's API.

The xtk.session.getValue() method is a built-in function, which allows you to retrieve a value stored in the current session. The xtk.include() function is used to include other Xtk scripts or functions into your current script.

Regarding your question about the missing files in the datakit\xtk\eng\schema directory, it's important to note that these files are not intended to be edited or modified directly.

Instead, they are generated and updated automatically by the platform based on the configuration of your instance.

If you are unable to find the include.xml file or the getValue() method in session.xml, it's possible that your ACC instance has been customized or modified in some way.

You should be able to use the "xtk.session.getValue()" method and the "xtk.include()" function in your Xtk script without having to worry about the underlying implementation details.




Level 2



Im not able to use the getValue() method in my javascript file. Nor am I able to use the Include();


Best Regards




@marting66652718 ,

If you're having trouble using xtk.session.getValue() or xtk.include() in your JavaScript file, there are a few things you can check:

1. Ensure you have included the session.js file in your JavaScript file. You can do this by adding the following line at the top of your JavaScript file:
This line tells the platform to include the session.js file in your script, which contains the xtk.session.getValue() method.

2. In Adobe Campaign Classic, JavaScript files can be run on either the client-side (in the web browser) or the server-side (on the server). The xtk.session.getValue() and xtk.include() methods are only available on the server-side, so ensure that your JavaScript file is executed server-side.

3. Check for errors in your JavaScript file. If your JavaScript file has syntax errors or other issues, it may prevent the xtk.session.getValue() or xtk.include() methods from working correctly. Check the console logs for any error messages that may be helpful.