Sdílet prostřednictvím


SAS Decisioning (Preview)

SAS Decisioning combines AI and business rules to automate operational decisions at scale. Use this connector to run decision models that are deployed on the SAS Viya platform.

This connector is available in the following products and regions:

Service Class Regions
Logic Apps Standard All Logic Apps regions except the following:
     -   Azure Government regions
     -   Azure China regions
     -   US Department of Defense (DoD)
Power Automate Premium All Power Automate regions except the following:
     -   US Government (GCC)
     -   US Government (GCC High)
     -   China Cloud operated by 21Vianet
     -   US Department of Defense (DoD)
Power Apps Premium All Power Apps regions except the following:
     -   US Government (GCC)
     -   US Government (GCC High)
     -   China Cloud operated by 21Vianet
     -   US Department of Defense (DoD)
Contact
Name SAS Support
URL https://support.sas.com
Email support@sas.com
Connector Metadata
Publisher SAS Institute, Inc.
Website https://www.sas.com
Privacy policy https://www.sas.com/en_us/legal/privacy.html
Categories AI;Data

SAS Intelligent Decisioning on SAS Viya combines business rules management, decision processing, real-time event detection, decision governance, and powerful SAS advanced analytics to automate and manage decisions across the enterprise. SAS Intelligent Decisioning helps expedite the operationalization of analytical models, including both SAS models and those developed with open source frameworks. It supports the decisioning process in credit services, fraud prevention, manufacturing, personalized marketing, and many other use cases.

The SAS Decisioning connector enables users to connect to their SAS Viya environment and run selected decision modules and analytical models. Example use cases for the SAS Decisioning connector include:

  • Determine if the email content complies with a company’s corporate policy
  • Score a job applicant based on interview feedback
  • Score a sales opportunity
  • Determine if an invoice is legitimate
  • Automatically approve an expense report

To learn more about SAS Intelligent Decisioning and to request a free trial, please visit https://www.sas.com/en_us/software/intelligent-decisioning.html.

Prerequisites

  1. The user must have an existing SAS Intelligent Decisioning license.
  2. The user must configure the SAS Intelligent Decisioning environment to allow calls coming from the IP Addresses described in Azure IP Ranges.

How to use the SAS Decisioning connector

  1. Register your client applications.
  2. Obtain an access token for use in connecting to your SAS Viya environment.
  3. Connect to your SAS Viya environment.

Registering clients

All applications and scripts that use SAS Viya REST APIs must be registered with the SAS environment. Your SAS administrator must use the OAuth service in SAS Logon Manager to request an access token and to register a client. SAS Logon Manager issues OAuth access tokens in response to requests that contain a valid token from the SAS Configuration Server. SAS Decisioning Connector uses an OAuth Bearer token as an API Key.

To register a client:

  1. Locate a valid Consul token. A SAS administrator can find a token in the client.token file at /opt/sas/viya/config/etc/SASSecurityCertificateFramework/tokens/consul/default inside the sas-consul-server-0 pod. To retrieve the Consul token string on a Linux system, run the following command:

    kubectl exec sas-consul-server-0 -- \
        cat /opt/sas/viya/config/etc/SASSecurityCertificateFramework/tokens/consul/default/client.token
    
  2. Request an OAuth token by posting a request to /SASLogon/oauth/clients/consul. Specify the Consul token from step 1 in the X-Consul-Token field. For example, to request a token for a client named app, submit the following command:

    curl -X POST "https://server.example.com/SASLogon/oauth/clients/consul?callback=false&serviceId=app" \
          -H "X-Consul-Token: <consul-token-from-step-1>"
    
    Query parameter Description
    callback Specify false in order to receive an access token in the response. Otherwise, the token is sent to the service registered in SAS Configuration Server.
    serviceId Specify the name of the client that you want to register.

    In response to the request, SAS Logon Manager returns a JSON response that includes an access token in the access_token field.

  3. Register the client application by posting a request to /SASLogon/oauth/clients. Specify the access token that was returned in step 2 as the value of the Authorization header:

    curl -X POST "https://server.example.com/SASLogon/oauth/clients" \
        -H "Content-Type: application/json" \
        -H "Authorization: Bearer <access-token-from-step-2>" \
        -d '{
          "client_id": "<client-id-goes-here>",
          "client_secret": "<client-secret-goes-here>",
          "scope": ["openid"],
          "authorized_grant_types": ["client_credentials"],
          "access_token_validity": 43199
         }'
    

    Tip: By default, a token is valid for 12 hours (or 43200 seconds). To set a shorter or longer duration, set the access_token_validity field as needed, using an integer value for time in seconds.

    Note: There are other "authorized_grant_types" supported, but the SAS Decisioning connector currently expects the client_credentials grant type.

If the request is successful, the client is registered. A successful JSON response looks similar to the following example:

{"scope":["openid"],"client_id":"<requested-client-id>","resource_ids":["none"],"authorized_grant_types":["client_credentials"],
"access_token_validity":43199,"authorities":["uaa.none"],"lastModified":1521124986406}

Obtaining access tokens

Registered clients can request an access token using the SAS Logon OAuth API. To request an access token, post a request to the /SASLogon/oauth/token endpoint and specify a form of authorization. The authorization is expressed in the form of an authorization grant. Currently, SAS Viya REST APIs support the client_credentials grant type.

For example, given a client identifier of "myclient" with a secret "mysecret," you can request a token as follows:

    curl -X POST "https://server.example.com/SASLogon/oauth/token" \
      -H "Content-Type: application/x-www-form-urlencoded" \
      -d "grant_type=client_credentials&client_id=myclient&client_secret=mysecret"

The JSON response contains a field named access_token that contains the value of the token that is used by the SAS Decisioning connector to create Power Automate connections. When the token expires, post a new request to the /SASLogon/oauth/token endpoint.

Connecting to your SAS Viya environment

To connect to your SAS Viya environment, you will need the following information:

Parameter name Description
SAS Viya Environment URL URL of the SAS Intelligent Decisioning deployment. For example: https://server.example.com
Authorization Token The access token returned from the command in Obtaining access tokens above. Prefix the token with Bearer .

The connection can be shared between users.

Creating a connection

The connector supports the following authentication types:

Default Parameters for creating connection. All regions Shareable

Default

Applicable: All regions

Parameters for creating connection.

This is shareable connection. If the power app is shared with another user, connection is shared as well. For more information, please see the Connectors overview for canvas apps - Power Apps | Microsoft Docs

Name Type Description Required
SAS Viya Environment URL string Specify SAS Viya Environment URL True
Authorization Token securestring The Authorization Token for this api True

Throttling Limits

Name Calls Renewal Period
API calls per connection 100 60 seconds

Actions

Run step

Executes the step with the specified input values. The outputs variable in the reply contains the output of the execution.

Run step

Executes the step with the specified input values. The outputs variable in the reply contains the output of the execution.

Parameters

Name Key Required Type Description
module
moduleId True string

The identifier of the module that contains the step to execute.

step
stepId True string

The identifier of the step to execute.

name
name string

Name of the variable.

value
value

The value of the variable.

Returns

This type describes the output values that are returned when a step is executed.

Step Output
stepOutput

Triggers

When a pre-defined event happened

Creates a new webhook for pre-defined callback content type event.

When a resource is published

Creates a new webhook for publish event.

When a resource is validated

Creates a new webhook for completion of any scoring event.

When a pre-defined event happened

Creates a new webhook for pre-defined callback content type event.

Parameters

Name Key Required Type Description
Callback content type
callbackContentType True string

Type of the callback content.

Callback content filter
callbackContentFilter string

Filter for the callback content.

Returns

The content of the generic callback.

Webhook Callback Generic
webhookCallbackGeneric

When a resource is published

Creates a new webhook for publish event.

Parameters

Name Key Required Type Description
Resource path prefix
resourcePath True string

Path of the resource in the folder.

Destination type
destinationType True string

Returns

The content of the callback publish. This represents application/vnd.sas.webhook.callback.publish media type (version 1).

Webhook Callback Publish
webhookCallbackPublish

When a resource is validated

Creates a new webhook for completion of any scoring event.

Parameters

Name Key Required Type Description
Resource path prefix
resourcePath True string

Path of the resource in the folder.

State
state True string

Returns

The content of the callback validate. This represents application/vnd.sas.webhook.callback.validate media type (version 1).

Webhook Callback Validate
webhookCallbackValidate

Definitions

anyVariableValue

The value of the variable.

The value of the variable.

stepOutput

This type describes the output values that are returned when a step is executed.

Name Path Type Description
moduleId
moduleId string

The identifier of the module that contains the executed step.

stepId
stepId string

The name of the step that produced this output.

outputs
outputs array of variable

The output values that are returned from an executed step. The order of the variables matches the order presented in the output signature.

variable

A name/value pair that represents an input or output variable.

Name Path Type Description
name string

Name of the variable.

value
value anyVariableValue

The value of the variable.

Name Path Type Description
href
href string

The URL for the link.

itemType
itemType string

If this is a link to a container, itemType is the media type or link type for the items in the container.

method
method string

The HTTP method for the link.

rel
rel string

The relationship of the link to the resource.

responseItemType
responseItemType string

The media type or link type of the items in the response body for a PUT, POST, or PATCH operation.

responseType
responseType string

The media type or link type of the response body for a PUT, POST, or PATCH operation.

title
title string

The title for the link.

type
type string

The media type or link type for the link.

uri
uri string

The relative URI for the link.

webhookCallbackValidate

The content of the callback validate. This represents application/vnd.sas.webhook.callback.validate media type (version 1).

Name Path Type Description
state
state string

State whether it is success or failure.

resourceUri
resourceUri string

Uri of the resource on which the validation is performed.

resourcePath
resourcePath string

Path of the resource in the folder.

resourceVersion
resourceVersion string

Version of the resource on which the validation is performed.

validationType
validationType string

Type of the validation that is performed on the resource.

links
links array of link

Zero or more links to related resources or operations.

version
version integer

This media type's schema version number. This representation is version 1.

webhookCallbackPublish

The content of the callback publish. This represents application/vnd.sas.webhook.callback.publish media type (version 1).

Name Path Type Description
resourceUri
resourceUri string

Uri of the resource which is published.

resourcePath
resourcePath string

Path of the resource in the folder.

resourceVersion
resourceVersion string

Version of the resource which is published.

destinationType
destinationType string

Type of the destination where the resource is published.

replace
replace boolean

Indicated whether the resource is published for the first time or replaced.

links
links array of link

Zero or more links to related resources or operations.

version
version integer

This media type's schema version number. This representation is version 1.

webhookCallbackGeneric

The content of the generic callback.

Name Path Type Description
links
links array of link

Zero or more links to related resources or operations.

version
version integer

This media type's schema version number. This representation is version 1.