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:
- Setting up an Outbound Message to Markprompt
- Triggering the Outbound Message whenever a Salesforce Knowledge article is created or updated.
Setting up an Outbound Message transaction
- Log in to your Salesforce account and navigate to Setup
- Search for “Outbound Messages”. There will be two results, select the result in the Process Automation > Workflow Actions section.
- Click New Outbound Message.
- In the Object dropdown, select Knowledge.
- Click Next.
- Give the Outbound Message any Name, like Markprompt Knowledge Webhook. The Unique Name field will be auto-populated.
- 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. - For User to send as, you can leave it on the admin user, but Salesforce recommends creating a system user specifically for this purpose.
- Check Send Session ID.
- Under Knowledge fields to send, select LastPublishedDate and leave Id selected.
- Click Save.
See the Salesforce Documentation for up-to-date information on how to set up an Outbound Message transaction.
Creating a trigger workflow
- In the Salesforce App Launcher, search for Automation and open the Automation app.
- Click New.
- Select Start From Scratch and click Next.
- Select Record-Triggered Flow and click Create.
- In the right sidebar, under the Object dropdown, select Knowledge (
Knowledge__kav
). - Under Configure Trigger, select A record is created or updated.
- 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.
- Under Optimize the Flow for:, select Actions and Related Records.
- Click Save.
- Give the flow any memorable name, like Markprompt Knowledge Sync Trigger.
- 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.
- Select Action.
- In the Search Actions sidebar, search for the name of the Outbound Message transaction you created earlier, eg. Markprompt Knowledge Webhook and select it.
- Enter a Label for the action, like Send event to Markprompt.
- Click Save, then Activate.
- 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.