Update tax rates

Update tax rates sample flow.

Summary

In this example, we demonstrate an action that dynamically updates the tax rate percentage based on the customer’s location. When the customer’s location is Colorado, the tax rate is set to 5%, while for customers in Arizona, the tax rate is adjusted to 6.5%. This showcases how you can use contextual information to make real-time adjustments and tailor processes to specific conditions.

Update tax rates

Step: start

Inputs

No configuration required.

Outputs

No configuration required.

Context
- record: Record
- oldRecord: Record
- action: Action

Step: If CO

Inputs
LabelTypeValue
ConditionConditionrecord.field(‘customer.address.state’).val() === ‘CO’
Outputs

No configuration required.

Context
- record: Record
- oldRecord: Record
- action: Action

Step: If AZ

Inputs
LabelTypeValue
ConditionConditionrecord.field(‘customer.address.state’).val() === ‘AZ’
Outputs

No configuration required.

Context
- record: Record
- oldRecord: Record
- action: Action

Step: Update tax rate Colorado

Inputs
LabelTypeValue
Recordrecordcontext.record
Tax Ratespercentage0.05
Outputs
LabelTypeDescription
updatedRecordrecordput in context == false
Context
- record: Record
- oldRecord: Record
- action: Action

Step: Update tax rate Arizona

Inputs
LabelTypeValue
Recordrecordcontext.record
Tax Ratespercentage0.05
Outputs
LabelTypeDescription
updatedRecordrecordput in context == false
Context
- record: Record
- oldRecord: Record
- action: Action

Step: end

Inputs
LabelTypeDescription
Return resultbooleanIf true it will return the final result of the flow.
Outputs

No configuration required.

Context
- record: Record
- oldRecord: Record
- action: Action