Skip to main content

Set Integration Configuration Values Activity

Overview​

The Set Integration Configuration Values (set_integration_configuration_values) Activity is a powerful feature that can be used to store your secrets while creating custom automations with integrations. This activity allows you to store and update secret keys for your integration during package executions without manually having to change them.

The Set Integration Configuration Values Activity can be located by simply searching for "Set Integration" in the list of activities in the package editor:

Here is a basic example of a package where the Set Integration Configuration Values Activity has been used:


# Pia Automation Package
conditions:
- name: 'client_filter'
optMode: 'OptOut'
category: 'Hello World'

- name: 'chat'
option_button: 'Set Integration Values'
option_text: 'Text which is displayed in the Pia Chatbot'
option_category: 'Pia Chatbot Category'

steps:

- task: set_integration_configuration_values
inputs:
integration_variable_prefix: 'test_integration1'
values:
Username: 'Test User'
Password: 'testpassword'

To test the above package, a custom integration has been created with the following details.

So that when the package runs, it will create a separate configuration profile for the integration and store the 'Username' and 'Password' field values as defined in the package.

Activity Behavior​

The primary purpose of the Set Integration Configuration Values Activity is to store secrets for the integrations during package executions. This activity allows storing secrets for each individual configuration profile or create new integration configuration profile based on the Postfix value or client Id defined in the package.

The behavior of the activity differs slightly based on whether your custom integration has client configuration mode enabled or not.

  • When Client Configuration Mode is enabled: The activity stores secret for each of the configuration profile of your custom integration based on the client that the package is currently executing for. If the activity can link the current client with an existing configuration in your defined integration, it will update the secrets with the provided value. If the activity cannot link the current client with an existing configuration, it will automatically generate a new configuration profile within the integration and store the provided secrets.

  • When Client Configuration Mode is disabled: In this case, the activity stores secrets for each of the configuration profiles of your custom integration based on the Configuration Postfix value defined in the package. If a configuration postfix value has been defined in the package, the activity will store secrets for the integration configuration profile with the defined postfix value. if the configuration postfix value has not been defined in the package, it will automatically generate a new configuration profile with a random postfix value within the integration and store the provided secrets.

The Set Integration Configuration Values activity can be used in all types of package executions. This includes packages which have been initiated via the Pia Chatbot or via Ticketing System Event.

Input Properties​

Use properties to modify the behavior of the activity.

Property Name: integration_variable_prefix
Property Required: Yes
Property Description: This is the prefix defined while creating a custom integration.

Property Name: integration_configuration_mode
Property Required: Yes
Property Options: 'auto' or 'client' or 'postfix'
Property Description: This is to define whether the Client Configuration Mode has been enabled for the integration or not. If this field is empty, the integration configuration mode will be automatically determined. If the value is set to 'client' - the integration configuration will be created/updated only if Client Mode is enabled for the integration. If the value is set to 'postfix' - the integration configuration will be created/updated only if the normal (Postfix) mode is enabled for the integration.

Property Name: bind_to_client_id
Property Required: No
Property Description: This is the internal client Id of the client. This property defaults to the client id for the ticket associated with this package execution.

Property Name: config_postfix
Property Required: No
Property Description: This is the postfix of the integration configuration profile. It is only valid if the integration type is postfix i.e. Client Configuration Mode has not been enabled for the integration.

Property Name: allow_create_config
Property Required: No
Property Options: 'True' or 'False'
Default Value: 'True'
Property Description: This property is to allow this activity to create a new integration configuration if the specified configuration does not exist.

Property Name: allow_overwrite_config
Property Required: No
Property Options: 'True' or 'False'
Default Value: 'True'
Property Description: This property allows the activity to override the secrets if the values already exist in the configuration profile.

Property Name: values
Property Required: Yes
Property Description: These are the variables to be set for the integration configuration. The value types are determined based on the Integration Field settings made in the integration.

Output Properties​

This activity has a single output property available.

Property Name: config_postfix
Property Description: If a new configuration has been created, then the automatically generated postfix of the new configuration will be the output of this property.