Launching Sterling Store Engagement from another application for AngularJS
You can launch a specific wizard of Sterling Store Engagement from the application for AngularJS.
Assumptions
- Applicable only for browser-based applications.
- User is already logged in to Sterling Store Engagement by using conventional login or SSO.
- Sterling Store Engagement is not embedded inside any other application.
Procedure
- Generate the embedded link as described by populating relevant data for
ScreenIdandScreenData.Note: Ensure that the embedded link contains query params after hash.- embedded link - Link generated by an external application that links to angular store.
- ScreenId and ScreenData - Query parameters that you need to pass after #, which can be consumed. You can add params based on your business need, which requires a code update.
- ScreenId - Screen to open.
- ScreenData - Relevant screen data that you need to provide in the URL encoded format.
- Browse to the
ngstore/shared/routedirectory. In thestate.provider.jsfile, customize theloadDefaultStatefunction. - Read query params after hash by using the
window.location.hash.split("#");method. - Parse query params to get
ScreenIdandScreenData. - Go to the screen by using
ScreenData - iscState.goToState(screenID, {input: data }, {});
Example
When you want to open the "shipmentsummary" screen with Shipment Key - 2220210331092310171148,
the relevant screen data populates in "shipmentsummary" casedata as {"Shipment": "ShipmentKey":
"20210331092310171148"}}. This is URL encoded and passed to the ScreenData query
parameterScreenData as
%7B%0A%22Shipment%22%3A%7B%0A%20%20%20%20%20%22ShipmentKey%22%20%3A%20%2220210331092310171148%22%0A%7D%0A%7D
The link format is as follows:
wsc/ngstore/home.do?scFlag=Y#ScreenId=shipmentsummary&ScreenData=%7B%0A%22Shipment%22%3A%7B%0A%20%20%20%20%20%22ShipmentKey%22%20%3A%20%2220210331092310171148%22%0A%7D%0A%7D