Skip to main content

Storing Journey Outputs

Overview

This is a guide on how to store journey outputs from the SDK in case management.


Prerequisites

  • GitHub access.

Purpose & use case

  • Who is this for? SA/IE teams.
  • When should this be used?
    • Storing journey outputs to be displayed on case management applications table.
    • Storing journey outputs to be added to the CSV report downloaded from case management.

Step-by-step guide

1. Setting up

Workflow configuration changes

  • Add a field dashboardData in the workflow.
  • The format is similar to the sdkResponse field that is already part of almost all our workflows.
  • The same fields that can be used in sdkResponse can also be used under dashboardData.
  • Sample MR: hv-central-config MR 13833
tip

Please do ensure that whatever variables/conditionalVariables you are adding as part of dashboardData are exposed from the modules.

Which version of the SDK supports this?

Enabling storage

  • Update the client configuration file to define how inputs should be stored and displayed.
  • Clone the hv-central-config GitHub repository.
  • Navigate to buckets/hv-central-config/client-configurations/${appId}.json:
    • If there's no existing file, create a new one.
    • Replace ${appId}.json with your App ID for which you wish to configure storing inputs.
  • Raise an MR enabling the configuration as follows:

For existing configurations, add the following key:

{
"...existing configurations": "",
"dashboardDataConfig": {
"shouldStore": "yes"
}
}

For new configurations:

{
"dashboardDataConfig": {
"shouldStore": "yes"
}
}

2. How it works

  • Backend receives the outputs sent from the SDK in the finishTransaction API call.
  • Backend stores outputs in two formats:
    • Encrypted — Used to display the outputs on case management applications table or CSV reports.
    • Hashed — Used to search on the values sent in the inputs. Values are converted to lowercase and then hashed.
      • PLEASE NOTE: We will only be allowing full searches.
        • For example: if value is Karnataka, kar will not return any results but karnataka will.
      • Search is case insensitive:
        • For example: if value is Karnataka, karnataka, Karnataka, and KaRnaTaKA will all return the corresponding results.
PII considerations
  • Since this is opt-in, we only store this for clients who want it.
  • We store it in an encrypted & hashed manner in our database.
  • Our database is present in the India region only. For other region clients, their encrypted data will get stored in India.

FAQs

Q: Do we store PII in raw plain text? A: No.

Q: Where is the data stored? A: In our database, located in India.

Was this helpful?
Ask AI

Ask anything about the internal documentation

AI answers are based on internal documentation. Verify critical information.