Webhooks

Learn how to set up webhooks from your data sources to automatically trigger updates when content chances.

Salesforce Knowledge

This guide will walk you through the process of setting up syncing changes in Salesforce Knowledge articles to Markprompt.

Prerequisites

  • A Salesforce account with administrator permissions.
  • A Markprompt project with a Salesforce Knowledge source connected.
  • The Markprompt project key for the project you want to sync to. You can find this in the project settings. Make sure to use the production key, not the test key.

Setup

Setting up Knowledge syncing involves two steps:

  1. Setting up an Outbound Message to Markprompt
  2. Triggering the Outbound Message whenever a Salesforce Knowledge article is created or updated.

Setting up an Outbound Message transaction

  1. Log in to your Salesforce account and navigate to Setup
  2. Search for "Outbound Messages". There will be two results, select the result in the Process Automation > Workflow Actions section.
  3. Click New Outbound Message.
  4. In the Object dropdown, select Knowledge.
  5. Click Next.
  6. Give the Outbound Message any Name, like Markprompt Knowledge Webhook. The Unique Name field will be auto-populated.
  7. In the Endpoint URL field, enter the URL of the Markprompt webhook endpoint: https://api.markprompt.com/webhooks/salesforce?projectKey=<YOUR_MARKPROMPT_PROJECT_KEY>. Replace <YOUR_MARKPROMPT_PROJECT_KEY> with the project key for the project you want to sync to.
  8. For User to send as, you can leave it on the admin user, but Salesforce recommends creating a system user specifically for this purpose.
  9. Check Send Session ID.
  10. Under Knowledge fields to send, select LastPublishedDate and leave Id selected.
  11. Click Save.

See the Salesforce Documentation for up-to-date information on how to set up an Outbound Message transaction.

Creating a trigger workflow

  1. In the Salesforce App Launcher, search for Automation and open the Automation app.
  2. Click New.
  3. Select Start From Scratch and click Next.
  4. Select Record-Triggered Flow and click Create.
  5. In the right sidebar, under the Object dropdown, select Knowledge (Knowledge__kav).
  6. Under Configure Trigger, select A record is created or updated.
  7. Under Set Entry Conditions, select the following conditions:
    • In the Condition Requirements dropdown, select Any Condition Is Met (OR).
    • For the first condition, select Article__Body__c in the Field field, Is Changed in the Operator field, and True in the Value field.
    • Click Add Condition and select Title in the Field field, Is Changed in the Operator field, and True in the Value field.
    • You can set up more fields here that you want to trigger the sync, such as LastModifiedDate, or the URL for the article.
  8. Under Optimize the Flow for:, select Actions and Related Records.
  9. Click Save.
  10. Give the flow any memorable name, like Markprompt Knowledge Sync Trigger.
  11. In the flow builder on the left, click the ⊕ that appears when you hover over the small white circle in the middle of the flow line.
  12. Select Action.
  13. In the Search Actions sidebar, search for the name of the Outbound Message transaction you created earlier, eg. Markprompt Knowledge Webhook and select it.
  14. Enter a Label for the action, like Send event to Markprompt.
  15. Click Save, then Activate.
  16. You have successfully set up the trigger workflow. Whenever a Salesforce Knowledge article is created or updated, the trigger will send an event to Markprompt and your content will be synced to the project you specified.