View Source Glific.Flows.MessageVarParser (Glific v5.1.6)

substitute the contact fields and result sets in the messages

Link to this section Summary

Functions

parse the message with variables

Replace all the keys and values of a given map

Interpolates the values from results into the message body. Might need to integrate it with the substitution above. It will just treat @results.variable to @results.variable.input

Link to this section Functions

@spec parse(String.t(), map()) :: String.t() | nil

parse the message with variables

Link to this function

parse_map(map, bindings)

View Source
@spec parse_map(map(), map()) :: map()

Replace all the keys and values of a given map

Link to this function

parse_results(body, results)

View Source
@spec parse_results(String.t(), map()) :: String.t()

Interpolates the values from results into the message body. Might need to integrate it with the substitution above. It will just treat @results.variable to @results.variable.input