Have you ever had to manually update a bunch of records? I mean, literally open dozens of tabs, and slowly, painstakingly update a bunch of values?
That’s what my first job after college was like. It was an internship where half my day was dedicated to manually updating records in a system. Other than being a total waste of my time, it was also a process that resulted in a considerable number of errors. Having five or even 10 tabs might be easy to keep tabs on (pun intended), but anything more than that, and you’re playing a guessing game of “did I or didn’t I update these values?” After that torture, and the torture of rectifying my mistakes, I vowed to find a way to update records without the tabs and manual clicks.
Enter Nintex Workflow Cloud.
In my example, I’ll highlight a common type of record that one would normally update quarterly or even weekly: product pricing. I’ll use Salesforce’s new CPQ application (formerly Steelbrick) as an example because a lot of people are using it. I’ll show you how easy it can be to take an Excel file of updated prices, route it through approvals, and use Nintex Workflow Cloud and Nintex Document Generation for Salesforce to update the Salesforce CPQ pricing records in seconds.
So first things first. Here is my Excel file. It’s not fancy, but it’s an important collaborative document that is about to get run through an approval process. To keep track of the products, and to track when and how the product values were updated, I’ve created a custom object to hold Pricing Update information.
To make things even easier, by using Nintex for Salesforce, I can actually associate a Nintex Form with a specific object in Salesforce. You can get object-specific information from the record where the user submitted the form. In this case, since this record is specific to Americas, we can tell exactly which products to update.
Once I’ve uploaded my document to the form and entered when I want the update to happen, the first workflow begins.
Here’s a quick look at the first of my two workflows. It starts off by receiving the file the user uploaded in a collection. This is then routed into the first of two departments that feed into an Express Approval.
Express Approval is an incredibly simple action that can automatically send out anything from a document or data for approval via email. The approver simply responds to the email with either “approve” or “decline,” and NWC routes the outcome accordingly. Once that’s completed, we store the file back into Salesforce as an attachment on the record where the file first originated. That part is pretty straightforward.
What happens next in the workflow is a bit more complicated.
This next piece uses some advanced techniques that might be a little bit confusing to new users.
You’ll notice the last part of the first workflow is the checking a checkbox on that record. This kicks off an automated Document Package in the Salesforce environment which uses the powerful features of Nintex Document Generation for Salesforce.
We’ve set up an Excel template file which will take all the values from another Excel file, and format it into a JSON string. The feature we’re using is called Import File, and it essentially allows you to select an Excel file attachment and use that as a data source for your Drawloop® Document Package.
You can learn more about JSON here if you like. Once the JSON string has been formatted, we can take that value and store it back into a field in Salesforce. This feature is called an Insert Update, and it allows you to do anything from modify field values to create new records in your Salesforce Org.
Now that we have all this data, and it’s been formatted nicely into a JSON string, we can start our second workflow.
Here’s a look at the second workflow. What we’ve done here is set up a scheduled start event. This allows a user to have the updated pricing ready, but postpone the update until they want it to occur. The first query action looks for all the Pricing Update records with today’s date. Those that have it are added to the collection of record IDs and begin retrieving the JSON value stored on the record.
After we have all the Pricing Update records, we can break apart the JSON using the Apply Regular Expression action, grab the ID of the product, grab the new prices, and update the records in Salesforce. The Loop for Each action ensures that every single product, in every single Pricing Update record, gets its update.
With that, you’re finished! Give yourself a pat on the back for updating the pricing for all of these products so quickly!
Visit the Nintex Community today to learn more and engage in conversations with fellow Nintex users!