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:
The database containing the information you want to modify
Which object (table) on the database containing the information you want to modify
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:
Label (the name of the module)
Database
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.
For Salesforce connections, Salesforce has documentation of objects it makes available for use.
For custom database connections, the Object dropdown will show all of the tables on your database. Refer to your organization’s documentation on these tables.
Once you choose an object, a Filter Field row will appear. This row initially contains three dropdown menus:
Filter Field
Operator
Type
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.
The Filter Field dropdown is the data column you’re searching for on the database. This represents the record you want to modify.
The Operator dropdown is the type of comparison you want to make.
The Type dropdown is the type of value you want to use in your query
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:
Full Name
Mobile Phone
Title
Then, we’re mapping data gathered in the workflow and/or interaction to these fields on the Avaya.cx side:
The Source Name (the name of the customer) will be mapped to the Full Name field.
The Source Phone Number (the phone number of the customer) will be mapped to the Mobile Phone field.
The custom variable called customerTitle (which could be created from a Say + Gather module) will be mapped to the Title field.
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.
Label: The Label field is where you can give a customized name to the workflow module.
Save: Press the Save button to save any changes to the module.
Database: The Database dropdown menu is where you select the kind of database containing the data you want to update.
Connection: The Connection dropdown menu is where you choose the specific database connection you want to use.
Object: The Object dropdown menu is where you choose the table containing the data you want to update.
Filter Field: The Filter Field dropdown is the data value on the database you want to compare against. This is the field on the piece of data you want to update.
Operator: The Operator dropdown is the type of evaluation you want to make.
Add: The Add button lets you add more fields to queries or variables to return
Trash can: The Trash can icon removes a query or a returned field.
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.
Linked IDs: For values from Salesforce, Zendesk, or a Custom Database
Advanced: For custom values and targeting advanced variables on an interaction.
Source: Contains data associated with the customer, like:
Phone Number
Email
Person Id
Person Device Id
Person Session Id
Details: Contains various data values associated with the input, including:
Tags
Comm Type
Recordings
Agent Recording
Caller Recording
Result
Notes
Points
Type
Queue
Contact Card URL
Avaya.cx User Email Address
Avaya.cx User First Name
Avaya.cx User Last Name
Avaya.cx User Full Name
Salesforce User Id
Zendesk User Id
Routing Details:
Inbound Number
Inbound Number Name
Channel Key
Email
Comm Type
Phone
Messaging
Video
Email
Task
Variable: This can be any custom variable name that you can use later in the workflow. For more information, see: Overview: Variable replacement in workflows
Object Field: This is the field on the piece of data you want to modify.
Type: See the list of types above.
Value: The value to replace the existing value on the database.