Last active
April 8, 2022 20:44
-
-
Save spencerkittleson/4e862c641bdd7921544a541525b0797c to your computer and use it in GitHub Desktop.
Link To Case
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script async="async" src="https://h7hbzrzw.mindtouch.es/@embed/acfe4e14b3108d82e03675e6b0bc9d22adaed60f156ad62a090e6c3e335211b0.js"></script> | |
<script type="mindtouch/embed" data-case-id="2" data-search-query="how" id="mindtouch-embed-acfe4e14b3108d82e03675e6b0bc9d22adaed60f156ad62a090e6c3e335211b0"></script> | |
Example of linking to case | |
https://h7hbzrzw.mindtouch.es/@embed/acfe4e14b3108d82e03675e6b0bc9d22adaed60f156ad62a090e6c3e335211b0.html?case-id=1 | |
?search-query=how | |
Window events: https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener | |
mindtouch-web-widget:salesforce:loaded | |
mindtouch-web-widget:salesforce:case-unlinked | |
mindtouch-web-widget:salesforce:case-linked | |
mindtouch-web-widget:salesforce:case-links | |
use event data to talk back to integration: | |
JS API | |
evt.data.widget | |
/** | |
* Relates pageIds to the current case | |
* @param {[Number]} pageIds - pageIds to link to a case | |
*/ | |
async relatePageIdsToCase(pageIds) | |
/** | |
* Sets the page and page mode for a particular page and loads the page in the desired mode | |
* @param {String|Number} page - article path or pageId for the article to load | |
* @param {String|null} [pageMode='view'] - optional parameter, provide 'edit' to automatically open the article in the editor, otherwise open in View tab | |
*/ | |
async setPage(page, pageMode = 'view') | |
/** | |
* Sets/Gets the Case Description property for the current case | |
* @param {String} description - Case Description for the current case, used for new page summary | |
*/ | |
caseDescription | |
/** | |
* Sets/Gets the caseId for the current case | |
*/ | |
caseId | |
// Sets the search query and performs search. Gets the current search query. | |
searchQuery | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Deki API Link To Case Info
GET:linktocase/{caseid}/links (public)#
Retrieve list of page-case links for the given case (more)
caseid = string : Case identifier to retrieve links for
limit = int : Maximum number of results to return (default: 100) (max: 1000)
offset = int : Number of items to skip (default: 0)
GET:pages/{pageid}/linktocase/links (public)#
Retrieve list of page-case links for the given page (more)
pageid = string? : Page id to retrieve links for
limit = int : Maximum number of results to return (default: 100)
offset = int : Number of items to skip (default: 0)
DELETE:pages/{pageid}/linktocase/{caseid} (public)#
Remove link between page and case (more)
caseid = string : Case identifier
POST:pages/{pageid}/linktocase/{caseid} (public)#
Link page to case (more)
caseid = string : Case identifier