younifyd
Menu

Get Ruleset

Get ruleset

GET/v1/applications/{applicationId}/campaigns/{campaignId}/rulesets/{rulesetId}

Use it in a workflow

  1. Add a step and choose the Talon.One connector.
  2. Pick the Get Ruleset action (under management).
  3. Fill in the fields below, then reference the result from later steps as {{getRuleset.response.data}}.

Request

Path parameters

applicationIdinteger (int64)required

The ID of the Application. It is displayed in your Talon.One deployment URL.

campaignIdinteger (int64)required

The ID of the campaign. It is displayed in your Talon.One deployment URL.

rulesetIdinteger (int64)required

The ID of the ruleset.

Response

Returns 200 with an object. Read it in later steps with {{getRuleset.response.data.<field>}}.

idinteger (int64)

The internal ID of this entity.

createdstring (date-time)

The time this entity was created.

userIdinteger (int64)

The ID of the user associated with this entity.

rulesarray<object>

Set of rules to apply.

idstring (uuid)

A unique identifier for the rule.

parentIdstring (uuid)

The ID of the rule that was copied to create this rule.

titlestringrequired

A short description of the rule.

descriptionstring

A longer, more detailed description of the rule.

bindingsarray<object>8 fields

An array that provides objects with variable names (name) and talang expressions to whose result they are bound (expression) during rule evaluation. The order of the evaluation is decided by the position in the array.

conditionarray<object>required

A Talang expression that will be evaluated in the context of the given event.

effectsarray<object>required

An array of effectful Talang expressions in arrays that will be evaluated when a rule matches.

strikethroughRulesarray<object>

Set of rules to apply for strikethrough.

idstring (uuid)

A unique identifier for the rule.

parentIdstring (uuid)

The ID of the rule that was copied to create this rule.

titlestringrequired

A short description of the rule.

descriptionstring

A longer, more detailed description of the rule.

bindingsarray<object>8 fields

An array that provides objects with variable names (name) and talang expressions to whose result they are bound (expression) during rule evaluation. The order of the evaluation is decided by the position in the array.

conditionarray<object>required

A Talang expression that will be evaluated in the context of the given event.

effectsarray<object>required

An array of effectful Talang expressions in arrays that will be evaluated when a rule matches.

bindingsarray<object>

An array that provides objects with variable names (name) and talang expressions to whose result they are bound (expression) during rule evaluation. The order of the evaluation is decided by the position in the array.

namestringrequired

A descriptive name for the value to be bound.

typestring

The kind of binding. Possible values are: - `bundle` - `cartItemFilter` - `subledgerBalance` - `templateParameter`

expressionarray<object>required

A Talang expression that will be evaluated and its result attached to the name of the binding.

valueTypestring

Can be one of the following: - `string` - `number` - `boolean`

minValuenumber

The minimum value allowed for this placeholder.

maxValuenumber

The maximum value allowed for this placeholder.

attributeIdinteger (int64)

Id of the attribute attached to the placeholder.

descriptionstring

Describes the placeholder field and value in the template. This description can be used when creating campaigns from this template.

rbVersionstring

The version of the rulebuilder used to create this ruleset.

activateboolean

Indicates whether this created ruleset should be activated for the campaign that owns it.

campaignIdinteger (int64)

The ID of the campaign that owns this entity.

templateIdinteger (int64)

The ID of the campaign template that owns this entity.

activatedAtstring (date-time)

Timestamp indicating when this Ruleset was activated.

json
{
  "id": 6,
  "created": {},
  "userId": 388,
  "rules": [
    {
      "condition": [
        "and",
        [
          "couponValid"
        ]
      ],
      "effects": [
        "catch",
        [
          "noop"
        ],
        [
          "setDiscount",
          "10% off",
          [
            "*",
            [
              ".",
              "Session",
              "Total"
            ],
            [
              "/",
              10,
              100
            ]
          ]
        ]
      ],
      "bindings": [
        {
          "attributeId": 100,
          "minValue": 0,
          "expression": [
            "string1",
            "string2"
          ],
          "maxValue": 19.9,
          "valueType": "string",
          "name": "my property",
          "description": "This is a template parameter of type `number`.",
          "type": "templateParameter"
        },
        {
          "attributeId": 100,
          "minValue": 0,
          "expression": [
            "string1",
            "string2"
          ],
          "maxValue": 19.9,
          "valueType": "string",
          "name": "my property",
          "description": "This is a template parameter of type `number`.",
          "type": "templateParameter"
        }
      ],
      "description": "Creates a discount when a coupon is valid",
      "id": "7fa800a8-ac8d-4792-85dc-c4650dcc8f23",
      "title": "Give discount via coupon",
      "parentId": "7fa800a8-ac8d-4792-85dc-c4650dcc8f23"
    }
  ],
  "bindings": [],
  "strikethroughRules": [
    {
      "condition": [
        "and",
        [
          "couponValid"
        ]
      ],
      "effects": [
        "catch",
        [
          "noop"
        ],
        [
          "setDiscount",
          "10% off",
          [
            "*",
            [
              ".",
              "Session",
              "Total"
            ],
            [
              "/",
              10,
              100
            ]
          ]
        ]
      ],
      "bindings": [
        {
          "attributeId": 100,
          "minValue": 0,
          "expression": [
            "string1",
            "string2"
          ],
          "maxValue": 19.9,
          "valueType": "string",
          "name": "my property",
          "description": "This is a template parameter of type `number`.",
          "type": "templateParameter"
        },
        {
          "attributeId": 100,
          "minValue": 0,
          "expression": [
            "string1",
            "string2"
          ],
          "maxValue": 19.9,
          "valueType": "string",
          "name": "my property",
          "description": "This is a template parameter of type `number`.",
          "type": "templateParameter"
        }
      ],
      "description": "Creates a discount when a coupon is valid",
      "id": "7fa800a8-ac8d-4792-85dc-c4650dcc8f23",
      "title": "Give discount via coupon",
      "parentId": "7fa800a8-ac8d-4792-85dc-c4650dcc8f23"
    }
  ],
  "rbVersion": "v2",
  "activate": true,
  "campaignId": 320,
  "templateId": 3,
  "activatedAt": "2025-01-01T00:00:00Z"
}

Need more? See the Talon.One guide for connection setup and behaviour shared by every action.

Was this page helpful?