Calculation Procedures / Matrices Flashcards

1
Q

What is a Calculation Matrix?

A

They are lookup tables that take a unique input or set of inputs and return an output or set of outputs. Use a Calculation Matrix whenever you need to look up data.

here are a few examples of Calculation Matrices.

An insurance premium matrix that matches characteristics of the insured to policy premiums
A weather alert matrix that sets an alert flag based on weather conditions
A demographic matrix that outputs demographic data based on a location
A pricing matrix that matches a set of product characteristics to a price or prices

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are the 3 types of Calculation Matrices?

A

Standard Calculation Matrix: Used when your matrix doesn’t need to be a part of a group or versioned row by row.
Grouped Calculation Matrix: Used to group similar matrices with the same Input and Output headers together.
Row-Versioned Calculation Matrix: Used if you have a matrix with many rows and may need to change small portions of the data at a time. Each row has its own start date and time

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What factors to consider that determine which matrices run?

A

A matrix will only run if the current date and time is between the Start Date/Time and End Date/Time. A matrix with a blank End Date/Time still runs; it is merely set up to run indefinitely.
If there are multiple versions of a matrix, only one version can be accessed at a time, based on these factors:
*The date/time range on the matrices. (That is, are they active at the same time?)
*If they are both active, the highest priority active matrix is the one that runs. (1 is the lowest priority.)
The previous versions of a matrix will always be available to allow products with old prices to still access the proper price tables.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What needs to be unique in matrices?

A

(Combinations of) inputs. Outputs do not have to be unique. In other words, the lookup can be many-to-one.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

If two matrices are both enabled at the same time, which one will be called?

A

the one with higher priority (1 = lowest)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What are Calculation Procedures?

A

OmniStudio Calculation Procedures allow you to perform multiple mathematical operations and transformations at the same time. They take inputs as formatted JSON data and use lookup matrices, algebraic operations, and aggregation operations to calculate new data. They output specified data in formatted JSON and they can have conditional steps.

Calculation Procedures are used to configure matrix lookups, set variables and constants, and perform basic math operations.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Why use Calculation Procedures, when other features support formulas?

A

Calculation Matrix integration
Built-in JSON array calculations and aggregation functions
Server-side execution
Time-based execution (You can have multiple versions in place that automatically execute based on when the data call is made.)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What are the 5 basic components of a calculation procedure, and which ones are required?

A

Required:

Variables and Constants: Used in calculation steps

Optional:

Calculation Steps: Matrix and Lookup
Aggregation Steps: Allow you to use data from an array input where the calculations are run on each element separately
Preprocessor Class: Apex classes used to manipulate the input of the calculation
Postprocessor Class: Apex classes used to manipulate the output of the calculation

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

You insert a Matrix Lookup calculation step, but your matrix isn’t listed as you type it out. What could be the reason?

A

The matrix may not have been enabled

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What must the input JSON node for a calculation procedure be named?

A

input. All lowercase.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What are the two different types of calculation steps in a Calculation Procedure?

A

Matrix lookup, and Calculation (aka formula)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

If two Calculation Procedures are both active at the same time, which one will be called?

A

Same rule as with Matrices; the higher priority one. (1 is lowest)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly