Overview: Update workflow module (Console)

Console > Workflows > Workflow modules > Overview: Update workflow module (Console)

This article explains the Update workflow module in Console.

In this article

Overview

The Update workflow module is used to modify data on an external database like Salesforce, Zendesk, or a custom database (MySQL, MS SQL, or PostgreSQL). With the Update module, you can modify existing data on an external database so that it can be retrieved later.

You can create integrations between the Avaya.cx system and external databases in the Integrations workspace in Console (Account > Integrations).

This article explains the general structure of the Update module and how you can use it to update existing data on an external database based on information gathered from a workflow.

Configuring the Update module

Once you’ve added an Update module to your workflow, you can double-click it to open and configure it. By configuring the Update module, you can choose:

Query section

The Query section is where you build a look up query to find the data you want to modify. 

Once you double-click on an  Update module that’s been newly added to the editor, the module opens to it’s configuration workspace and you’ll be presented with a screen like the screenshot below:

The initial settings available to you to edit are:

The Database dropdown menu shows you all of the types of database you’ve configured in Console (Account > Integrations). This is where you can tell the Update module what type of database you want to modify data on. 

Note: Options only appear in the Database dropdown menu if you’ve already successfully configured an integration with Salesforce, Zendesk, or a custom database.

For the purposes of this overview, we can select Salesforce as the type of database to insert data into. 

Notice that, when you click an option in the list, a new dropdown menu appears: Connection. This is where you choose the specific type of connection you want to use. The options in this menu are dynamic, so they vary based on the option selected in the Database menu.

In the screenshot above, we’ve selected the connection called default. Once we select the connection, a new dropdown menu appears: Object.

The Object dropdown menu is where you choose the table containing the data you want to modify.

Once you choose an object, a Filter Field row will appear. This row initially contains three dropdown menus: 

In addition to these three, if you select a Type, you’ll see an additional field called Value.

This is where you identify the resource you want to update. The most common way to identify a resource you want to update is with its unique identifier. For example, the unique identifier of a Contact is its Contact ID.

Note: You can add as many search parameters as you want to a look up.

In the example below, we’re creating a query to look up a contact based on their Contact ID. You can retrieve the unique identifier of a record using the Look Up module.

Tip: Everything left of the operator is on the external database’s side. Everything right of the operator is on the Avaya.cx side.

Another way of interpreting the filter field in the screenshot above is:

“Find the record in the Contact table where the record’s Contact ID is equal to the customerContactId variable”

If the filter returns a match, the next step is to Update. If the filter doesn’t return a match, it means it wasn’t able to find the resource to update. The module would route down the Failed port.

Update section

The Query section is where you search for a resource you want to modify. The Update section is where you can define what fields you want to modify and the new information you want to provide for modification.

In the screenshot below, we have an example of searching for a contact based on the contact’s unique identifier in Salesforce (this could be gathered with a Look Up module). With a resource identified, we’re mapping new values to the Object Fields.

Remember that everything left of the arrow is on the external database’s side. Everything right of the arrow is on the Avaya.cx side.

So, in the screenshot above, we’re identifying three columns in the Contact table of Salesforce:

Then, we’re mapping data gathered in the workflow and/or interaction to these fields on the Avaya.cx side:

If the Update module successfully finds the resource identified by the Filter Fields, it uses the integration to modify the data with the new data gathered from the workflow and/or interaction.

If the module fails to update the resource the module would route down the Failed port. The Update module might fail to update the resource if it can’t find a resource matching the lookup parameters or if some other error occurs (like an error in the database connection or in the database itself). 

Set Variables section

Upon successful update of a resource, you can optionally set a variable from the resource for use later in the workflow. You could then use the variable for various purposes, including variable replacement in workflows.

Use case

One use case for the Update module is in an embedded workflow to change the owner of a contact in Salesforce.

For example, suppose that you want a queue user to be able to “claim” ownership of a contact in Salesforce so that they’re the primary person in charge of handling the account. You could create an embedded workflow that runs the Update module to change the owner of the contact in Salesforce.

In the screenshot above, the update module searches for a contact in the Contact object. It compares the source phone number (the phone number that created the interaction) with the Business Phone field in Salesforce.

If it finds a match, it updates the full name of the contact to the source name, and it sets the Owner ID of the contact in Salesforce to the User Id of the queue user who handled the contact.

Visual breakdown

Exterior structure

This is the exterior structure of an Update module. All modules share this same structure.  

Reference the Overview: Workflow modules article to take a deeper dive into each of these components.

Interior structure

Below is the deep dive explanation for each interior area of the Update module.

The screenshot above is what a fresh Update module looks like before any configuration.

The type menu is where you select what kind of value you want to query or map to. In most circumstances, these are properties of an interaction.