Feed-based decisioning

AI Tools

Davinci Commerce Programmable Personalization API exposes the lists and details of Feed used by the platform. Feed based Decisioning is a dynamic expression which is built upon a single or multiple asset sources and allows the user to query the asset sources where the result of the said query can be used as a Feed based Decisioning value in the decision graph.

Methods

Action

Method Type

Description

Create Feed Based Decisioning

POST

Creates feed based decisioning expression using single or multiple assets with a configuration object specifying conditions, filters and joins to be applied on the asset sources, returning a unique identifier for the expression.

List all the Feed Based Decisioning for an account

GET

Lists all the feed based decisioning expressions created under an account.

Get Feed Based Decisioning for an expression id

GET

Lists a single feed based decisioning expression corresponding to an expression ID, which is the unique identifier for the expression.

GET configuration for Feed Based Decisioning

GET

Provides the configuration object that consists of conditions, filters and joins to be applied on the asset sources that are being used in an expression for a given expression ID, which is the unique identifier for the expression.

Update Feed Based Decisioning

PUT

Updates feed based decisioning expression using single or multiple assets with a configuration object specifying conditions, filters and joins to be applied on the asset sources, returning a unique identifier for the expression.

Save Feed Based Decisioning for a campaign

POST

This API associates a feed based decisioning expression with a campaign for a given expression ID and Campaign ID.

Fetch preview for Feed Based Decisioning

POST

Returns preview of the queried result from asset sources with the drafted feed based decisioning expression applied before saving the expression

Save preview for Feed Based Decisioning

POST

Saves the draft of feed based expression

Get campaigns for Feed Based Decisioning

GET

Lists all the campaigns that are associated with the given feed based decisioning expression

Get expressions associated with an asset source

GET

Lists all the feed based decisioning expressions that are using the given asset source for decisioning.

Create Feed Based Decisioning

Parameters

Name

Data Type

Requirement

Parameter Type

Description

accountId

string

Mandatory

path

ID of the advertiser account created on the platform.

Sample Request

POST http://demo.stub.api.jivox.com/v2/accounts/:accountId/smartlist

Request Body

{ "expName": "string", "campaignId: "integer", "typeColumn": "SINGLE_COLUMN / ADVANCED", "configuration": { "version": "v1", "assetSources": [ { "dataServiceId": < dataServiceId >, "staticFilter": { "conditions": [ { "id" : "String" "operator": "< AND / OR / NOT >", "selectors": [ { "id" : "String" "colName": "< colName >", "comparator": "< relationalOperator / in / contains >", "value": "<>" } ], "conditions": [] } ] }, "dynamicFilter": "< colName >" }, { "dataServiceId": < dataServiceId >, "staticFilter": { "conditions": [ { "id" : "String" "operator": "< AND / OR / NOT >", "selectors": [ { "id" : "String" "colName": "< colName >", "comparator": "< relationalOperator / in / contains >", "value": "<>" } ], "conditions": [] } ] }, "join": { "srcDataServiceId": < dataServiceId >, "srcColName": "< colName >", "destColName": "< colName >" } } ] } }

Sample Response

{ "expressionId" : Integer } On Failed creation => { "errorMsg": “String”, "reason": “String”, "statusCode": <Status Code> }

List Feed Based Decisioning for an account

Parameters

Name

Data Type

Requirement

Parameter Type

Description

accountId

string

Mandatory

path

ID of the advertiser account created on the platform.

Sample Request

GET http://demo.stub.api.jivox.com/v2/accounts/:accountId/smartlist

Sample Response

{ "expressions" : [ { "id" : Int, "name" : "String", "typeColumn" : "String" }, { "id" : Int, "name" : "String", "typeColumn" : "String" } ] } OR { "errorMsg": “String”, "reason": “String”, "statusCode": <Status Code> }

Get Feed Based Decisioning for an Expression ID

Parameters

Name

Data Type

Requirement

Parameter Type

Description

accountId

string

Mandatory

path

ID of the advertiser account created on the platform.

expressionId

string

Mandatory

path

Unique ID assigned to the feed based decision expression.

Sample Request

GET http://demo.stub.api.jivox.com/v2/accounts/:accountId/smartlist/:expressionId

Sample Response

{ "id": Int, "name": "String", "typeColumn": "String" }

GET Configuration for Feed Based Decisioning

Parameters

Name

Data Type

Requirement

Parameter Type

Description

accountId

string

Mandatory

path

ID of the advertiser account created on the platform.

expressionId

string

Mandatory

path

Unique ID assigned to the feed based decision expression.

Sample Request

GET http://demo.stub.api.jivox.com/v2/accounts/:accountId/smartlist/:expressionId/configuration

Sample Response

{ "status" : String, "configuration": { "version" : "<v1>", "assetSources": [ { "dataServiceId": < dataServiceId >, "staticFilter": { "conditions": [ { "operator": "< all / any / none >", "selectors": [ { "colName": "< colName >", "comparator": "< relationalOperator / in / contains >", "value": "<>" } ], "conditions": [] } ] }, "dynamicFilter": "< colName >", "join": { "srcDataServiceId": < dataServiceId >, "srcColName": "< colName >", "destColName": "< colName >" } } ] } } OR { "errorMsg": “String”, "reason": “String”, "statusCode": <Status Code> }

Update Feed Based Decisioning

Parameters

Name

Data Type

Requirement

Parameter Type

Description

accountId

string

Mandatory

path

ID of the advertiser account created on the platform.

expression Id

string

Mandatory

path

Unique ID assigned to the feed based decision expression.

Sample Request

PUT http://demo.stub.api.jivox.com/v2/accounts/:accountId/smartlist/:expressionId

Query Parameters

isPreview=true : 4

i) Optional query param with default value as false

ii) True when a preview needs to be saved as final smartlist expression

Request Body

{ "expName": "string", "campaignId: "integer", "typeColumn": "SINGLE_COLUMN / ADVANCED", "configuration": {} }

Sample Response

{ "expressionId" : Integer } On Failed Update => { "errorMsg": “String”, "reason": “String”, "statusCode": <Status Code> }

Save Feed Based Decisioning for a Campaign

Parameters

Name

Data Type

Requirement

Parameter Type

Description

accountId

string

Mandatory

path

ID of the advertiser account created on the platform.

expression Id

string

Mandatory

path

Unique ID assigned to the feed based decision expression.

campaignId

string

Mandatory

path

ID of the campaign created under a given user account on the platform.

Sample Request

POST http://demo.stub.api.jivox.com/v2/accounts/:accountId/smartlist/:expressionId/campaign/:campaignId

Sample Response

{ "expressionId": Int } OR { "errorMsg": “String”, "reason": “String”, "statusCode": <Status Code> }

Fetch preview of Feed Based Decisioning

Parameters

Name

Data Type

Requirement

Parameter Type

Description

accountId

string

Mandatory

path

ID of the advertiser account created on the platform.

expression Id

string

Mandatory

path

Unique ID assigned to the feed based decision expression.

Sample Request

POST http://demo.stub.api.jivox.com/v2/accounts/:accountId/smartlist/:expressionId/getPreview/

Request Body

{ "key": "String", "assetSources": [ { "dataServiceId": Integer, "columns": [ "String" ] }, { "dataServiceId": Integer, "columns": [ "String" ] } ], "isPreview": Boolean (Default - false) }

Sample Response

{ "headers": [ "String", // "DataServiceId:ColumnName" "String", "String" ], "records": [ [ "String", "String", "String" ], [ "String", "String", "String" ] ] }

Save preview of Feed Based Decisioning

Parameters

Name

Data Type

Requirement

Parameter Type

Description

accountId

string

Mandatory

path

ID of the advertiser account created on the platform.

expression Id

string

Mandatory

path

Unique ID assigned to the feed based decision expression.

Sample Request

POST http://demo.stub.api.jivox.com/v2/accounts/:accountId/smartlist/:expressionId/preview

Request Body

{ "expName": "string", "campaignId: "integer", "typeColumn": "SINGLE_COLUMN / ADVANCED", "configuration": { "version": "v1", "assetSources": [ { "dataServiceId": < dataServiceId >, "staticFilter": { "conditions": [ { "id" : "String" "operator": "< AND / OR / NOT >", "selectors": [ { "id" : "String" "colName": "< colName >", "comparator": "< relationalOperator / in / contains >", "value": "<>" } ], "conditions": [] } ] }, "dynamicFilter": "< colName >", "join": { "srcDataServiceId": < dataServiceId >, "srcColName": "< colName >", "destColName": "< colName >" } } ] } }

Sample Response

{ "previewId" : Integer } On Failed creation => { "errorMsg": “String”, "reason": “String”, "statusCode": <Status Code> }

Get Campaigns for Feed Based Decisioning

Parameters

Name

Data Type

Requirement

Parameter Type

Description

accountId

string

Mandatory

path

ID of the advertiser account created on the platform.

expression Id

string

Mandatory

path

Unique ID assigned to the feed based decision expression.

Sample Request

GET http://demo.stub.api.jivox.com/v2/accounts/:accountId/smartlist/:expressionId/campaigns

Sample Response

{ "campaigns": [ { "id": Int, "title": "String", "expressions": [ { "id": Int, "name": "String", "typeColumn": "String" }, { "id": Int, "name": "String", "typeColumn": "String" } ] } ] } OR { "errorMsg": “String”, "reason": “String”, "statusCode": <Status Code> }

Get expressions associated with an Asset Source

Parameters

Name

Data Type

Requirement

Parameter Type

Description

accountId

string

Mandatory

path

ID of the advertiser account created on the platform.

dataService Id

string

Mandatory

path

It is a unique identifier for asset sources.

Sample Request

GET http://demo.stub.api.jivox.com/v2/accounts/:accountId/smartlist/asset-sources/:dataServiceId/expressions

Sample Response

{ "campaigns": [ { "id": Int, "title": "String", "expressions": [ { "id": Int, "name": "String", "typeColumn": "String" }, { "id": Int, "name": "String", "typeColumn": "String" } ] } ] } OR { "errorMsg": “String”, "reason": “String”, "statusCode": <Status Code> }