Initializing help system before first use

Run the FAC REST API installation example

With everything in place, you can now issue the command within a Command Prompt to run the example.
This script requires information to create and validate the connection to the correct app on the FAC. You must enter the dmpManager, clientId, secret, and server values into the dmp-rest-client-example javascript. You can obtain these values by performing the following steps:
  1. Log in to DMP on the FICO Analytic Cloud(FAC). Navigate to the SOLUTIONS tab.
  2. The address bar at the top of the browser includes the manager value. Copy this URL, up to and including the first single forward slash, to the dmpManager field in the script.

    For example, an address like 'https://manager.yourServerRootDetails.ficoanalyticcloud.com/com.fico.fusion/#Solutions' would be entered as 'https://manager.yourServerRootDetails.ficoanalyticcloud.com/'.

  3. Click Client Apps. The Client ID and Secret values are displayed in the Application pane—Use the COPY button to the right of each field to copy each value individually to the script.
  4. Click Components then select the Xpress Insight component you wish to access. In the drop down menu, select Configure.
  5. In the Component Configuration dialog, click Launch Xpress Insight.
  6. The address bar at the top of the browser displays the server value, including the branch to the insight app(/insight/). Remove the insight branch and trailing slash from the end of the server address to obtain the correct value.

    For example, an address like 'https://yourServerRootDetails.ficoanalyticcloud.com/insight/' would be entered as 'https://yourServerRootDetails.ficoanalyticcloud.com'.

Running the Javascript

Note The script accesses the app using the permissions granted to a user named solutionclient. This user is created the first time the FAC REST API is called. After the user has been created, an Administrator must grant access to the applications it will access.
If the REST API is called before the user has been granted access, the output will resemble the following:
Logged in
Getting current user info...
Current user solutionclient
Getting all apps...
Failed request  undefined undefined
Error: Campaign Conversion not found - aborting

In the Command Prompt window, type node dmp-rest-client-example.js and press Enter.
The scenario is loaded, executed, and closed. The output displayed in the Command Prompt window will resemble the following:
token:  NzQ5MTc3OTctZWU3My00NmFhLTkyZjctNTNjNmU2ODZkMjM3
Logged in
Getting current user info...
Current user solutionclient
Getting all apps...
Creating scenario...
Created scenario [ 'a72fe552-36f0-47b0-bb51-b56667af8b5c',
  'Auto scenario 1538400027213',
  'Campaign Conversion' ]
Setting NC parameter to 1500...
Requesting scenario execution...
Executing...
Job completed
Execution completed
Getting scenario to verify it completed successfully...
Scenario executed successfully OK
Setting Budget to 1200...
Requesting scenario execution...
Executing...
Job completed
Execution completed
Fetching profit...
Scenario executed successfully OK
Profit is 435521.5842564791
Logging out...
Logged out

© 2001-2020 Fair Isaac Corporation. All rights reserved. This documentation is the property of Fair Isaac Corporation (“FICO”). Receipt or possession of this documentation does not convey rights to disclose, reproduce, make derivative works, use, or allow others to use it except solely for internal evaluation purposes to determine whether to purchase a license to the software described in this documentation, or as otherwise set forth in a written software license agreement between you and FICO (or a FICO affiliate). Use of this documentation and the software described in it must conform strictly to the foregoing permitted uses, and no other use is permitted.