Press enter to see results or esc to cancel.

Connect Your Content Management System to Your Salesforce Community using CMS connect

You can connect your CMS content to your community for consistent branding, reuse of material, and ease of maintenance. There are so many CMS available outside in the market. The noted once are WordPress and Blogger. Today in this blog post we will check how to get the content from your CMS.

Famous Third party CMS:

  • Adobe Experience Manager
  • Drupal its show time
  • Google Blogger
  • Sitecore
  • WordPress etc..

What Is CMS Connect?

CMS Connect lets you embed assets from a third-party CMS in your Salesforce community. You can connect CMS components, HTML, JSON, CSS, and JavaScript to customize your community.

Before using CMS Connect please go through below prerequisites.

https://help.salesforce.com/articleView?id=communities_cms_connect_prerequisites.htm&type=5

Keep in mind that all the above-mentioned points are taken care before you will start with CMS connect.

CMS Connect uses Cross-Origin Resource Sharing (CORS) to access external content. Make sure to add Community Host to the list of trusted hosts in the CORS header in your CMS system.

This means that you need to set up your blog in the CORS section in Setup.

  1. To do this go to Setup – Security Controls – CORS or you can go to Setup and search for CORS in the quick find.
  2. Click the New button
  3. Enter your blog domain. You can either enter the domain itself or use a wildcard if you have a subdomain.
    For this blog post, I have taken https://shrutisridharan.wordpress.com WordPress site and added to CORS listCORS  Now its Show Time 😛

Integrate WordPress into Communities Using CMS Connect JSON:

  1. Open your Community–> Go to Community Builder–>Builder Icon( Top Left )–>CMS Connect.
  2. Click New CMS Connection Provide Name, CMS Source, Connection Type, Server URL, Add JSON as mentioned in the Screenshot below.
    New-CMS-Connection_1
    New-CMS-Connection_2
  3. Content Item:
    Name: Blog Item
    Path: rest/v1.1/sites/shrutisridharan.wordpress.com/posts/{component}
    ID Path: ID
    Title Path: title
  4. Content LIST:Name: Blog Feed
    Path: rest/v1.1/sites/shrutisridharan.wordpress.com/posts
    You can use extra query parameters to specify how many records you want to pull by giving ?number={itemsPerPage}
    To know more about query parameters go through WordPress documentation.
    Node Path: posts
  5. Click Save
    CMS-Connection-Create

Now its time to use newly created CMS Connection in our Community.

  1. Click on the Down Arrow on the right side of Connection–> Use In Builder
  2. From the components panel drag and drop CMS Connect(JSON) on to community builder space. Now when you click on the component you will see properties of the component

Select the properties as shown in the below screenshots.
CMS_JSON_PROPERTIES

CMS_JSON_PROPRTIES_2
wordpress-json-response

So observe here that I have mapped name field with @author/name as the JSON response is having the same way if we come from posts node. posts node is the part where we are getting all the content. Kindly note that I have provided value as “posts” in NODE PATH while setting value in CONTENT LIST.

  1. Click Save. BOOM!!!! Click On Read More link to view the content in your Community. Please check here
    Generated-Content-Using-CMS-Connect

Wordpress_CMS
Awesome!  Your community is now configured to display your WordPress blog posts.

Integrate Google Blogger into Communities Using CMS Connect JSON:

  1. Open your Community–> Go to Community Builder–>Builder Icon( Top Left )–>CMS Connect.
  2. Click New CMS Connection Provide Name, CMS Source, Connection Type, Server URL, Add JSON as mentioned in the Screenshot below.
    Blogger_CMS_Connect

    Blogger_CMS_Connection_2

  3. Content Item:
    Name: Blog Item
    Path: blogger/v3/blogs/1043722254592848650/posts/{component}?key=AIzaSyC9oDrfTGaI0zj7Xd1MYRpBX0LJW_VCpfc
    ID Path: id
    Title Path :  title
    Here 1043722254592848650 is Blog ID
  4. Content LIST:Name: Blog Feed
    Path: blogger/v3/blogs/1043722254592848650/posts?key=AIzaSyC9oDrfTGaI0zj7Xd1MYRpBX0LJW_VCpfc&fetchBodies=true&maxResults=50&fetchImages=true
    You can use extra query parameters to specify how many records you want to pull by giving maxResults=50
    To know more about query parameters go through Blogger documentation.
    Node Path: items
  5. Click Save

Now its time to use Blogger  CMS Connection in our Community.

  1. Click on the Down Arrow on the right side of Connection–> Use In Builder
  2. From the components panel drag and drop CMS Connect(JSON) on to community builder space. Now when you click on the component you will see properties of the component
  3. Select the properties as shown in the below screenshots.
    Blogger-Properties
    Blogger-Properties-2
    blogger-json-responseHere I gave query parameters to pull the image and didn’t get images to need to check that, observe that id is in small. We need to map those values exactly how they are present in the response.
    If you go and try here https://developers.google.com/blogger/docs/3.0/reference/posts/get still I am getting response and images also coming.
  4. Click Save. BOOM!!!! Click On Read More link to view the content in your Community. Please check here

Blogger_CMS

Final output

Blogger_CMS_live

There are other CMS system available you can try and connect with them.

Resources:

  1. https://help.salesforce.com/articleView?id=communities_cms_connect.htm&type=5
  2. https://developer.salesforce.com/docs/atlas.en-us.communities_dev.meta/communities_dev/communities_dev_cms_example_json.htm
  3. https://developer.salesforce.com/blogs/2018/06/integrate-external-content-into-communities-using-cms-connect-json.html

Let me know if you face any difficulties while implementing CMS Connect!! Cheers !!!