Use the CMS App to Create Content

Capricorn Coffee has five geographically dispersed content teams. With Salesforce CMS, they can create content within workspaces. They can also segment content, including by channel, by team, by department, by audience, and more. This empowers everyone on each content team to create relevant content and deliver it to any touchpoint – fast.

In this blog post, you’ll see the steps the developers at Capricorn Coffee took to bootstrap the CMS app and setup workspaces and create the content types that the content teams use. Then we’ll show you how Capricorn set up role-based access and channels and made workspaces available to content contributors. With Salesforce CMS ready, the content teams at Capricorn begin to create specific types of content and translate it for use in multiple languages.

Prerequisites

  • Lightning and B2B (visualforce) Communities must be enabled
  • To enable the CMS app, Visible must be selected for Salesforce CMS in the user profile in Setup AND Tab Settings for CMS Workspace must also be set to ‘Default On’ in order to view the Salesforce CMS app in App Launcher.
  • To create a CMS workspace and content and add contributors, User must be Content admin or Salesforce admin AND Visible is selected for Salesforce CMS in the user profile in Setup AND Create Content Workspace administrative permissions AND Access Libraries must be selected in the system permissions of the user profile.
  • To add channels, create and set up Communities AND Content admin or Salesforce admin.
  • To create Content Type, User must have Customize Application or Modify All Data user permission.

With permissions to view Salesforce App and create a CMS Workspace set as listed above, it’s time to bootstrap Salesforce CMS.

Steps

Step 0: Navigate to Salesforce CMS App – The Capricorn developer gets started by navigating to Salesforce CMS from Salesforce App Launcher. You can follow the steps she took below to create your own content types.

Step 1: Create content typesYou can use metadata or a tooling API to create a new content type. Content type defines the structure of content you create. These content types are global and are available across workspaces. Once created, you can create content based on these content types. This is an example of how the Capricorn developer created an Event content type. We will create content based on this content type later in this post.

The following tooling API endpoints are supported to manage content types:

* CREATE → /services/data/v47.0/tooling/sobjects/ManagedContentType/

* GET → /services/data/v47.0/tooling/sobjects/ManagedContentType/{your-contenttype-id}

* DELETE → /services/data/v47.0/tooling/sobjects/ManagedContentType/{your-contenttype-id}

Capricorn writes and publishes blog posts to engage customers. Let’s look at how Capricorn used endpoints to create the Blogs content type. You can follow these same steps to create your own content types.

Make a POST call,

/services/data/v47.0/tooling/sobjects/ManagedContentType/

with the following request body to create the Blogs content type:

{
  "Metadata" : {
    "description" : "Blogs for Capricorn Coffee",
    "developerName" : "Blogs",
    "managedContentNodeTypes" : [ {
      "helpText" : null,
      "isLocalizable" : true,
      "isRequired" : true,
      "nodeLabel" : "Blog Title",
      "nodeName" : "BlogTitle",
      "nodeType" : "NAMEFIELD",
      "placeholderText" : null
    }, {
      "helpText" : "Details",
      "isLocalizable" : true,
      "isRequired" : false,
      "nodeLabel" : "Blog Detail",
      "nodeName" : "BlogDetail",
      "nodeType" : "RTE",
      "placeholderText" : "Detailed description"
    }, {
      "helpText" : "Blog Image Main",
      "isLocalizable" : false,
      "isRequired" : true,
      "nodeLabel" : "Blog Main Image",
      "nodeName" : "BlogImageMain",
      "nodeType" : "IMG",
      "placeholderText" : "This is the main image for blogs"
    }, {
      "helpText" : "Blog Image Secondary",
      "isLocalizable" : false,
      "isRequired" : false,
      "nodeLabel" : "Blog Secondary Image",
      "nodeName" : "BlogSecondaryImage",
      "nodeType" : "IMG",
      "placeholderText" : "This is a secondary image for blogs"
    }, {
      "helpText" : "Category",
      "isLocalizable" : true,
      "isRequired" : false,
      "nodeLabel" : "Blog Category",
      "nodeName" : "BlogCategory",
      "nodeType" : "MTEXT",
      "placeholderText" : "Enter Category.."
      }, {
      "helpText" : "Flag",
      "isLocalizable" : true,
      "isRequired" : false,
      "nodeLabel" : "Blog Flag",
      "nodeName" : "BlogFlag",
      "nodeType" : "MTEXT",
      "placeholderText" : "Enter details to flag to users.."
       }, {
      "helpText" : "Action button text goes here",
      "isLocalizable" : true,
      "isRequired" : false,
      "nodeLabel" : "Action Text",
      "nodeName" : "ActionText",
      "nodeType" : "MTEXT",
      "placeholderText" : "Find out more, Act now or View More etc...."
    } ],
    "masterLabel" : "Blogs"
  },
  "FullName" : "Blogs"
}

The response of the POST request above:

{ "id" : "0T1xx000000003UCAQ",
  "success" : true,
  "errors" : [ ],
  "warnings" : [ ],
  "infos" : [ ]
}

After creating content type Blogs, you can use GET endpoint to retrieve the structure of the content type. Let’s say you want to retrieve the above created Blogs content type with id 0T1xx000000003UCAQ, you can use GET endpoint as follows:

GET Request:

/services/data/v47.0/tooling/sobjects/ManagedContentType/0T1xx000000003UCAQ

Response:

{
  "attributes" : {
    "type" : "ManagedContentType",
    "url" : "/services/data/v47.0/tooling/sobjects/ManagedContentType/0T1xx000000003UCAQ"
  },
  "Id" : "0T1xx000000003UCAQ",
  "IsDeleted" : false,
  "DeveloperName" : "Blogs",
  "Language" : "en_US",
  "MasterLabel" : "Blogs",
  "CreatedDate" : "2019-09-12T10:38:49.000+0000",
  "CreatedById" : "005xx000001SvE4AAK",
  "LastModifiedDate" : "2019-09-12T10:38:49.000+0000",
  "LastModifiedById" : "005xx000001SvE4AAK",
  "SystemModstamp" : "2019-09-12T10:38:49.000+0000",
  "Description" : "Blogs for Capricorn Coffee",
  "Metadata" : {
    "description" : "Blogs for Capricorn Coffee",
    "developerName" : "Blogs",
    "managedContentNodeTypes" : [ {
      "helpText" : null,
      "isLocalizable" : true,
      "isRequired" : true,
      "nodeLabel" : "Blog Title",
      "nodeName" : "BlogTitle",
      "nodeType" : "NAMEFIELD",
      "placeholderText" : null
    }, {
      "helpText" : "Details",
      "isLocalizable" : true,
      "isRequired" : false,
      "nodeLabel" : "Blog Detail",
      "nodeName" : "BlogDetail",
      "nodeType" : "RTE",
      "placeholderText" : "Detailed description"
    }, {
      "helpText" : "Blog Image Main",
      "isLocalizable" : false,
      "isRequired" : true,
      "nodeLabel" : "Blog Main Image",
      "nodeName" : "BlogImageMain",
      "nodeType" : "IMG",
      "placeholderText" : "This is the main image for blogs"
    }, {
      "helpText" : "Blog Image Secondary",
      "isLocalizable" : false,
      "isRequired" : false,
      "nodeLabel" : "Blog Secondary Image",
      "nodeName" : "BlogSecondaryImage",
      "nodeType" : "IMG",
      "placeholderText" : "This is a secondary image for blogs"
    }, {
      "helpText" : "Category",
      "isLocalizable" : true,
      "isRequired" : false,
      "nodeLabel" : "Blog Category",
      "nodeName" : "BlogCategory",
      "nodeType" : "MTEXT",
      "placeholderText" : "Enter Category.."
    }, {
      "helpText" : "Flag",
      "isLocalizable" : true,
      "isRequired" : false,
      "nodeLabel" : "Blog Flag",
      "nodeName" : "BlogFlag",
      "nodeType" : "MTEXT",
      "placeholderText" : "Enter details to flag to users.."
    }, {
      "helpText" : "Action button text goes here",
      "isLocalizable" : true,
      "isRequired" : false,
      "nodeLabel" : "Action Text",
      "nodeName" : "ActionText",
      "nodeType" : "MTEXT",
      "placeholderText" : "Find out more, Act now or View More etc...."
    } ],
    "masterLabel" : "Blogs",
    "urls" : null
  },
  "FullName" : "Blogs"
}

You can also use Translation Workbench to translate Node label of the content types.

A content type can be deleted if no content has been created based on that content type. Let’s say you want to delete Blogs content type with id 0T1xx000000003UCAQ, you can use DELETE endpoint as follows:

DELETE Request:

/services/data/v47.0/tooling/sobjects/ManagedContentType/0T1xx000000003UCAQ

Step 2: Workspace creation wizard – Creating a workspace is a way to organize your content in Salesforce CMS. Capricorn uses workspaces to organize its content. Content contributors have role-based access to the workspaces. We’ll share more on the roles later in this blog. Below, you can follow the steps Capricorn took to create workspaces.

Each workspace can have channels (one or more). Also, new contributors and channels for a workspace can be added later. Workspace creation is guided through a wizard, which helps you get started. To create a new Workspace, go to the CMS Workspace tab and click on “Add Workspace.”

Step 2a: Name/description – This is the first screen of the wizard. You can specify a meaningful name and description for your workspace. See the name and description Capricorn chose to support content about juices.

Step 2b: Add channels – In this screen, you can select channels from a list of communities (with which you would like to share the workspace).

If you are not sure which channels to select or you would like to add more channels later, you can make your selection later by drilling into a workspace and clicking the “Channels” button.


Step 2c: Add Contributors – In this screen, select contributors from an available list of users and public groups.

Step 2d: In the next screen, you can assign roles to the selected users and public groups from the following roles:

    1. Content Admin – This role allows the contributors to have access to all content in the CMS workspace along with the ability to create, edit, and publish content. In addition, they can also manage contributors and channels to which the content is published. Below, you see that Ashley McGuire is the Content Admin for Capricorn.
    2. Content Manager – This role allows the contributors to have full access to all content in the CMS workspace along with the ability to create, edit, and publish content. A group of users at Capricorn can manage content, as shown below.

You can also add and manage contributors in your workspace later by drilling into the workspace and clicking the “Contributors” button.


Step 2d: Language – In this screen, you can select a list of languages for translation for this workspace. Out of the selected languages, one language has to be selected as the default language of the workspace. When selecting languages, think of the languages you would like to support for your destinations. Below, Capricorn selected English and Italian for this CMS workspace. English is selected as the default language.

Step 2e: Final Screen – The final screen summarizes the selections completed in earlier steps. Review the selections and click the Done button. Your CMS Workspace is created.

After following the steps above, you are ready to create content. Let your contributors know that they can now contribute to the workspace. Contributors can see a list of all accessible workspaces when they navigate to Salesforce CMS app.

Step 3: Content creation – Now that you have created content types and created a workspace, your content creators are set to create content based on the types.

To create new content, drill into one of the workspaces and click Add Content.

If you have defined a content type, you will see a list of content types on which your content would be based. If not, you can create content on Default News type. Shown below, a content admin at Capricorn selects Blog content type to create content.


Complete all the fields. Each of the fields maps to layout features (we’ll address layouts in another post). While creating content you can save your work by clicking Save Draft. Once you’re done, you can chose to Publish the content. The published content will be delivered to all destinations when you click the Publish button. Below, a user at Capricorn creates a blog post about sustainable coffee.

Step 4: Translation – Before publishing content, you can mark the content as Ready For Translation. Once all the content needing translation has been marked as Ready for Translation, you can drill into the workspace and click on Export for Translation. You will receive an email in your inbox with an exported file in the XLIFF file format. This file includes all the content marked as Ready for Translation with all translatable nodes of the related version in their original language. Translate your content to supported languages, and then import the XLIFF file in the CMS workspace. Importing translated content is an asynchronous process. After successful import, you will receive an email in your inbox.

Both content admins and content managers can mark the content as Ready for Translation.


However, only a content admin can perform the export/import operation for translations.


After your translators localize the content, import the translated content. Your translated content can be viewed in the Translations tab. If you need to publish content in multiple languages, you can filter for the appropriate language in the dropdown menu.


Click Publish to make the content, along with its translation, available to your content destinations. You are now ready to curate collections in the Community workspace. After curating content and collections, you can use them in Community Builder to build digitally rich experiences for your customer.

Making changes to published content

A content manager at Capricorn wants to add some new facts to an existing blog post. No worries — all she needs to do is:

  1. Go to the content detail page for the content.
  2. Click Unpublish.
  3. Make the changes as desired.
  4. Publish the draft or publish it after importing the translated content.

 

Summary

After reviewing and following this blog post, you should be able to create workspaces and add contributors and destinations. Plus, you should be able to create content types and build content on these types. Ready to join the Capricorn team as they learn to curate content? Turn to the next blog post in the series.

Resources

Blog posts in this series

About the authors

Manish Kumar Jha
Manish is SMTS at Salesforce and is based out of Hyderabad, India. You can connect with Manish at LinkedIn.

Ishan Shrivastava
Ishan is SMTS at Salesforce and is based out of Hyderabad, India. You can connect with Ishan at LinkedIn.

Leave your comments...

Use the CMS App to Create Content