WorkflowKnowledgePublish defines a Salesforce Knowledge article publishing action for workflow automation. Its action value selects whether to publish an article as new or as a version of a previously published article. The definition is stored in the knowledgePublishes collection of object-scoped Workflow metadata.
This type is not the article content, and it is not the workflow rule that decides when publishing occurs. The publishing action and the configuration that invokes it are separate: defining an action does not establish that an active rule uses it.
Key Elements
| Element | What the Element Controls |
|---|---|
fullName |
The action's unique developer name for API access. It must begin with a letter, contain only alphanumeric characters and underscores, not end with an underscore, and not contain consecutive underscores. It is not a Knowledge article record ID. |
action |
Required publishing operation. PublishAsNew publishes the article as a new article. Publish publishes it as a version of a previously published article. |
label |
Required user-interface label, distinct from the API identifier in fullName. |
protected |
Required Boolean value. When true, components created in the installing organization cannot link to or reference this action. |
description |
A brief article description recorded with the publishing action. |
language |
The language of the article. |
Behavior and Constraints
PublishAsNew and Publish control the publishing operation only. Neither value activates a workflow rule or changes the conditions under which a rule is evaluated.
For workflow-rule use, the invoking WorkflowRule owns these settings:
-
activedetermines whether the rule is active. -
criteriaItemsorformulasupplies the conditions under which the rule fires. One of these must be set. -
triggerTypedetermines whether the rule is considered on creation, on all changes, or on creation and triggering updates.
A publishing action can therefore be present in retrieved Workflow metadata without an active rule invoking it. Changing the action's publishing operation does not change the rule's activation, criteria, or evaluation settings.
protected restricts metadata references in an installing organization, meaning an organization where a package is installed. When it is true, components created in that organization cannot reference the action. It does not control the article's audience or visibility.
Keep the action's identifiers separate from article data. fullName identifies the metadata action, while label supplies its user-interface label. Neither is a Knowledge article record ID.
Deployment and Retrieval
The action definition belongs to an object's Workflow container through knowledgePublishes. Metadata API workflow files use the .workflow suffix and reside in the workflows directory. There is one workflow file per standard or custom object that has workflow metadata.
To select an object's workflow metadata in package.xml, use Workflow as the type and the object's API name as the member. A member value of * with Workflow retrieves all workflow components. These container and retrieval conventions are described in the Workflow metadata reference.
Object-level deployment can cover more than the publishing action. The same Workflow container can include rules and other action types, so selecting the object can include changes to those components as well.
The action definition and its invoking configuration must be considered separately. A workflow rule identifies an action through the name element of a nested action reference, such as an entry in actions; name is not a top-level WorkflowRule field. Deploying a publishing definition does not, by itself, establish an active invocation.
Relationships
Workflow contains the publishing definition in knowledgePublishes. Other configurations can identify the action through name references. These references identify the publishing action, not the Knowledge article being published.
Referenced By
-
Workflow:knowledgePublishescontains the definitions;namein nested action references can identify an action. -
WorkflowRule:namein nested action references. -
EntitlementProcess:name.
Reported Issues
-
Object-level deployment can include workflow changes beyond the intended component. In a 2021 discussion about packaging a time-triggered email alert, the accepted answer recommended selecting the object's
Workflowmetadata to include its workflow subcomponents, but warned that this deploys all workflow metadata for that object. The answer listedWorkflowKnowledgePublishamong those subcomponents. This was a deployment-scope recommendation, not a report of a publishing-action failure. See the workflow manifest discussion.
Common Questions
What is the difference between Publish and PublishAsNew?
Publish publishes the article as a version of a previously published article. PublishAsNew publishes it as a new article. Neither setting controls workflow-rule activation or evaluation.
Why is my publishing action present but not running?
The action's presence does not establish that an active rule invokes it. For workflow-rule use, the invocation belongs to the rule's nested action references, while active, criteriaItems or formula, and triggerType control rule activation and evaluation.
Where is WorkflowKnowledgePublish stored during retrieval?
Its definition is in the knowledgePublishes collection of the object's Workflow metadata. Workflow files use the .workflow suffix in the workflows directory. Retrieving object-level workflow metadata can also return rules and other action types.
Does protected control who can read the Knowledge article?
No. protected controls whether components created in an installing organization can link to or reference the publishing action. It is not an article audience or visibility setting.
Is fullName a Knowledge article ID?
No. fullName is the publishing action's API identifier. It is distinct from the required user-interface label, and neither value is a Knowledge article record ID.