Salesforce Experience Cloud · Arazzo Workflow

Salesforce Experience Cloud CMS Content Publish

Version 1.0.0

Create a CMS content item, read it back, then publish it to channels.

1 workflow 1 source API 1 provider
View Spec View on GitHub CMSCommunitiesCRMCustomer PortalDigital ExperienceExperience CloudPartner PortalArazzoWorkflows

Provider

salesforce-experience-cloud

Workflows

cms-content-publish
Author a CMS content item and publish it to channels.
Creates a CMS content item, reads it back to confirm its draft status, and publishes it to the supplied channel IDs.
3 steps inputs: accessToken, channelIds, contentBody, contentType, language, title outputs: contentKey, managedContentId
1
createContent
createCmsContent
Create a new CMS content item with the supplied title, type, and body.
2
getContent
getCmsContent
Read the content item back to confirm its draft status before publishing.
3
publishContent
publishCmsContent
Publish the content item to the supplied delivery channels.

Source API Descriptions

Arazzo Workflow Specification

salesforce-experience-cloud-cms-content-publish-workflow.yml Raw ↑
arazzo: 1.0.1
info:
  title: Salesforce Experience Cloud CMS Content Publish
  summary: Create a CMS content item, read it back, then publish it to channels.
  description: >-
    A content authoring and delivery flow for Experience Cloud. The workflow
    creates a CMS content item of a given content type, reads it back to confirm
    its draft state, then publishes it to one or more delivery channels so it is
    available for delivery. Each step spells out its request inline so the flow
    can be read and executed without opening the underlying OpenAPI description.
  version: 1.0.0
sourceDescriptions:
- name: cmsConnectApi
  url: ../openapi/salesforce-experience-cloud-cms-connect-openapi.yml
  type: openapi
workflows:
- workflowId: cms-content-publish
  summary: Author a CMS content item and publish it to channels.
  description: >-
    Creates a CMS content item, reads it back to confirm its draft status, and
    publishes it to the supplied channel IDs.
  inputs:
    type: object
    required:
    - accessToken
    - title
    - contentType
    - channelIds
    properties:
      accessToken:
        type: string
        description: OAuth 2.0 bearer token for the Salesforce instance.
      title:
        type: string
        description: Title for the new content item.
      contentType:
        type: string
        description: Developer name of the content type.
      language:
        type: string
        description: Language code for the content (e.g. en_US).
      contentBody:
        type: object
        description: Content body fields as defined by the content type.
      channelIds:
        type: array
        description: Channel IDs to publish the content to.
        items:
          type: string
  steps:
  - stepId: createContent
    description: Create a new CMS content item with the supplied title, type, and body.
    operationId: createCmsContent
    parameters:
    - name: Authorization
      in: header
      value: Bearer $inputs.accessToken
    requestBody:
      contentType: application/json
      payload:
        title: $inputs.title
        contentType: $inputs.contentType
        language: $inputs.language
        contentBody: $inputs.contentBody
    successCriteria:
    - condition: $statusCode == 201
    outputs:
      contentKey: $response.body#/contentKey
      managedContentId: $response.body#/managedContentId
  - stepId: getContent
    description: Read the content item back to confirm its draft status before publishing.
    operationId: getCmsContent
    parameters:
    - name: Authorization
      in: header
      value: Bearer $inputs.accessToken
    - name: contentId
      in: path
      value: $steps.createContent.outputs.managedContentId
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      status: $response.body#/status
  - stepId: publishContent
    description: Publish the content item to the supplied delivery channels.
    operationId: publishCmsContent
    parameters:
    - name: Authorization
      in: header
      value: Bearer $inputs.accessToken
    - name: contentId
      in: path
      value: $steps.createContent.outputs.managedContentId
    requestBody:
      contentType: application/json
      payload:
        channelIds: $inputs.channelIds
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      managedContentId: $steps.createContent.outputs.managedContentId
  outputs:
    contentKey: $steps.createContent.outputs.contentKey
    managedContentId: $steps.createContent.outputs.managedContentId