Salesforce TDD (Test-Driven Development)

Disclaimer: The following is written on the basis of what has worked for me in the past. This is not intended to be a formal or exhaustive description. Use it as you see fit, I do not take any responsibility if you screw it up! 🙂

Hi, I’m Diego and I have several years (I prefer not to say how many, but let’s say “enough”) working in Salesforce. I am also an Agile enthusiast and lover of applying related techniques throughout my work.

I’ve found test-driven development (TDD) can be a great technique for building robust software, but when we work in Salesforce, I find some constraints or restrictions can make it frustrating. In this post, I’m going to show when and how I use TDD while coding in Salesforce.

Let’s start at the beginning:

What is TDD?

TDD is an Agile development technique that requires you to write a failing unit test before writing any “production code.”

How are you supposed to do TDD?

First I’ll describe how TDD is done in general (this is the way to go in languages like Java).

  1. Write a unit test and make it fail (a compilation error is considered a failing test). Write no more lines of code than needed.
  2. Write the least possible production code lines to make the test pass (fixing a compilation error is considered a pass test).
  3. Refactor the code.
  4. Repeat until you are done.

Let’s check out an example in Java so you see how it works. In this example, we wanna create an advanced calculator of integers.

We work in split view when doing TDD

ROUND 1

Let’s write a failing unit test:

Oops, MyCalculator is not defined yet, compilation issue…therefore, it is a failing test.

Let’s make the test pass:

Compilation problem fixed! The test is passing again. Woohoo!

No tons of code to refactor. 

ROUND 2

Let’s continue with that test to make it fail again.

Mmm…getOpposite is not defined, ergo compilation issue, ergo failing test.

Let’s fix that. Let’s write the minimum code to fix the test:

getOpposite is defined and returns 0 to any parameter (in particular, 0). Test is passing again!!!

Let’s refactor.

We still don’t have much code to refactor, but there are some name changes we could use to make code easier to read ( yup, yup, yup…unit test code is code, too).

Much better now! 😀

Round 3

Let’s add a new minimum test to fail.

Right now, getOpposite returns 0 to any parameter… it’s a fail!

Let’s write the minimum code required to make the test pass.

Yay! It’s green again! Let’s continue.

Round 4

Let’s add a new failing test.

Last test fail (we are return 0 to any value different than 1), so now we need to write the minimum code to fix this test:

Test is passing again… but this solution is not good, let’s refactor.

Tests are still passing and we solve all the cases! We are done! Well, not actually, we still need to document, test more, write more tests and write even more tests…but we’re on the right path.

I expect this silly example gives you a feel for what TDD is and how it is done.

Now, let’s continue with the discussion, focused on Salesforce.

TDD Advantages

  • Code coverage: We get great code coverage without even thinking about it.
  • Testability: The code is designed to be testable by default (we are actually testing every time we change something).
  • Easier to refactor: We should not change or refactor code without having a set of tests we can lean on. As we are constantly writing tests that we know are able to catch bugs (we make it fail at the beginning), we know that we have a set we can rely on.
  • “Better” code: We are constantly refactoring the code, striving for the best possible code.
  • Predictability: After we finish a “round,” we are completely sure the code is working as we designed it to work and we know we didn’t break anything. We can say we have “working software.”
  • Prevents useless work in Salesforce: In Salesforce, aside from Apex, we have plenty of options to make changes like triggers, workflow rules, process builder, etc. Imagine that after we write a test that changes a value on a contact record, it passes. We could discover that there is another moving part that is taking care of that change (or we wrote the test badly).
  • Documentation: Tests are a great tool to communicate with other developers (or the future you) how, for example, a class API should be called and the expected results of each case.

TDD Disadvantages

  • Overtrust: It happens to me that, as we are testing continuously and we are getting test green, I sometimes have a feeling that the code is working perfectly…but it doesn’t mean it is. We may miss, or simply get lazy, and leave a case out of the unit test.
  • Slow in Salesforce: TDD is designed based on the theory that compiling or writing a test is really fast (a jUnit unit test has to run in less than 1ms). In Salesforce, we need several seconds to compile (the code is compiled on the server) and several more seconds to run the test. In my opinion, this is usually 10+ seconds. As we are compiling and running tests constantly, we add several minutes of “waiting for Salesforce.” However, this can be mitigated if you think you will need to write/compile/execute tests later anyway – you might as well do it upfront.

Me when I realize the QA found a case I had not considered when I was doing TDD

I will (probably) use TDD when…

In general, I’ve found that TDD is a great tool in several circumstances and I tend to do it almost always in the below cases.

  • Back-end bug fixes: Doing TDD in this context has two big advantages. First, you make sure you are able to reproduce the bug consistently. Second, and even more important, as you are writing a test specific to the bug, you know you will never introduce that bug again.
  • Back-end work with clear requirements and a clear implementation strategy: In this context, writing tests is going to be easy and implementing the production code will be easy, too, as you know where you are heading when you create the test cases.
  • Back-end work with clear requirements and minor implementation unknowns: In this context, the test is easy to write and the production code may be getting clearer as you move into cases.
  • Back-end work with some requirements discovery: Imagine in our calculator example you write a test to divide by zero and you realize you’ve never discussed that case with the BA. TDD helps you discover opportunities to clarify requirements.

I might do TDD, but it’s unlikely…

  • As part of requirements discovery: You could write unit tests as part of requirements discovery, and discuss it with your stakeholders, BA, or other technical people, but you probably have better techniques to support this process.
  • Front-end work: I’m gonna discuss this briefly later, when we talk about Lightning web components.

I will never do TDD when…

  • I’m doing a prototype: By definition, a prototype or PoC should be discarded after we show it, so I code it as fast as I can, focused on demonstrating the core functionality.
  • I’m experimenting: If I’m trying a new idea, I don’t focus on code quality (again, this is a prototype).
  • I’m evaluating implementation options: There are some cases where you want to compare two implementation options, so focus on having a good-enough-to-decide prototype and throw it away after you decide…then do the stuff well.
  • I don’t care about code quality: I know code quality is not usually negotiable, but in very limited and extreme situations, it may not be the top priority. For example, when everything is screwed up on prod and you need to fix the problem ASAP because the company is losing millions of dollars per minute. In this very extreme circumstance, fix the problem as fast as you can, make your company earn money again, go to sleep (or maybe get a drink) and tomorrow at 10 am (yup, after a stressful night, start working a little later the next day) make the code beautiful with TDD. Make a test that reproduces the bug and then fix and refactor the code properly.

Me again, but on one of THOSE nights.

  • When creating test code is extremely difficult (but not possible): In Salesforce there are a few elements that are very hard to test, like working with CMT. In this scenario, I’d probably split the problem into two parts – one that is TDD-doable using mocking data (@TestVisible is your best friend here) and a second, smaller part that I’d consider how to test later (if I even consider it).

How I do TDD in Salesforce

I really don’t do TDD as I defined at the beginning of this article when I’m working in Salesforce. Why? Mainly because of the slower compile/test flow, but also because in Apex we generally start writing integration tests instead of unit tests. Instead of “regular” TDD, I tweaked the formula a bit to work better under Salesforce circumstances.

  1. Write an entire deployable test that checks the flow or use case. Yup, I said deployable, so if I called a method I haven’t created yet, I will create it, empty, so I can deploy.
  2. Run it and get a failure.
  3. Write the minimum code that makes that test pass.
  4. Refactor.
  5. Continue with the next flow or use case.
  6. When I’m done with all the flows and use cases, I refactor the code again (splitting methods, checking code cleanliness, documentation). I run the unit test continuously, every few changes to check if everything continues to work as expected.

To make everything clear, let’s view an <could-be-real-world> example.

Requirement:
As a user, I want the values stored in any object copied into a number of specified contact fields. The specified “mappings” will be stored in a CustomMetadataType called Contact_Mappings__cmt. The Contact_Mappings_cmt has two fields:

  • Original_Fields__c Text
  • Mapped_Fields__c Text

Round 1
As I said before, I should start writing an Apex test that tests a business case. The first thing I’m thinking of developing is “The contact should not change if there is no mapping defined.” I have to write a deployable test that is going to fail with the minimum amount of code to make it fail:

We work in split view

As expected, the code deploys but the test fails. So, we need to fix it! We can simply return the same object.

Now It passes, but we don’t have a lot of code to refactor (we could extract some constants in the test).

This is a much better test.

Test still passes!

Round 2

Okay, let’s add another case. What if we check that the User.LastName is copied into the contact when I define the Mapping Lastname => Lastname? Great idea, let’s do it!

I start to write the unit test but…. I realize I can’t do an Insert in a CMT. Or, I give seeAllData permission to the test and define it in the project metadata. Or, I have to somehow deploy it. 

Remember that I said that I don’t do TDD when writing the test is extremely hard? Well, it looks like I’m in one of those situations. At this moment, I can quit writing this blog post and go cry…or I can redefine what I am developing with TDD, leaving all the complexities outside of scope. I imagine you would be very annoyed after reading this far to see me just quit, so let’s go with the second option.

I can’t use the CMT right now, so let’s do something different. What if we use a Map<String, String> where the key is the field in the original object and the value is the list of fields names in the Contact Object. It might work, later on we just need to read the CMT and create a Map with that information, but spoiler alert…that won’t be covered in this article.

But okay, great, let’s create a map and write the deployable failing test.

And as it was expected… it fails.

Let’s write the “minimum” code that makes that test pass

Our new test passes, but the other one failed! Let’s fix that.

Let’s do some refactoring, either in test or production code.

I think the put/get part is messy to read (and has its own meaning), so let’s split it into its own method.

Also, as we want that theMap could be injected into test case scenarios, the @TestVisible annotation is useful here.

Round 3

Now we should add a new test that executes a new flow and see it fail. I think you got the idea, so I won’t do it now, but just to specify the cases, I can think:

  • Mapping a field to multiple fields (separated by colon)
  • Does nothing if origin field is wrong
  • Does nothing if destination field is wrong
  • Does nothing if types are not compatible
    …and so on

Can we do TDD in Lightning web components (or front-end)?

The short answer is yes, we can. 
Long answer: As the Jest test can’t see the objects, but they see only the “generated DOM”, it may be harder to do TDD in an efficient way for front-end solutions. Usually, it is better to test visual code by watching the result and THEN write the tests we need to ensure code won’t break in the future.

Conclusion

TDD is a best practice that’s good to master so that you can decide the best moment to apply it (I don’t believe there is One Ring to rule them all, One Ring to find them, One Ring to bring them all, and in the darkness bind them, thank you J.R.R. Tolkien). Applied correctly it will make you produce better, more robust code…and fewer bugs, which means…

Homer is happy

Developing Salesforce Lightning Web Components

In mid-2020 we started a project to build small Salesforce components that could be added to any application or even a registration page. That project has grown to include twelve components currently in production and many more on the way. We publish the components on the AppExchange for free so any Salesforce administrator can install them into their org to try them out. Our team builds components that are utilities that can help us on a daily basis, or complement our other work in some way.

Lightning Web Components

There are a few approaches we could take to build components like these, but we wanted to take advantage of the newer Lightning web component architecture. It uses JavaScript, HTML, CSS, and the Lightning Design System. When we need to access custom and standard object definitions or build and call REST APIs, we use the Salesforce Apex programming language.

Lightning web components are a powerful tool because they present data to the client in a dynamic and reactive way. Most components are designed to directly support the Salesforce users who will be interacting with them. This approach allows our team to build for desktop and mobile with very few differences in the code structure. And the Lightning Design System is crucial for designing and developing a UI that is consistent with the rest of the Salesforce experience and is easy for the end-user to understand.

Even though all the components are “components”, some of them could be classified as “sub-components”, meaning that one could be nested and work inside another. This allows the team to distribute tasks better and work more efficiently. It also allows the components to be scalable and to add more features to a single component. It also has the advantage of making the work neater: the code is more organized as each component has its own functionality. 

Customer-centered Logic

When creating a component that runs in a complex environment like Salesforce, we want to be sure to minimize the number of interactions with the server. Customer-centered logic helps us reduce response time and to create elements that interact with the client faster. This approach lets the server delegate many of its responsibilities to the browser. Since it acts as a controller, all the user’s logic is handled by the browser.

Developing in this way requires a disposable cache that stores data locally, reducing the response time. The approach is called a “View-Controller-Controller-Model” because it has both a server-side and a client-side controller. Other frameworks such as Visualforce do not interact as quickly with the customer because they continuously consult the backend and request information and/or approvals. They depend 100% on the server. The server has to handle all the user’s requests and analyze what the user needs, then access the database, answer the question, and then render the page for the user. Not very efficient.

Component Ideas

The process of building a Lightning Web Component starts with a brainstorming session. Once all the ideas have been discussed, the team does a reality-check and chooses the most Lightning web component-friendly options. Then a team is designated to research available APIs on the market and determine which libraries they need. It’s only at that stage that we determine if it is feasible to develop that new component. If it is, a designer then creates a sketch with the layout, titles, logo, and color palette, and the development team starts building the components and Apex classes. 

We currently have three Lightning web components published on the AppExchange, including Oktana Calendar and Oktana Youtube, with more components already in the security review process. It takes time for the Salesforce security team to complete their review and approve any app or component, and that review process has become even more rigorous recently. We’re excited to share with you our new components as they’re approved and published on the AppExchange. Keep an eye on this blog or check our Salesforce AppExchange listings page.

The Best JavaScript Certification for 2021: Salesforce JavaScript Developer I

The Salesforce JavaScript Developer I certification, introduced in 2020, is an excellent way to demonstrate experience developing with one of the most popular web programming languages. JavaScript developers work with front-end and back-end development and even related technologies like Salesforce’s Lightning web components. This credential is a great way to further your development career.

Tips and secrets to obtain the Salesforce JavaScript Developer I Certification 

The JavaScript Developer I certification includes a multiple-choice exam that validates core JavaScript development skills. A huge benefit of the Lightning web component programming model is that developers write standard JavaScript. Passing the JavaScript Developer I exam demonstrates that you have the standard JavaScript fundamentals required to develop Lightning web components.

To learn more about this certification, we spoke with two developers from our team in Paraguay: Laura S. and David N.  They both decided to complete the certification to refresh their knowledge in Javascript and to demonstrate their abilities.  They both work closely with Lightning web components and wanted to expand their knowledge of JavaScript to help with that work.

The certification consists of two parts: the Lightning Web Components Specialist Superbadge and the JavaScript Developer I multiple-choice exam. These two parts can be accomplished in any sequence. Laura and David found that it can take approximately four weeks to finish the trail mix and study for the certification. But it all depends on the hours of study you dedicate to it.

The exam is structured around 7 main topics

Laura and David agreed that the most difficult topics are variables, types, and collections. Specifically about the types of data that Javascript handles since each one has its own methods. And, among the easiest topics to understand is asynchronous programming.  In the exam, they give you scenarios and ask you to apply asynchronous programming concepts like using event loop and event monitor or determining loop outcomes.

David considers understanding Javascript testing functions one of the more interesting topics. Other programming languages required additional libraries to do unit tests, while Javascript has built-in test functions. Laura considers server JavaScript (Node.​​js) more interesting. There are many languages that can be used ​​for developing on the server-side, but she prefers JavaScript.

Oktana’s training team was very helpful to Laura and David. The team guided them from the beginning through to obtaining the certification. They gave them access to platforms like Focus on Force and Udemy, where they could practice until they felt ready to take the exam.

Why do we recommend this certification?

There are many reasons to want a certification like this. For some, it’s a way to advance their career. For others, it’s an opportunity to structure and strengthen their knowledge of the language.  

In David’s case, he works front-end and handles web components, so having a deeper understanding of JavaScript helps a lot. Also, it helps you as a tool in some types of projects. For example, in the projects that you carry out for Salesforce, in which you have to modify some component, that work is 100% Javascript. Additionally, it helps to learn new elements that you were not exposed to before, and that are not very commonly taught in the certificates. There is always more than one way to solve problems, the certification helps you to discover new functions and approaches that can make your work easier. Finally, Javascript runs better in browsers, so it is the most logical thing to learn. It is very useful!

Laura and David highly recommend this certification and they believe  all developers should obtain it. It’s also a great way to learn more about Salesforce.

Certification preparation resources 

What are you waiting for? Start preparing for this certification. Also, if you are interested in other Salesforce certifications, our team strongly suggests following the Salesforce Platform Developer I.

 

 

QA testing methods for better products

Agile processes inspire a more collaborative environment to design and release digital products. This methodology, particularly popular among tech and innovative entrepreneurial companies, brings a new high-speed workflow that companies must be able to meet. In this context, QA testing methods are more important because of their ability to increase efficiency and improve work processes within the tech industry. 

Having consistent QA testing procedures will increase your customers’ satisfaction, which will be reflected in long-term commercial relationships. QA has a direct impact on revenues, so it’s important that leaders include QA engineers in the entire process of digital product development. A strong QA team provides a wide range of tests that make sure digital products work, and saves companies a lot of money and working hours. Let’s go over some of the QA methods our team applies.  

Smoke testing

Smoke testing is very helpful to review whether the most crucial features involved in an app or software are working properly. It’s a primarily scripted testing method that provides a quick big picture view of your digital product. Smoke testing aims to ensure overall functionality.  It’s a useful starting point to get the bigger picture of the digital product and proceed with other more specific methods. It’s also a source of data to decide if it’s time to continue to production or conduct other tests.  As part of our QA strategy, we perform smoke testing all the time with Tok, our Chatter messaging app. This is particularly helpful to ensure our new versions are 100% ready to be released in AppExchange. 

Regression testing

Regression testing requires tests be performed for every single area of functionality for the app or software after a change has been made. When bugs are found and the team does their best to fix them, the programming code changes. Each time the code is changed, it may impact other functionality that wasn’t supposed to be affected and may result in new bugs that need to be fixed. Regression testing helps us trace any unexpected impact from alterations. We helped Zola, a wedding registry, planning, and retail company, to test their web and native mobile apps. Regression testing provided great results and new learnings for both of us. 

Sanity Testing

Sanity testing is not performed to verify the core functionality (such as regression testing), but to double-check the rationality (sanity) of the digital products. It focuses on one or two (or a few) sections of the software. If any of them doesn’t retrieve the expected result; then the build should not continue with more rigorous procedures that may demand an extra investment of time and money.  This method is characterized as being narrow, deep, and normally unscripted. 

Exploratory Testing

This method encourages the QA team to “explore” the application and play around with it to identify and report any possible bug. Test cases are not required in advance. Actually, experimented teams use it to gain time before the Requirement Documents are not available yet. We are not talking about a lack of procedures; we are talking about the possibility of discovering, learning, and executing tests simultaneously. That’s why exploratory testing is widely used in agile environments. We highly recommend this method in your testing strategy because it uncovers issues that another functional testing wouldn’t be able to, it puts an emphasis on the UX and trains your team to become more intuitive and creative.

Other tests: 

Besides the three methods listed above, others may be included in the test plan according to the QA engineering criteria and, of course, the nature of the digital product. Here are some of them: 

  • Unit testing, the core of QA testing: This procedure aims to isolate functional pieces of code and test them separately. This way, the QA engineer makes sure every single part of a system works properly. This first scan provides predictability for the QA team to test at a higher level. 
  • Integration testing: When programmers write code, it interacts within a more complex system and those interactions must be tested with the same strictness. So, after unit testing has been successfully conducted, isolated functional pieces of codes are tested together. 
  • Stress-testing: Facing the unexpected is a part of life and it’s necessary to embrace it. Even though a digital product was thought to meet some criteria, it’s very likely that during its life cycle, exceptional situations will be presented. The QA engineer pushes the software to its maximum potential to discover bugs or points of improvement that are hard to identify in regular scenarios.  
  • End-to-end testing: 

In this type of test, the entire application or digital product is tested from a user perspective. It aims to analyze all possible ways a user can interact with the digital product and then, identify and register every point of improvement. The user is the center of this testing method, so the data reported can be particularly useful for the UX strategy.

Our commitment to QA testing

Because we have helped a lot of customers build and boost their digital products around Salesforce, we understand the importance of QA testing. Having a strong QA process not only means meeting our customers’ expectations but also implies money and time savings for our company. Tok, our Chatter messaging app, and other Lightning web components remind us every day that QA testing is a procedure that never ends, but is worth all the time and energy we put into it.

Tok 30 day trial - QA testing

Top Salesforce Developer Certifications for 2021

Salesforce is one of the most powerful business technologies on the market, which makes Salesforce certifications a great way to gain expertise and enhance your career as a developer. At Oktana we are committed to the professional growth of everyone on our team. That’s why we have a specialized training team that guides and prepares our entire squad to tackle new challenges and to help them build expertise across the Salesforce ecosystem and across a range of languages, frameworks, and platforms. 

During recent months we have published many articles about Salesforce certifications.  They are compiled here to help you figure out which option is the best to boost your career:

1. Salesforce Certified Administrator

Overview: 

  • Exam Duration: 105 minutes
  • Questions: 60 multiple-choice questions + 5 non-scored 


The Salesforce administrator certification helps you better understand Salesforce CRM fundamentals and demonstrates your expertise and abilities in the platform. You should be able to maintain a Salesforce org,  support common business requirements and inquiries, and last but not least, execute Salesforce administrative tasks. 
Not sure what Salesforce admins do? Start with this Trailhead module: Salesforce Admin: Quick Look. (10 min)

2. Salesforce Certified Platform Developer I

Overview: 

  • Exam Duration: 110 minutes  
  • Questions: Content: 60 multiple-choice questions + 5 non-scored 


Salesforce Certified Platform Developer I is probably one of the most important and complete certifications that Salesforce offers. Additionally, it is a prerequisite for many other certifications such as the Salesforce Certified Platform Developer II and it is the first step to becoming a system architect. It is an excellent way to demonstrate to your peers and customers that you have the required skills to complete a successful development project.

3. Salesforce Certified Platform Developer II

Overview: 

  • Exam Duration: 120 minutes  
  • Questions: Content: 60 multiple-choice questions 


The Salesforce Platform Developer II certification exam may seem daunting at first, but with some studying and determination, you’ll have that certification under your belt in no time.

It’s important to mention that to achieve this certification you must have already obtained the Salesforce Platform Developer I certification. During your preparation for this certification, you will learn how to leverage the advanced programmatic capabilities of the Salesforce platform and data modeling to include more complex business logic and UIs in applications.

4. Salesforce Nonprofit Cloud Consultant

Overview: 

  • Exam Duration: 90 minutes  
  • Questions: Content: 60 multiple-choice questions 


This certification enables you to design and implement solutions that are maintainable, scalable, and meet nonprofit business requirements. During your preparation for this certification, you will build a solid understanding of data management and database concepts, understanding of internet technologies and cloud computing, and more. If you are interested in earning this certification, you must first become a Salesforce Certified Administrator.

5. Salesforce JavaScript Developer I

Overview: 

  • Exam Duration: 105 minutes  
  • Questions: Content: 60 multiple-choice questions 


The Salesforce JavaScript Developer I certification, introduced in 2020, is an excellent way to demonstrate experience developing with one of the most popular web programming languages. JavaScript developers work with front-end and back-end development and even related technologies like Salesforce’s Lightning web components. This credential is a great way to further your development career.

6. MuleSoft Certified Developer – Level 1 (Mule 4)

Overview: 

  • Exam Duration: 120 minutes 
  • Questions: Content: 60 multiple-choice questions 


MuleSoft streamlines the process of integrating various systems, like new APIs, Salesforce, ERP, or legacy applications. It is a unique technology that makes it easier to integrate systems and manage the entire lifecycle of your APIs, including building, testing, deploying, and managing.

Even though there are no prerequisites for this certification, our team recommends having background knowledge of REST API services, the basics of web concepts, HTTP requests, and knowing how these work from a server perspective.

7. Tableau Desktop Specialist Certification

Overview: 

  • Exam Duration: 1 hour 
  • Questions: 30 multiple-choice questions 


Tableau is a visual platform that transforms the way we use data to solve problems. It empowers people and organizations to make the most out of their data. In 2019, Tableau was acquired by Salesforce, but its mission remains the same: to help people see and understand their data. 

Our team highly recommends this certification. Companies like Amazon, Experian, and Unilever trust Tableau business intelligence (BI) and analytics software to explore, visualize and securely share data in the form of workbooks and dashboards. Tableau is very user-friendly with drag-and-drop functionality. Tableau Desktop Specialist allows you to quickly clean, analyze, and visualize your data.

8. Informatica Specialist 

Overview: 

  • Duration: 90 minutes 
  • Questions: 70 multiple-choice questions 


Okay, it’s not an official Salesforce certification, it’s more like a complementary certification. Informatica enables you to migrate data from different data sources and transform the data according to business requirements.

Informatica certification is in heavy demand by enterprise companies that have large databases they would like to connect to Salesforce. If you work with Salesforce, this certification will expand on the methods you know to integrate Salesforce plus enable you to provide additional value to your internal teams or clients. 

Interested in working on Salesforce projects? We are now hiring! Check out our open positions.

Oktana YouTube: Embed & Share Videos in Salesforce

If a picture is worth a thousand words, a video is worth a million. That’s why we are proud to announce Oktana YouTube, our newest Lightning Web Component for Salesforce

Videos can be a strategic ally when it comes to communicating complex and important messages. Think about training the team on that new app you just purchased to increase sales productivity or that anniversary message from the CEO that cheers everyone up. Both are messages that need to be understood clearly and that have a greater impact when they feel more personal. Oktana YouTube makes your life easier by creating a place in your Salesforce org to embed and share YouTube videos to communicate with your team. 

Oktana YouTube

No code needed: Oktana YouTube is all about simplicity

Oktana Youtube is based on the Lightning Web Component technology. It is easy for Salesforce admins to install it from the AppExchange and to enable it on any Salesforce page. Drag and drop the component and you will be all set.

Alexis Mamani – Developer @Oktana Peru

Simplicity is at the core of Lightning Web Components and Oktana YouTube is no exception. Installing it from the AppExchange takes three (3!) clicks. Once the component is installed, you just enable it on the Salesforce page of your preference. The Lightning App Builder makes this easy for you. Drag the component and drop it wherever you prefer. As you can see, no coding skills are required to add Oktana YouTube to your org.

Admins have full control

As an admin, you get to decide whether to embed a corporate video for all of your users, or let them decide what to watch according to their needs. That’s up to you. If you need them to watch a specific video (let’s say a tutorial, a demo, or a message from the team lead), paste the YouTube ID in and you are all set. If you prefer them to be able to search, just leave the YouTube ID blank.

Oktana YouTube means flexible layout

As you create a new page in Salesforce, you also decide where to place your components. We recommend the upper right corner as the best spot, but you can move it according to your needs. Oktana YouTube also allows you to adjust the title and the height to fit your expectations. Good enough? You get the same flexibility in desktop and mobile. It doesn’t matter where you are, you can always watch your embedded videos. 

Oktana YouTube

Search videos

As Salesforce admin, you can allow your users to search YouTube videos from within your org. How does this work? Exactly as YouTube does. Enter keywords and the Lightning Web Component will retrieve related videos. Every user has their own viewing history stored, making it easier to locate previously watched videos. And you can always clear your search history with a simple click. 

Oktana YouTube is useful for everyone because it provides YouTube functionality in an intuitive way. If the admin allows it, users can visualize, share, and search any video they need. Anyone can use Oktana YouTube with other components in the same panel/screen. This way, users can access important videos without leaving Salesforce. 

Juan Chacón – QA Analyst @ Oktana Peru

All of this functionality makes Oktana YouTube a useful component you should definitely try. We leverage the YouTube API to embed and share tutorials, demos, or any other important message to your team right in your org. 

Install Oktana YouTube and give yourself another channel for your internal communication strategy. At Oktana, we care about your efficiency and experience in Salesforce, so if you think this is a good match for your company, install the Oktana YouTube Lightning Web Component for free from the AppExchange.

We create Salesforce products, check them out.

Oktana YouTube

Why become a Salesforce Developer in Bolivia

Thinking about a tech career? There are a lot of different directions, but the  Salesforce developer path is one that will enable you to quickly get started and expose you to numerous technologies as you work with companies to integrate and customize Salesforce. While a coding background is definitely helpful, Salesforce is a really good place to start your tech career.

You can explore this career path from the perspective of two of our Salesforce developers, Erwin and Sergio. They’re both new to Salesforce development, having joined Oktana Bolivia in 2020. They deserve an extra round of applause since their team started remotely during the COVID-19 pandemic!

In Bolivia, very few people know about Salesforce which surprises most of our team because they can see it’s a platform with a lot of potential. Because of its size and complexity, with so many different products, learning Salesforce on your own can be intimidating, but Erwin and Sergio have found that the learning materials and coaching provided by their trainer made everything much easier. 

Since childhood, both Erwin and Sergio showed a strong interest in technology, especially video game creation. This passion eventually led them both to software development. Before they joined Oktana, they had never worked with Salesforce, but had gained experience with different languages like Angular, C++, and Java. 

Similarities with common programming languages

Now that they have been working with the platform for several months, they have found some similarities with common programming languages:

  • Salesforce uses Apex, a proprietary language very similar to Java. The syntax is Java, but simpler.
  • The same happens with Lightning Web Components. They have a Java base, making their creation easier for Java developers.
  • The way Salesforce manages data is by storing everything in metadata. You can manipulate it using SOQL, which is similar to SQL.

Benefits of Salesforce

As a Salesforce developer, you help businesses by helping them integrate with a secure and scalable platform that’s easy to customize and upgrade without anything breaking. From the point of view of our Oktana Bolivia, here are some additional benefits of Salesforce:

  • Efficient: With just clicks, you can create a structure very quickly. Comparing it with other programming languages where you have to create the database from scratch, using Salesforce is much easier because the database structure is already created for you. Also, the way Salesforce organizes your information is great. If you have to make a change in Salesforce, and if you setup your metadata correctly, it is simpler to reorganize it, saving a lot of time.
  • Drag & drop page layouts: Salesforce lets you move fast by dragging elements and following defined steps which allows you to focus on other development.
  • Mobile: Salesforce offers a mobile application that lets you work like you would in the browser. When you build functionality for Salesforce, it can be made immediately available on the Salesforce app, so you don’t need to build a separate mobile app. 
  • Platform: The Salesforce platform is very intuitive. Salesforce teaches you to think about the easiest way to solve a problem, so it’s quite easy to follow this trend. For example, if you start working with Lightning Web Components, when you get some practice, you learn to create components one on top of the other and that interact within the same page, understanding how the components communicate with each other.
  • Environments: Salesforce already has everything hosted for you. It’s easier to develop in a sandbox environment, then upload it later to production. You don’t have to deploy, just take it to a sandbox to upload it later to a host and then production.

Salesforce best practices

On the other hand, working with Salesforce forces you to learn good programming practices like:

  • When you develop with Salesforce, it forces you to be more orderly and develop in the most optimal way possible, so your code is not chaotic. It’s really how you should program on any platform in any language.
  • Likewise, all the out-of-the-box tools are very well made and give you ideas of how you should develop if you aren’t working in Salesforce.

“I consider that the creators of Salesforce are THE BEST, they thought it through very well, and you learn from this.”

Erwin M – Developer

Challenges while learning Salesforce

Maybe the toughest thing is the declarative part of the flows. Salesforce has tools to automate data management. One is the Process Builder where you can develop with clicks, also with the Flow Builder, which allows you to create complex solutions all with clicks, too. In the beginning, it can be a bit complicated to select the right tool for each type of request, but with practice, you get to know everything that Salesforce offers and can do.

Plus, at Oktana, with the onboarding training and experience on different practice projects, you have an excellent base to get to know Salesforce much better. 

“There is a lot of information about Salesforce, so it is difficult to know everything, but with practice, you gradually get used to using this platform”  

Sergio Z – Developer

Why should you become a Salesforce Developer?

Erwin and Sergio highly recommend taking this career path, because it allows you to create different types of solutions, learn good practices and it’s a great way to start learning a different form of programming. Also, there is a lot of demand related to this career. 

It’s not necessary to have previous knowledge of Salesforce before starting this career path. If you know the basics of programming, that is enough. But, it does facilitate learning to have prior knowledge of web development, JavaScript, or basic Java (or C#).

What it’s like working with other cultures

Erwin and Sergio think it’s great, and fascinating, to work with people across several countries – every day they learn about the customs, food, culture, and places they would love to visit in Ecuador, Paraguay, Peru, Uruguay, and the United States. They also learn many of the similarities between countries. 

Something funny Erwin found when he started working at Oktana was that he had thought Salesforce was a simple and straightforward CRM tool, but after training and working with it, he was completely surprised by the size and potential of the platform. For Sergio, when he started working at Oktana, it was the first time he had worked with a Mac as a working tool. He thinks it isn’t as bad as some comments he’s heard from those who don’t use Macs, it has quite interesting and useful things.

It has been interesting getting started at a new job, learning new technologies, during COVID. For example, for Erwin, it was interesting several paid events around the world that used to take place in person, are now broadcast over the internet for free, allowing people to know and learn much more about Salesforce and new technologies for developing software. In the case of Sergio, working completely from home has great advantages. The fact of literally getting out of bed and taking a couple of steps to be in your work area, instead of taking a bus to go to the office, is really motivating. It’s also really relaxing too, at the end of the day, simply log your hours and close your Mac to be at home and rest. 

We’re still growing! If you’re interested in becoming a Salesforce developer in Bolivia, check out some of the Salesforce Certification articles we’ve put together and our current open Salesforce developer positions in Bolivia.

Salesforce Einstein and the Applications of Machine Learning API’s in Brand Growth

If you’re like me, you have about a billion photos in your photo album that you peruse after you’ve had a drink or are feeling sentimental. These photos could be of a dinner full of unvoiced farewells at a well-known restaurant with a childhood friend that is getting married or a photo of the first car that you bought. But, behind all these life events, there’s usually a brand or business associated with the experience.

Salesforce launched Einstein (AI) built into its Customer Relationship Management (CRM) platform in 2016 and Einstein is now delivering more than a billion AI-powered predictions each day. Einstein is capable of delivering advanced AI capabilities to Salesforce Service Cloud, App Cloud, Platform Cloud, Marketing Cloud, Sales Cloud and enables nearly anyone to build artificial intelligence powered apps through clicks or code.  

Within these clouds, App Cloud uses Einstein to integrate AI into its apps for enterprises and consumers. External developers utilize APIs to bring deep learning to their apps with Prediction Vision Services. Prediction Vision Services classifies unstructured images by comparing them to a vast library of pre-trained classifiers.

What this means, essentially, is that a massive range of images is categorized and fed into a neural network in order to “learn” how to classify them in an autonomous way.  

What are the implications of such image learning software?

The implications are actually widespread and exciting. Using such software would allow images that are not specifically tagged with names of brands, but are still online, to be found. The data is then used to deliver solutions and offers to people. For instance, the photos that you have online of your new car can be found by the people who manufactured it to offer personalized advertisements or messages.

KIA and SEEDPOST Collaboration

SEEDPOST, a digital communication agency in South Korea, partnered with KIA Motors to use an API developed by Immaga, a Bulgarian-based company that focuses on image analysis, recognition, and understanding to do just that. KIA Motors wanted to advertise its new KIA K5 Optima model so SEEDPOST used Immaga’s own Auto-Tagging API to match thirty-six different types of the KIA K5 Optima model. People testing the process could log into a website using their social media accounts, pick three images that they thought best represented their lifestyle, the API would sort through keywords that best represent the image contents and then generate a page with custom offerings from a profile pool of thirty-six different customizations (colors, engines, seats etc.) of the KIA K5 Optima.

We built a demo that can demonstrate the potential of the newly developed AI from Salesforce that can demonstrate the potential of their newly developed AI just like KIA did with its new model. We developed a puzzle-solving application to demonstrate the API’s capabilities and to offer a glimpse of the services to come.

In our demo with Einstein Puzzle at TrailheaDX (Salesforce Developer Conference), we decided to engage TrailheadDX attendees with the Einstein platform by providing the attendees with iPad Pro’s that can be used to piece together a puzzle. People took their iPad’s camera, showed it a piece of the puzzle and the Salesforce Prediction Vision Services API matched the piece with its place in the puzzle.  

The success of brands in the future would potentially be by leveraging data like those within untagged photos of brands, products, and experiences in social media posts to build digital solutions for client’s audiences that improve their lives in an organic way.

At Oktana, we help clients leverage data and build such solutions. We approach all our projects with a focus on the quality of the design and development that we do. We also provide dedicated support long after we implement solutions for our clients. These commitments to our craft have always been a driving force behind the business decisions we make, the culture we cultivate and how we move.

So, we’ve decided to take our products to the next level in this age of emerging automation and deep technology. We’re ready to continue to keep on top of digital trends and use machine learning, like Einstein’s APIs. And we’re committed to building and delivering the future of Salesforce technology and cutting-edge digital products– today.