BulkWorkflowStage
BulkWorkflowStage
BulkWorkflowStage holds the new workflow details of a bulk workflow update: the target stage, a comment, a due date, the notification flag, and the assignees. Assign it to BulkWorkflowUpdateBody.Workflow before you call the Update method.
When to Use This Class: Use this class to set the stage and the assignment details that every entry in a bulk workflow update receives.
Conceptual Role: Acts as the workflow object in the request body.
Returns: BulkWorkflowStage. The workflow details of a bulk update.
Properties
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| Uid | string? | No | null | UID of the target workflow stage. Serialized as uid. |
| Comment | string? | No | null | Comment for the assigned users. Serialized as comment. |
| DueDate | string? | No | null | Due date as text. Serialized as due_date. |
| Notify | bool | No | false | Notifies the assignees when true. Serialized as notify. |
| AssignedTo | List<BulkWorkflowUser>? | No | null | Users to assign. Serialized as assigned_to. See BulkWorkflowUser. |
| AssignedByRoles | List<BulkWorkflowRole>? | No | null | Roles to assign. Serialized as assigned_by_roles. See BulkWorkflowRole. |
Class-Level Notes
Serialization.
- The SDK serializes the model with System.Text.Json and leaves out every property that is null. The SDK does not check the values.
Value-type properties.
- Notify is a bool, so the SDK always sends it. A model where you do not set it sends false.
Due date format.
- DueDate is a string, and the SDK sends it without changes or checks.
Method Index
BulkWorkflowStage has no methods. Set its properties and pass it as shown in the Class-Level Snippet below.
Class-Level Snippet
The snippet below sets every workflow detail on a bulk workflow update.
using System;
using System.Collections.Generic;
using Contentstack.Management.Core;
using Contentstack.Management.Core.Exceptions;
using Contentstack.Management.Core.Models;
ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
BulkWorkflowUpdateBody body = new BulkWorkflowUpdateBody()
{
Entries = new List<BulkWorkflowEntry>
{
new BulkWorkflowEntry() { Uid = "<ENTRY_UID>", ContentType = "<CONTENT_TYPE_UID>", Locale = "<LOCALE_CODE>" }
},
Workflow = new BulkWorkflowStage()
{
Uid = "<WORKFLOW_STAGE_UID>",
Comment = "Ready for legal review",
DueDate = "Thu Dec 10 2026",
Notify = true,
AssignedTo = new List<BulkWorkflowUser>
{
new BulkWorkflowUser() { Uid = "<USER_UID>", Name = "Alex Morgan", Email = "<EMAIL>" }
},
AssignedByRoles = new List<BulkWorkflowRole>
{
new BulkWorkflowRole() { Uid = "<ROLE_UID>", Name = "Legal Reviewer" }
}
}
};
try
{
ContentstackResponse response = client.Stack("<API_KEY>").BulkOperation().Update(body);
Console.WriteLine(response.OpenJsonObjectResponse().ToJsonString());
}
catch (ContentstackErrorException e)
{
// Thrown when the API rejects the request
Console.WriteLine($"Request failed: {(int)e.StatusCode} {e.ErrorCode} {e.ErrorMessage}");
}