web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Answered

How to hide publish button in real time journey

(2) ShareShare
ReportReport
Posted on by 4
I want to hide the publish button in real time journey on certain condition of segment and want to create the approval process for those journeys. Is there anyway to do? please assist me with the design. I tried looking up the publish button in the app design command bar, I am not able to find it. is this publish button a command button or something(PCF) else. 
I want to have a approval process for my journey when the segment met certain condition before publish, if its not met keep the out of box publish option available. please suggest me the design.
I have the same question (0)
  • Suggested answer
    Holly Huffman Profile Picture
    6,522 Super User 2025 Season 2 on at
    How to hide publish button in real time journey
     
    Hi there! Good morning, evening, or afternoon - depending on where you are :) Hope you are well today! 
     
    Hoping you've solved this already since I see its been a while since posted. If not, here are some thoughts: 
    Understanding the "Publish" Button
    • The "Publish" button in real-time journeys isn't exposed as a typical command in the application design. Instead, it's part of the underlying infrastructure of the Marketing app, so it won't appear in the command bar configuration directly.
    • Since you cannot directly modify this button using Power Apps Command Designer or PCF (PowerApps Component Framework), you'll need to use an alternative approach.
    • Design Solution
    • To achieve your goal, you can implement an approval process using Power Automate flows, custom plugins, and potentially a custom frontend workaround. Here's a step-by-step design idea:
    • 1. Custom Field for Segment Validation
      • Add a custom boolean field to your Journey entity, e.g., SegmentApprovalRequired.
      • Use this field to indicate whether the specific journey needs approval before publishing based on the segment condition.
    • 2. Approval Process with Power Automate
      • Use a Power Automate Flow triggered when the "Save" or "Save as Draft" option is selected.
      • The flow should:
        • Check the associated segment condition.
        • If the condition meets the "approval required" criteria, initiate an approval process (e.g., using the built-in Approval connector in Power Automate).
        • Once the approval is granted, update a custom "ApprovalStatus" field on the journey to indicate readiness for publishing.
    • 3. Restrict the "Publish" Action
      • Use a custom plugin on the Publish request for journeys.
      • In the plugin, check the "ApprovalStatus" and "SegmentApprovalRequired" fields. If the required conditions aren't met:
        • Throw a meaningful error message (e.g., "This journey requires approval before publishing").
        • Prevent the journey from being published.
    • 4. Alternative Frontend Workaround
      • If hiding the "Publish" button is critical, consider creating a custom canvas app or model-driven app interface for managing journeys.
      • Replace the default real-time journey management interface with your custom app.
      • In the custom app, conditionally display or disable the "Publish" button based on the journey's "ApprovalStatus" and "SegmentApprovalRequired" values.
    • 5. Provide Default Publish Option
      • For journeys that do not require approval, allow the out-of-the-box publish functionality to work as usual. This can be achieved by allowing the "ApprovalStatus" field to default to "Approved" for these journeys.
    • Additional Notes
      • Security Roles: Ensure that only specific users or roles can approve journeys or override the publishing restrictions.
      • Testing: Test thoroughly in a sandbox environment to ensure the customizations work seamlessly without impacting other Marketing features.
      • Documentation: Document the solution for future updates and maintenance.
  • Verified answer
    Daivat Vartak (v-9davar) Profile Picture
    7,833 Super User 2025 Season 2 on at
    How to hide publish button in real time journey
    Hello CU12030236-0,
     

    You've hit on a significant challenge in Dynamics 365 Customer Insights - Journeys (Real-Time Marketing): directly hiding the "Publish" button or creating a custom approval process based on segment conditions is not a straightforward task using the out-of-the-box command bar editor.

    Understanding the Limitations:

    • Real-Time Journey Architecture:

      • Real-Time Journeys are built on a modern, component-based architecture.
      • The "Publish" button is not a standard command bar button that you can easily modify through the traditional command bar editor.
      • It is part of the Real-Time Journey's core UI and rendering logic. 

    • Lack of Direct Customization:

      • Microsoft does not currently provide a supported way to directly customize the "Publish" button's visibility or behavior based on segment conditions. 


    •  

    Recommended Design and Workarounds:

    Given the limitations, here's a design that leverages Power Automate and alternative approaches to achieve your approval process:

    Design:

    1. Status Field for Approval:

      • Add a custom "Approval Status" (or similar) option set field to the msdynmkt_customerjourney entity.
      • Options: "Draft," "Pending Approval," "Approved," "Rejected." 

    2. Power Automate Approval Flow:

      • Create a Power Automate flow that triggers when the "Approval Status" field is changed to "Pending Approval."

      • In the flow:

        • Retrieve the associated segment data.
        • Evaluate the segment conditions.

        • If the conditions are met:

          • Start an approval process (using the "Start and wait for an approval" action).
          • Upon approval, update the "Approval Status" to "Approved."
          • Upon rejection, update the "Approval Status" to "Rejected." 

        • If the conditions are not met:

          • Update the "Approval status" to rejected, and sent a notification to the user. 
           

    3. Modified Publishing Process:

      • Instruct users to:

        • Create their Real-Time Journey.
        • Set the "Approval Status" to "Pending Approval."
        • The Power Automate flow will then handle the approval process. 

      • Only when the “Approval Status” is set to “Approved” the user will be able to publish the journey. 

    4. Client-Side Validation (Limited):

      • You can add client-side JavaScript to the Real-Time journey form, that will validate the “Approval Status” field, and if it is not set to approved, it will display a message to the user, that the journey can not be published. This will not prevent the user from publishing, but will give the user a warning.

      •  

    5.  

    Implementation Steps:

    1. Create the Custom Field:

      • Customize the msdynmkt_customerjourney entity and add the "Approval Status" field. 

    2. Build the Power Automate Flow:

      • Create a new automated cloud flow.
      • Use the "When a row is added, modified or deleted" trigger (Dataverse connector).
      • Set the trigger to run on the msdynmkt_customerjourney entity, when the "Approval Status" field is modified.
      • Add a condition to check if the "Approval Status" is "Pending Approval."
      • Add actions to retrieve segment data and evaluate conditions.
      • Add the "Start and wait for an approval" action.
      • Add actions to update the "Approval Status" based on the approval outcome.
      • Add condition to check if the conditions are met, if not set the approval status to rejected, and send a notification. 

    3. Client-Side JavaScript (Optional):

      • Add a Javascript web resource to the Real Time Journey form.
      • Add Javascript code to validate the “Approval Status” field, and display a warning message to the user.

      •  

    4.  

    Key Considerations:

    • User Training:

      • Provide clear instructions to users on the new approval process. 

    • Error Handling:

      • Implement robust error handling in your Power Automate flow. 

    • Performance:

      • Consider the performance impact of your Power Automate flow, especially for complex segment conditions. 

    • Security:

      • Ensure that only authorized users can approve journeys. 


    •  

    Important Notes:

    • Directly modifying the "Publish" button is not supported.
    • This approach relies on a combination of Power Automate and user education.


    •  

    By implementing this design, you can create a robust approval process for your Real-Time Journeys, even with the current limitations.

     
    If my answer was helpful, please click Like, and if it solved your problem, please mark it as verified to help other community members find more. If you have further questions, please feel free to contact me.
     
    My response was crafted with AI assistance and tailored to provide detailed and actionable guidance for your Microsoft Dynamics 365 query.
     
    Regards,
    Daivat Vartak

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Rishabh Kanaskar Profile Picture

Rishabh Kanaskar 149

#2
MVP-Daniyal Khaleel Profile Picture

MVP-Daniyal Khaleel 142

#3
Tom_Gioielli Profile Picture

Tom_Gioielli 125 Super User 2025 Season 2

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans