Skip to content

mashmatrix/msmx-sheet-integration-examples

Repository files navigation

Mashmatrix Sheet Integration Examples

This project is intended to show the possibilities of Mashmatrix Sheet using its open APIs.

There are examples that uses following APIs:

  • Message Channel API (en | ja)
  • Platform Event API (en | ja)

Preparation

  • Check out the latest source code of this repository
  • Install Salesforce CLI
  • Connect to Salesforce DevHub org to create new scratch orgs

Setup Procedure

  1. Create a scratch org to setup integration examples.
$ sfdx force:org:create -f config/project-scratch-def.json -a msmx-sheet-integration -w 10
  1. Install Mashmatrix Sheet trial package from command line.
$ sfdx force:package:install --package 04t0K000001E4ll -u msmx-sheet-integration -w 10
  1. Assign required permission sets to the scratch org's default user.
$ sfdx force:user:permset:assign --permsetname msmxSheet__MashmatrixSheetUser -u msmx-sheet-integration
$ sfdx force:user:permset:assign --permsetname msmxSheet__MashmatrixSheetAdministrator -u msmx-sheet-integration
  1. Push this example repository's source code to the scratch org.
$ sfdx force:source:push -u msmx-sheet-integration
  1. Assign a permission set to access example components.
$ sfdx force:user:permset:assign --permsetname Mashmatrix_Sheet_Integration_Examples -u msmx-sheet-integration
  1. Load example data using SFDX migration automatic plugin
$ sfdx plugins:install sfdx-migration-automatic
$ sfdx automig:load --inputdir data/records -u msmx-sheet-integration
$ sfdx automig:load --inputdir data/books -u msmx-sheet-integration
  1. Open Mashmatrix Sheet to confirm the loaded books/records are accessible.
$ sfdx force:org:open -u msmx-sheet-integration -p /lightning/n/msmxSheet__MashmatrixSheet
  1. Confim IDs of the books listed in left sidebar (from book setting menu), and memo them with their name.

  2. Open "Mashmatrix Sheet Integration Examples" app from app launcher.

  3. Focus on "Map Integration" tab, open "Edit Page" from right top menu.

  4. Select "Account Search" component, replace "Book ID" value to the memoed book ID of "Account/Contact" book in step 8. So to "Account Map" and "Contact in Selected Account" components.

  5. Focus on "Filter Control Integration" tab, open "Edit Page" from right top menu.

  6. Select "Accommodations Result" component, replace "Book ID" value to the copied book Id of "Accommodation" book in step 8.

  7. Focus on "Message Debug" tab, open "Edit Page" from right top menu.

  8. Select "Mashmatrix Sheet" component in the left pane, replace "Book ID" value to the copied book Id of "Book for Event/Message Debug"

Examples

Map Integration

map-integration-screen

On "Map Integration" tab, there are two Mashmatrix Sheet components and one custom map component in the page. The "Account Search" sheet component located in left pane queries account records in the organization, filtering by state or account type. The map component receives message of loadComplete with the searched result, then plots them on the map. If the user clicks a plotted account entry, it publishes setParameters message with its account ID. The "Contacts in Selected Account" sheet component, located in the right-bottom of the page, is referring the accountId parameter in its filter, so it will list all contact records belonging to selected account.

Filter Condition Integration

filter-control-integration-screen

On "Filter Condition Integration" tab, there are two components in the page. One is the custom control component, which publishes setParameters message according to the control input by the user. Another is a Mashmatrix Sheet component that lists accomodations data in the org, which references parameter values in its filters. By changing the control input in the control component, the sheet component will be automatically refreshed to list the records matching with the inputted conditions.

To reference parameter values in filters, please check the ”Reference Value" page in user guide.

Message Debug

message-debug-screen

On "Message Debug" tab, it shows one sheet component and two custom components. The "Debug Messages" component lists all messages published to message channels, and events published to platform events of Mashmatrix Sheet in real time. The "Publish Messages" component can create raw messages to publish to message channels by specifying message payload in JSON in the textarea.

About

Integration Examples using Mashmatrix Sheet API

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published