Add Step Choice¶
POST /rest/asset/v1/smartCampaign/{id}/flow/{stepId}/addChoice.json
Method: POST
Path: /rest/asset/v1/smartCampaign/{id}/flow/{stepId}/addChoice.json
Tag: Smart Campaigns
Operation ID: addSmartCampaignFlowStepChoiceUsingPOST
Adds a choice to an existing flow step. All form parameters are optional; use the Update Flow Step Choice endpoint to configure the choice condition and values afterward. Required Permissions: Read-Write Assets
Formats¶
- Request:
application/x-www-form-urlencoded - Response:
application/json
Request¶
Path parameters¶
| Name | Type | Required | Description | Constraints |
|---|---|---|---|---|
id |
integer (int32) | Yes | Id of the smart campaign | |
stepId |
integer (int32) | Yes | Id of the flow step |
Form-data parameters¶
| Name | Type | Required | Description | Constraints |
|---|---|---|---|---|
operator |
string | No | Condition operator | |
value |
integer (int32) | No | Condition value | |
attributeId.id |
integer (int32) | No | Id of the attribute | |
attributeId.type |
string | No | Type of the attribute | enum: activity, attribute |
ruleTypeId.id |
integer (int32) | No | Id of the rule type | |
ruleTypeId.type |
string | No | Type of the rule type | enum: activity, attribute |
ruleValues |
string | No | JSON object of rule values |
Example request¶
POST {{base_url}}/rest/asset/v1/smartCampaign/{{id}}/flow/{{stepId}}/addChoice.json
Content-Type: application/x-www-form-urlencoded
Accept: application/json
operator={{operator}}
value={{value}}
attributeId.id={{attributeId.id}}
attributeId.type=activity
ruleTypeId.id={{ruleTypeId.id}}
ruleTypeId.type=activity
ruleValues={{ruleValues}}
Responses¶
200 — OK¶
Schema: model: ResponseOfSmartCampaignFlowMutationResponse
Generated example¶
{
"errors": [
{
"code": "string",
"message": "string"
}
],
"requestId": "123",
"result": [
{
"id": 123,
"name": "Example name",
"flow": {
"steps": [
{
"id": 123,
"activityTypeId": 123,
"activityTypeName": "Example name",
"stepChoice": [
null
]
}
]
}
}
],
"success": true,
"warnings": [
"string"
]
}
Referenced models¶
Source¶
Generated from swagger-asset.json.
Generated examples are inferred from the schema. They are illustrative and may not be valid production payloads.