Product documentation and training for Shipcode.
Deeplinks via Custom ID

Overview

Displaying a Deeplink via a post's custom identifier is very similar to displaying a Story, except you'll specify customID rather than postID. Use the FlagshipDeeplink for your platform, as shown below.

Basic Usage

// Use the FlagshipDeeplink component returned from initializing Flagship
return (
<FlagshipDeeplink
customID={YOUR_CUSTOM_ID}
// Optional - provide your event handlers. If you didn't provide event
// handlers while initializing Flagship or you'd like to use a different
// handler, you may provide any of the event handlers as props to the
// FlagshipDeeplink component.
handleCloseStory={YOUR_CLOSE_STORY_HANDLER}
handleDeepLink={YOUR_DEEPLINK_HANDLER}
handleAnalytics={YOUR_ANALYTICS_HANDLER}
handleError={YOUR_ERROR_HANDLER}
/>
);

 

Rendering a Deeplink story

All the same props that apply to FlagshipStory will apply to FlagshipDeeplink, and by default a post's story will be displayed. The main difference between a Deeplink and Story is the way the post is requested from the api if it's not already in memory. FlagshipDeeplink has the ability to fetch the post from the api by its custom identifier (if applied to a post in feeds).

 

Rendering a Deeplink card

As noted above, by default the post's story is rendered. There is an additional prop contentType which can be set to 'card' to render a post's card instead.

 

<FlagshipDeeplink
customID={customID}
contentType='card'
backButton={true}
renderBackButton={renderBackButton}
handleCloseStory={handleCloseStory}
/>
Did this answer your question?