Skip to content

Commit 1505878

Browse files
committed
Add start checklist to README.md
1 parent 6b4b587 commit 1505878

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ Used to retrieve all methods bundled with Intercom. These are based on the offic
144144
| showNewMessage | (content?: string) => void | shows the Messenger as if a new conversation was just created. If `content` is passed, it will fill in the message composer |
145145
| getVisitorId | () => string | gets the visitor id |
146146
| startTour | (tourId: number) => void | starts a tour based on the `tourId` |
147+
| startChecklist | (checklistId: number) => void | starts a checklist based on the `checklistId` |
147148
| trackEvent | (event: string, metaData?: object) => void | submits an `event` with optional `metaData`
148149
| showArticle | (articleId: string) => void | opens the Messenger with the specified article by `articleId`
149150
| startSurvey | (surveyId: number) => void | Trigger a survey in the Messenger by `surveyId`
@@ -175,6 +176,7 @@ const HomePage = () => {
175176
showNewMessage,
176177
getVisitorId,
177178
startTour,
179+
startChecklist,
178180
trackEvent,
179181
showArticle,
180182
startSurvey,
@@ -187,6 +189,7 @@ const HomePage = () => {
187189
const handleNewMessagesWithContent = () => showNewMessage('content');
188190
const handleGetVisitorId = () => console.log(getVisitorId());
189191
const handleStartTour = () => startTour(123);
192+
const handleStartChecklist= () => startChecklist(456);
190193
const handleTrackEvent = () => trackEvent('invited-friend');
191194
const handleTrackEventWithMetaData = () =>
192195
trackEvent('invited-frind', {
@@ -213,6 +216,7 @@ const HomePage = () => {
213216
</button>
214217
<button onClick={handleGetVisitorId}>Get visitor id</button>
215218
<button onClick={handleStartTour}>Start tour</button>
219+
<button onClick={handleStartChecklist}>Start checklist</button>
216220
<button onClick={handleTrackEvent}>Track event</button>
217221
<button onClick={handleTrackEventWithMetaData}>
218222
Track event with metadata

packages/react-use-intercom/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ Used to retrieve all methods bundled with Intercom. These are based on the offic
144144
| showNewMessage | (content?: string) => void | shows the Messenger as if a new conversation was just created. If `content` is passed, it will fill in the message composer |
145145
| getVisitorId | () => string | gets the visitor id |
146146
| startTour | (tourId: number) => void | starts a tour based on the `tourId` |
147+
| startChecklist | (checklistId: number) => void | starts a checklist based on the `checklistId` |
147148
| trackEvent | (event: string, metaData?: object) => void | submits an `event` with optional `metaData`
148149
| showArticle | (articleId: string) => void | opens the Messenger with the specified article by `articleId`
149150
| startSurvey | (surveyId: number) => void | Trigger a survey in the Messenger by `surveyId`
@@ -175,6 +176,7 @@ const HomePage = () => {
175176
showNewMessage,
176177
getVisitorId,
177178
startTour,
179+
startChecklist,
178180
trackEvent,
179181
showArticle,
180182
startSurvey,
@@ -187,6 +189,7 @@ const HomePage = () => {
187189
const handleNewMessagesWithContent = () => showNewMessage('content');
188190
const handleGetVisitorId = () => console.log(getVisitorId());
189191
const handleStartTour = () => startTour(123);
192+
const handleStartChecklist = () => startChecklist(456);
190193
const handleTrackEvent = () => trackEvent('invited-friend');
191194
const handleTrackEventWithMetaData = () =>
192195
trackEvent('invited-frind', {
@@ -213,6 +216,7 @@ const HomePage = () => {
213216
</button>
214217
<button onClick={handleGetVisitorId}>Get visitor id</button>
215218
<button onClick={handleStartTour}>Start tour</button>
219+
<button onClick={handleStartChecklist}>Start checklist</button>
216220
<button onClick={handleTrackEvent}>Track event</button>
217221
<button onClick={handleTrackEventWithMetaData}>
218222
Track event with metadata

0 commit comments

Comments
 (0)