API Calls Via Named Session

Last Updated: 12/03/2015 Introduced in Verision: 2.0

This example demonstrates how to use Named Session in cases when User should never use Decisions Portal but for example need to interact with Flows, Forms, Rules or Reports that live in the Portal.

First, we are going to create a new Account. In the Portal we navigate to System > Security > Accounts Folder and click Create Account button on the Folder Actions Panel.


In the resulting window we provide Account with Required Information such as Email and Password. Important: we uncheck Can Use Portal checkbox so this Account will not be able to access Portal even with right credentials. Click Ok to save.


Our new Account shows up in the Accounts Folder.


Then, we navigate to System > Security > Named Sessions and click Add Named Session button from the Folder Actions Panel.


In the resulting window we provide Named Session with Name and using ForAccountId picker we select Account that we have created in the previous steps. Click Ok to save and continue.


Named Session is created in the Folder.


To ensure that our system@mycompany.com account cannot use Portal we Logout and try to Log In using this account’s credentials.


As a result, Decisions redirects us to the Page that informs us that we are restricted from using Portal.


Next, we are going to create a Flow with a Form. In the Designer Folder we click Create Flow on the Folder Actions Panel.


In the resulting window we Name the Flow and click Create to proceed to the Flow Designer.


In the Flow Designer we add Show Form step from the Favorite Steps category.


Then, we Name the Form and click Create to proceed.


Our Form for this example designed as following… When we finished designing our Form we can save and close Form Designer.


Next, in the Flow Designer we connect the outcome from the Form Step to the End Step in our Flow. This completes our Flow Design. We can save and close Flow Designer.


Back in the Designer Folder we need to edit permissions for the Folder. From Folder Actions we click Manage > Manage Permissions.


In the resulting Manage Folder Permissions window we click Add New link to add an Account.


Then, we pick Account that we created previously in this tutorial and click Ok.


Next, we give this Account CanUse permissions only. Click Ok to save and continue.


Permissions for our Account are granted.


Back in the Designer Folder we locate the thumbnail for our Flow and from the Action menu select Run[Advanced] > Integration > View Integration Details.


1. If you are calling a flow that may go async (assigning a task to someone or running a fire and forget flow) this result will be a flow tracking id instead of your expected result.

2. If you call the flow as a SOAP service you will ALWAYS get flow tracking id which is different behavior than REST.


On the Integration Page we Generate UI Code to run our Flow as UI/Form using our Named Session that we created in this tutorial as Credentials.


Then, we copy generated UI Code.


Next, we Logging out of the Portal to ensure that any User will be able to run our Flow.


We paste Generated UI code into browser and click Enter.


Our Form opens…


We can fill it in and submit.


Additional Resources