Loading
Automotive Cloud
Table of Contents
Select Filters

          No results
          No results
          Here are some search tips

          Check the spelling of your keywords.
          Use more general search terms.
          Select fewer filters to broaden your search.

          Search all of Salesforce Help
          Show Additional Vehicle Health Metrics on a Flexcard

          Show Additional Vehicle Health Metrics on a Flexcard

          The ConnectedServicesVehicleStatusParentCard Flexcard can show up to five metrics on a Vehicle record page but you can customize the Flexcard to show additional metrics.

          Required Editions

          Available in: Enterprise, Unlimited, and Developer Editions.
          User Permissions Needed
          To customize Flexcards and integration procedures: Omnistudio Admin

          Create a named credential and set up the integration definition as required.

          1. Clone the Flexcards:
            1. From the App Launcher, find and select OmniStudio.
            2. In the Omnistudio app, from the navigation bar, select Omnistudio Flexcards.
            3. Click ConnectedServicesVehicleStatusParentCard and select the first version.
            4. Click Clone.
            5. Modify the name and other details as required, and click Clone.
            6. Click Activate.
            7. Repeat steps c-f for these cards.
            • ConnectedServicesVehicleSingleMetricCard
            • ConnectedServicesVehicleDisplayNameCard
            • ConnectedServicesVehicleStatusRefreshTime
            Make sure the parent card has references to the newly cloned child Flexcards.
          2. Add additional attributes that are exposed on the Flexcard:
            1. On the cloned ConnectedServicesVehicleStatusParentCard Flexcard, click Deactivate.
            2. Click Setup.
            3. In the Exposed Attributes section, click Add New.
            4. For Attribute, enter SixthMetricName.
            5. For Type, select String.
            6. For Targets, select lightning_RecordPage.
            7. For Label, enter Sixth Metric Name.
            8. Save your changes.
            9. In the Exposed Attributes section, click Add New.
            10. For Attribute, enter SixthMetricLabel.
            11. For Type, select String.
            12. For Targets, select lightning_RecordPage.
            13. For Label, enter Sixth Metric Label.
            14. Save your changes.
            15. Click Add New.
            16. For Attribute, enter SixthMetricDisplayType.
            17. For Type, select String.
            18. For Targets, select lightning_RecordPage.
            19. For Label, enter Sixth Metric Name.
            20. Save your changes.
            21. Repeat steps c-t for each attribute that you want to add.
          3. Qualify the new exposed attributes as session variables:
            1. Click Setup.
            2. In the Input Map section, click Add New.
            3. For Key, enter SixthMetricName.
            4. For Value, enter {Session.SixthMetricame}.
            5. Click Add New.
            6. For Key, enter SixthMetricLabel.
            7. For Value, enter {Session.SixthMetricLabel}.
            8. Click Add New.
            9. For Key, enter SixthMetricDisplayType.
            10. For Value, enter {Session.SixthMetricDisplayType}.
            11. Repeat steps a-j for each attribute that you want to add.
            12. Activate the Flexcard.
          4. Create a version of the integration procedure:
            1. From the App Launcher, find and select OmniStudio.
            2. In the Omnistudio app, from the navigation bar, select Integration Procedures.
            3. Click RemoteActions/GetVehicleMetrics and select the first version of the procedure.
            4. Click Create Version.
            5. Save your changes.
            6. Click Activate Version.
              Only one version can be active at a time. You can't edit the active version.
          5. Update the list of attributes in the integration procedure:
            1. On the new version of the integration procedure, in the Structure section, click the SetValuesForExposedAttributes step.
            2. Click Edit as JSON.
            3. To add the new exposed attributes you added in step 2 on the Flexcard, edit the node params.
              The params array node defines the specific telematics metrics you want to request from your telematics provider. By adding the additional metric names to the node, you instruct the MuleSoft API to return data for the specified metrics.
              The sixth metric name is added as a param.
              "{ \"recordId\": \"%DataRaptorExtractAction1:VIN%\", \"sourceSystemId\": \"%sourceSystemId%\", \"FirstMetricName\": \"%FirstMetricName%\", \"SecondMetricName\": \"%SecondMetricName%\", \"ThirdMetricName\": \"%ThirdMetricName%\", \"FourthMetricName\": \"%FourthMetricName%\", \"FifthMetricName\": \"%FifthMetricName%\" \"SixthMetricName\": \"%SixthMetricName%\" }"
            4. To add the new exposed attributes you added in step 2 on the Flexcard, edit the node Attributes.
              The “Attributes” array defines the expected structure of the data that the Flexcard component returns. By adding nodes for additional metrics, you ensure the Flexcard can correctly parse and show the corresponding data from the MuleSoft API response.
              The sixth metric name, label, and display type are added as attributes.
              [
                          {
                              "MetricName": "%FirstMetricName%",
                              "MetricLabel": "%FirstMetricLabel%",
                              "MetricDisplayType": "%FirstMetricDisplayType%"
                          },
                          {
                              "MetricName": "%SecondMetricName%",
                              "MetricLabel": "%SecondMetricLabel%",
                              "MetricDisplayType": "%SecondMetricDisplayType%"
                          },
                          {
                              "MetricName": "%ThirdMetricName%",
                              "MetricLabel": "%ThirdMetricLabel%",
                              "MetricDisplayType": "%ThirdMetricDisplayType%"
                          },
                          {
                              "MetricName": "%FourthMetricName%",
                              "MetricLabel": "%FourthMetricLabel%",
                              "MetricDisplayType": "%FourthMetricDisplayType%"
                          },
                          {
                              "MetricName": "%FifthMetricName%",
                              "MetricLabel": "%FifthMetricLabel%",
                              "MetricDisplayType": "%FifthMetricDisplayType%"
                          }
                          {
                              "MetricName": "%SixthMetricName%",
                              "MetricLabel": "%SixthMetricLabel%",
                              "MetricDisplayType": "%SixthMetricDisplayType%"
                          }
                      ]
            5. Save your changes.
            6. Click Activate Version.
              Only one version can be active at a time. You can't edit the active version.
          6. Specify the attributes for the Flexcard in Lightning App Builder.
           
          Loading
          Salesforce Help | Article