Leveraging Twilio API to validate and clean up mobile numbers in Salesforce CRM

Background

Founded in 1974, Second Harvest of Silicon Valley is one of the largest food banks in the nation, providing food to more than a quarter of a million people in Santa Clara and San Mateo counties every month.

Second Harvest of Silicon Valley uses Mogli for texting out of Salesforce. Mogli is a texting app built on Twilio that offers one-to-one messaging, surveys, and WhatsApp integration. Twilio is a platform that provides programmable communication tools for making and receiving phone calls, and sending and receiving text messages.

Problem 

When using a texting app, U.S. carriers require message originators (you or your customers) to keep subscriber lists clean by removing deactivated phone numbers from your lists. Recently, Twilio launched the Deactivations API, allowing customers to automate the process of downloading and cleaning deactivated subscribers from their lists. The reason to do this is two fold:

  1. Prevent Telephone Consumer Protection Act (TCPA) violations and ensure the SMS Campaigns are compliant by removing phone numbers that no longer belong to the person who signed up for the service.
  2. Lower the costs by minimizing messages sent to inactive numbers.

Additionally, Second Harvest of Silicon Valley wanted to ensure they have fewer errors when texting clients, by validating that the mobile numbers provided are actual mobile numbers. This required excluding numbers that are landlines, cannot be reached via text or are simply bad numbers. 

In absence of Mogli providing this functionality out of the box, the client reached out to DaizyLogik to design a solution that could be leveraged to accomplish this and would fit with Second Harvest’s business needs.

Full Sweep and Ongoing Maintenance

DaizyLogik worked with Second Harvest of Silicon Valley to craft a solution that would allow a full sweep of the mobile numbers in the Salesforce database paired with a “verify as you go” solution that keeps the data clean as new records are created, or information is obtained about Deactivated numbers.

For an initial validation of all existing mobile numbers in the Salesforce database, DaizyLogik implemented an off-platform Python script that ran an export of all mobile numbers in the database through the Twilio verification API. This ensured a fast verification process, free of Salesforce governor limits on a high volume of data. Additionally, DaziyLogik developed Apex and Flow automation to validate numbers in real-time as they are added to the system. To make sure nothing slips through, an additional nightly job looks for mobile numbers that have not been verified and makes sure they get validated at off peak hours.

In addition, by leveraging Apex, DaizyLogik assembled a solution to download the Deactivated number logs from Twilio, process them and update records accordingly in Salesforce.

Conclusion

The solution that DaizyLogik designed and implemented allowed Second Harvest of Silicon Valley to meet their goals in terms of data hygiene, maintain TCPA compliance and save money by having confidence that they are texting verified mobile numbers that are less likely to result in an error.

Want to learn more? Contact DaizyLogik to learn more about how we can support you with specialized consulting and custom development and help you get the most out of Salesforce.

Nonprofit Leverages Cumulus CI and Snowfakery to Streamline Delivery of Salesforce Managed Package

HomeKeeper is a powerful web-based Salesforce App originally created for affordable home ownership programs with long-term affordability restrictions.  It is designed around the day-to-day workflow of a housing program administrator, but also collects performance data which is aggregated to generate social impact reports. HomeKeeper is also a HUD approved Housing Counseling Management System (CMS), designed for busy housing counselors and homeownership advisors. Since its inception in 2011 HomeKeeper’s user base has been growing steadily every year. As of April 2020, they had a total of 117 participating organizations. In 2021 Grounded Solutions experienced a 50% increase of their install base for HomeKeeper. As the steward of HomeKeeper, Grounded Solutions Network is a national nonprofit organization deeply invested in the local communities. Grounded Solutions has a small but mighty team that helps imagine and grow HomeKeeper in partnership with DaizyLogik’s technical expertise.

As a development partner, DaizyLogik has been looking for ways to assist the Grounded Solutions team to more effectively support their HomeKeeper user onboarding processes as well as facilitate the regular testing and verification of new features as they become available in the HomeKeeper package. Drawing on their significant nonprofit and technical expertise, DaizyLogik has implemented some process improvements that reduce the amount of time the Grounded Solutions staff has to spend to bring to life new features, as well as bring online new HomeKeeper participating organizations.

About Cumulus CI and Snowfakery

CumulusCI (CCI) is a tool that helps development teams build great applications on the Salesforce platform by automating org setup, testing, and deployment. In other words, it offers a way to automate various processes on the Salesforce platform.

Snowfakery is a tool for generating fake data directly into Salesforce databases, that allows for the creation of relations between tables. Every row is fake data, but also unique and random, like a snowflake.

Streamlining HomeKeeper Package Testing and Customer Onboarding 

DaizyLogik leveraged Cumulus CI and Snowfakery to address two specific use cases in the development, testing and release process of the HomeKeeper package.

Generating Realistic Test Date at Scale

Every time a new feature is added to HomeKeeper, significant testing needs to be performed to ensure the quality of the package as well as confirm that the product can support large data sets (known as scalability testing). Previously, the testing staff had to manually upload spreadsheets with data and link them with each other in order to create a realistic HomeKeeper database on which to test. With every subsequent build of the package, the data had to be discarded and re-uploaded. 

By using Snowfakery, DaizyLogik developed a script that automatically spins off a Salesforce scratch org, installs the latest version of the HomeKeeper managed package alongside the latest version on the Nonprofit Success Pack (NPSP) and populates it with enough data to cover most of the test cases and allow for scalability testing when needed.

This is a huge time saving automation that benefits both the developer and the tester because the data is predictable and fills out all the necessary structures in the database.

We asked Cheryl Curry, Senior Specialist for HomeKeeper Training & Support, to share with us how this process improvement helped the HomeKeeper team save time in the process of releasing new versions of the product.

[Cheryl Curry] Previously, for each new beta build, I had to spend about an hour uninstalling and reinstalling HomeKeeper, mainly because I had to remember each of the steps in their order, and wait for their completion. Sometimes I would forget which box had a beta build installed or where it had just been uninstalled. When my flow was interrupted, I’d spend 5 minutes logging in to check Setup and resume my thought process, including tracking down the beta install link.

I rarely populated significant amounts of data because of the time it would require to accurately represent the HomeKeeper app’s sophisticated 4-tier data model (which references Contacts, Accounts, then relatedly custom objects referencing service types and household members). 

Generally, I would create 2-4 examples with the bare minimum of data entered to successfully test the requirements. About twice a year, successful testing would require more complete data where it was necessary to upload spreadsheets of data. While I am accomplished at data import, if you haven’t ridden your bike in a year, you still need to find it, tune it up, and regain your equilibrium – so that data upload often took most of a day, especially if I forgot a required field or a data model quirk like the format for a custom Date/Time field.

Another challenge was rarely having time to also install Salesforce’s Nonprofit Success Pack for a more accurate representation of how the majority of our customers use the HomeKeeper app (on top of the NPSP), especially with the Household Account data model. Having that app installed alongside the HomeKeeper beta build, with realistic Snowfakery data, will produce a more realistic environment for testing. This should enable us to deliver improved and quality features more quickly and efficiently, and free up time to support our rapidly growing user base.

According to Cheryl Curry,  the testing conducted so far by incorporating the new CCI and Snowfakery automation scripts and the fake realistic data has enabled the HomeKeeper team to shorten the cycle for testing and, when necessary, publishing a new release of the HomeKeeper product from about 1 month down to 1 week. In addition, the realistic data created at scale allowed the team to test and improve a query limit issue. This allowed for the delivery of the improvement to the client in record time and reduced the workload for the HomeKeeper team. 

Faster Onboarding of New Customers

More and more organizations who are adopting HomeKeeper are also using the Nonprofit Success Pack (NPSP). When a new customer is onboarded, and the HomeKeeper package is installed in their Salesforce database alongside NPSP,  every layout in HomeKeeper will show standard Salesforce buttons as well as NPSP buttons that are not relevant to the HomeKeeper functionality. The staff conducting onboarding of HomeKeeper previously had to go into each of the 37 HomeKeeper layouts and clean them up by removing the buttons that are not used. In addition, from a usability perspective, the HomeKeeper staff identified that the order of the buttons was also an important detail in users following good data entry practices.

By leveraging CCI and Apex, DaizyLogik developed a script that can be run against a new HomeKeeper organization to automatically go through the layouts and clean them up, leaving only the buttons that are relevant to HomeKeeper specific functionality in the right order. This has resulted in a time savings for new installs, as explained by Cheryl Curry:

[Cheryl Curry] Our team has used the [layout cleanup] CCI script at least 4 times a month since its completion in 2020. While not a vital step, it was invaluable to clean up buttons in a couple minutes instead of a half hour, so buttons on layouts matched app preferences and adoption best practices (for example, moving “Delete” to be the last button on the layout, whereas the prebuilt Salesforce layout places it right after “Edit” which encourages poor data hygiene).

Focus on the Product not the Tech

DaizyLogik is always seeking to apply new automation and process improvements to ensure our partners can focus on their mission, their product, and release quality functionality. Cheryl Curry and Grounded Solutions imagines the possibility of using these tools to ensure HomeKeeper works more efficiently alongside other alliance partners’ applications like Public House and CreditChecker. Having the ability to test HomeKeeper in conjunction with other products that customers use frequently, ensures that they will have a better experience and confidence that these packages work well together.


Want to learn more? Contact DaizyLogik to learn more about how we can support you with specialized consulting and custom development and help you get the most out of Salesforce.

Managing Volunteer Opportunities at Scale with Volunteers for Salesforce and WordPress

SHFB_Primary_Logo_RGB@2x-8Founded in 1974, Second Harvest Food Bank of Silicon Valley is one of the largest food banks in the nation, providing food to more than a quarter of a million people in Santa Clara and San Mateo counties every month – that is roughly 1-in-10 people across the region.

The organization distributes more fresh produce than almost any other food bank in the country, through a network of 310 nonprofit partners at 1,000 sites.

Technology is a crucial component for Second Harvest to be able to fulfill its mission – from tracking warehouse inventory and managing distribution activities, to allowing partner agencies to order online, and routing delivery to distribution sites at specific times.

Read more about the work DaizyLogik and Metric Media did to implement and re-launch the Second Harvest volunteer calendars using Volunteers for Salesforce and WordPress, to fulfill the food bank’s need to, “meet people where they are,” as described by Second Harvest Director of Information Technology, Elizabeth Whamond.

This slideshow requires JavaScript.

 

Lightning Strikes, Be Ready

Salesforce will turn on Lightning Experience on a rolling basis starting with the Winter ‘20 release for all orgs with Supported Editions and User Licenses for Lightning Experience.

After the update, users will still have access to Salesforce Classic when Lightning Experience is turned on, however for a limited time. Currently, users may take advantage of the built-in lead time to get used to the formal change coming next year, by selecting the Turn on Lightning Experience update that appears under Critical Updates.

Utilize this action to verify your organization’s existing features and customizations in the new interface and to prepare your users via change management. Start now to ensure a better experience for everyone when Lightning Experience is turned on later. Every week, starting the Sunday after Lightning Experience is turned on, Lightning Experience-enabled users who are working in Salesforce Classic are automatically logged into Lightning Experience. Users can switch back to Salesforce Classic as needed, but again, for a limited time.


WHAT’S THE TIMELINE FOR THIS UPDATE?

Beginning in Winter ‘20, the update starts to auto-activates. See the auto-activation date listed under Critical Updates for your organization’s specific auto-activation date.

WHICH EDITIONS AND USERS ARE AFFECTED?

All users with the Lightning Experience User permission enabled are affected by this critical update. This includes all users with: (1) Standard profiles, which automatically include the Lightning Experience User permission by default and (2) Custom profiles or permission sets that have the Lightning Experience User permission included.

Set Up Users for Lightning Experience

HOW CAN YOU PREPARE FOR THE UPDATE?

Salesforce offers excellent transition tools that automate and speed up the process. The Lightning Experience Transition Assistant is a one-stop shop for all of the recommended steps and tools that you need; but of course, DaizyLogik is available to assist clients as well.LexNov2019TipsDaizyLogik has done several upgrades to Lightning now, and depending on the timing of the move and the level of customization in the Salesforce instance, the level of effort has been between do-it-yourself to “you need a developer”.

Salesforce has continually improved the automatic inventory of artifacts that need special attention during a Lightning conversion, also known as the Readiness Check. The Lightning Experience Migration Assistant has been replaced by the Lightning Experience Transition Assistant, your central hub for all of the recommended activities, tools, and resources for a successful transition. There are now Beta versions of tools to inventory and convert JavaScript buttons, Visualforce pages, and URL hacks.

Some of the artifacts can be converted automatically by Salesforce, but for those more complicated cases that the tools cannot convert, you will need a consultant and possibly a developer to build the equivalent button, link or page navigation in Lightning.

Specifically, we want to show how we leveraged the power of Lightning Components to solve some of the more complicated cases we ran across.

HomeKeeper – A Fieldset Container Lightning Component

Problem Description

DaizyLogik and Grounded Solutions Network were working on making the HomeKeeper app managed package Lightning compatible. The primary custom object in HomeKeeper has nearly 300 fields on its package page layout, a common design in Salesforce Classic for complex objects that allows users to view related fields of a record on one page via formula fields.

One limitation when using Lightning experience is that a maximum of 254 fields can be displayed on a page layout or Lightning page. For an object with more than 254 fields, not all fields can be added to a Lightning layout to be displayed all at once, which means an administrator needs to be selective as to which fields will be shown. Currently, the available workarounds are:

  • Use Salesforce Classic
  • Remove fields from the layout so fewer than 254 fields are displayed at one time
  • Find a Lightning component on the AppExchange that can display fields from an object and ‘break up’ the page in multiple parts. This particular workaround would not work in our case, because of the need to package such a component with the HomeKeeper App, which is not possible.

Adding CAPTCHA to Volunteers for Salesforce Sign Up Form

Nonprofits love when volunteers sign up and engage with the organization. When using Volunteers for Salesforce this is accomplished through the sign up form that allows sign ups to flow from the online form directly into Salesforce. It is therefore important to protect the quality of the incoming data and make sure it is humans signing up and not bots.

This article will show how to enhance the Volunteers for Salesforce Signup page with CAPTCHA using very little customization.

Please keep in mind that the Volunteers for Salesforce Sign Up page is part of the managed package Volunteers for Salesforce so in order to add the CAPTCHA some coding will be needed.

Building A Teacher Portal Using Salesforce Communities for ArtsCorps

ArtsCorpsArtsCorps works with a growing number of teaching artists and other teaching professionals who need to track and submit student attendance as well as payroll information.They had designed a functional solution, but after a number of years, the team realized that it was not a solution that could scale to accommodate the need for a growing number of teaching artists to submit attendance tracking data, timesheets, and expenses.

The ArtsCorps team reached out to DaizyLogik to propose alternative solutions that would allow teaching artists to manage and enter attendance for their classes, timesheets, and expense information through a self-serve online portal. After exploring several options, DaizyLogik recommended using Salesforce Customer Communities to build the teacher portal that would put the ability to manage class information, student attendance, and payroll information in the hands of teachers.

Read more about how this customized solution helped ArtsCorps by designing a simple, self-serve system to support their team.

Addressing Salesforce CRM Storage Limitations – A Document-Oriented Database Inspired Approach

Most organizations start out with 1GB of storage for Salesforce CRM. This can be a challenge especially for nonprofits who would like to collect a lot of data needed to report to their funders,  collect program data or consolidate multiple aspects of their business data into Salesforce. Over time the data fills up the allotted storage and puts organizations into a bind to either purge data or purchase more storage.

Over the years we have explored different solutions that can be used as preventive measures and limit the storage used. The traditional approach is to either export and archive or aggregate and purge older records. The drawback with these solutions is that you can no longer see the details of the historical data in Salesforce.

Below we describe a different preventive approach inspired from document-oriented databases that allows organizations to keep their data and not run the risk of running out of storage.

Which flow would that be?

If you’ve ever run into or received this error message from Salesforce you know how frustrating it can be to not know right away which flow this is referring to.

The record couldn’t be saved because it failed to trigger a flow. A flow trigger failed to execute the flow with version ID 301A0000000TizV. Flow error messages: <b>An unhandled fault has occurred in this flow</b>An unhandled fault has occurred while processing the flow. Please contact your system administrator for more information. Contact your administrator for help.

 

Here is one way to find out which flow this is referring to. Open the Developer Console and navigate to Query Editor. Type the following query, plugging in the id from the error message:

select masterlabel from flow where id = '301A..........V'

Make sure you check the “Use Tooling API” checkbox at the left bottom of the screen. Click Execute. This will return the label for the flow or process builder. Voila!

Contributing to an Open Source Salesforce Managed Package

Use Case: Volunteers for Salesforce

Some Salesforce managed packages provide developers in the community the opportunity to contribute with code and features. Packages such as the Non Profit Starter Pack or Volunteers for Salesforce are open source software, which means developers can contribute to the code on GitHub (https://github.com/) resulting into new features or improvements to the software. These features are then packaged into the managed version being upgraded.

University of New Hampshire engaged Daizy Logik to develop several enhancements to Volunteers for Salesforce that were then incorporated back into the package. Based on this work we developed this step-by-step technical guide on how to successfully contribute to an open source Salesforce managed package. The process described here uses Volunteers for Salesforce as an example but could be more generally applied to any open source managed package.

Development Environment Setup

To facilitate the setup of your development environment we recommend using these freely available utilities that should be available on both Mac and PC.