DX to automate your work

In preparation for the CzechDreamin Pawel asked me to help him with preparation of 40 Field Service Lightning (FSL) instances. No problem, the guide has just 12 pages and I’m super lazy, luckily I heard about Salesforce DX.

1. Authenticate to instances

This was the most manual step as I had to login into each instance.

sfdx force:auth:web:login -a fslX

where X is number from 1 to 40.

2. Create a batch

Second step is old good bat file, which will run my commands on each instance.

for /L %%A IN ( 1, 1, 40) DO (
     sfdx %1 %2 %3 %4 %5 -u fsl%%A

The for cycle starts at 1, has increment of 1 and finish at 40, will take first 5 arguments from command line and run them as sfdx parameters on specific instance (-u fsl%%A where %%A is the number).

I saved this file as run.bat.

3. Install package

First step in configuration is easy, install a package.

run.bat force:package:install --package packageId

where I got the packageId from the installation link (04txxxx).

4. Download data from referential instance

Pawel configured one instance as an example, from which I could take metadata. The good approach is download only metadata you need to push, but I found out it is easier to download all of them and copy those I need to separate directory to push them to instance.

First of all I had to create the package.xml file. At VS Code you can use the extension for generating it, but I used the old good Package Builder and saved the package.xml file in a root of my DX project.

run.bat force:source:retrieve -x pathToPackageXML

I went through the data directory, created a new folder and copied what I would need – permission sets, object definitions (because there is sharing and feed tracking set), custom fields and fields which has to be tracked (because it is enabled on field level), quick actions, layouts (which includes page layouts and global layout) and profiles.

Sadly, the profiles are super tricky. If you download them as part of the whole package they are downloaded completely, would you use -m Profiles switch it won’t include the page layout assignment definition (and most likely other things as well).

5. Permission Sets

You copied the permission sets to your new folder and just push them in the instance.

run.bat force:source:deploy -p pathToNewFolder

And then you assign them to the one user you have there (I had to run it several times for each permission set I had there):

run.bat force:user:permset:assign --permsetname 'permSetName' 
            --targetusername yourUserAlias

6. Limit sharing on objects

Sharing is set on the object definition file, which is in the objects/objectName directory. If you already copied all those needed file in the directory you already pushed them to your instance. If not, copy now and use our best command

run.bat force:source:deploy -p pathToNewFolder

7. Enable feed tracking

The previous step also enabled the feed tracking on object, just didn’t enable it on specific field. Copy the specific field to your directory and deploy.

It is habit by now, you could compressed it all in one deploy.

8. Page layout assignment

I failed on this one. The assignment is done in profiles, I downloaded them with all the metadata, but DX doesn’t download metadata from managed package, so it doesn’t even download the relation to them in other metadata (like assignment in profiles).

Would you add the reference manually and deploy, nothing will happen.

Eclipse saved me – at least I thought so – as I was able to use it to download the metadata of managed package, copy it to my directory, change all names of referenced component to include the package name and successfully add it to profile and deploy.

Sadly it deployed the page layouts as well as another copy with the same name, which created a bit of mess.

9. Custom fields & actions

Just copy them to your directory and deploy. For global actions I also had to deploy global layout.

10. Update Data Integration Rules

The other request was to update Data Integration Rules to bypass triggers. I was able to download them but never upload them back, even without changing anything.

Object Name: The Field Mapping API Name can only contain underscores and alphanumeric characters. It must be unique, begin with a letter, not include spaces, not end with an underscore, and not contain two consecutive underscores.


It took me a while to figure all of that (as I did it for the first time) and then I look back, proud and had a simple question – why didn’t I create sandboxes? It would be way easier.

But doesn’t matter, I learnt more where the things are set and I feel I can use this in future for a few things. DX is simple, I used about 5 commands all together, the most important part was to find out where all the settings are stored.

Napiš komentář, díky!

Skloňování jmen

AppExchange zná většina zákazníků Salesforce – místo, kde si najdu aplikaci, kterou si můžu rozšířit funkcionalitu. Všechny aplikace tam ale nejsou, spoustu z nich mají partneři pouze u sebe případně u konkrétních zákazníků.

Z toho co jsem viděl kolem sebe, tak existuje následující:

  • napojení na banky (CRM pro neziskovky v rámci FPack);
  • napojení na IPEX telefonii (Sprinx Consulting);
  • napojení na Emailkampaně (Sprinx Consulting);
  • napojení na GoSMS bránu (AspectWorks);
  • napojení na SmartEmailing;
  • skloňování jmen.

Postupně bych ten seznam řešení od partnerů chtěl rozšiřovat, jak se mi podaří získávat podrobnosti. Pokud máte vyvinuté něco, co se dá znovu použít, tak dejte prosím vědět.

Skloňování jmen

Chce to tak půlka organizací, se kterými dělám – aby se jim samo vyskloňovalo jméno člověka a pak to mohli používat v mailingu.

Existuje služba, která zvládá skloňování – do 10 jmen denně je zdarma, za 150Kč/měsíčně pak 150 jmen denně. I s těmi 10 jmény denně se dá žít, pokud neimportujete nová data.

Napsal jsem tedy jednoduchou službu, kterou si můžete nainstalovat a začít používat.

Služba není připravena na hromadný import záznamů ke skloňování (není bulkifikovaná), což vám v běžném použití vadit nebude a mimo něj si ji musíte případně vypnout.

Jak funguje

Po nainstalování je potřeba vytvořit záznam v Custom Settings, který bude mít jako jméno klíč, který vám vygenerovalo sklonovani-jmen, a jste schopni zde skloňování vypnout.

Po vytvoření/uložení kontaktu nebo leadu, který nemá vyplněný 5. pád, zkusí nejdřív najít kontakt se stejným příjmením, které je vyskloňované, pokud nenajde hledá lead a pokud nenajde ani ten volá službu a nechá si vrátit vyskloňovanou variantu.

Pokud se skloňování nepovede, tak pole Vocative__c zůstane prázdné, nikam nezapisuji, z jakého důvodu se skloňování nepovedlo.

Hromadné skloňování

Pro hromadné skloňování má výše uvedená služba jinou cestu a sice přímého nahrání jmen, ke kterým potom vrátí skloňování. Touto cestou poskytne i lepší cenu za vyskloňované jméno.

Napiš komentář, díky!

A few notes from UG about Marketing

It is almost three month from our „biggest so far“ user group about Marketing. This time we had the opportunity to visit new Deloitte offices at Zizkov and enjoy the awesome view from terasa. Plus tasty refreshment and as we celebrated our 10th meetup we also got a cake.

Astro cake

First speaker was Zdenek Pejcel from mooza inspire, who gave us an overview of the whole online marketing idea, why is it important, what is difference between B2B and B2C and when to select which product.

Frankly, I’ve been shocked that only 2 % of cold calls result in an appointment or that sales people on average invest 6,25 hours to set a single appointment.

Not sure where these numbers come from, but they are scary and when you see them you know, why inbound marketing might make sense, as it is more customer centric than outbound.

Zdenek Pejcel

On the other hand, everyone will tell you that you need to create a content, but probably no one will tell you how much of it. A lot! Just imagine that the communication should be personalised to everyone, that you have maybe 10 personas of your clients, that you want to send email at least once a month and do the simple calculation. You need extra person to do the writing (or hire and agency) but you need to think hard about the content.

The fact, that buyers now-a-days are 60 % through sales cycle before they get in touch with you is … awesome and terrible at the same time. It means they might never get in touch with you because they will find someone better than you even without give you a call at all, it is great because once they get in touch you already have a deal (almost).

Sales Cloud, MailChimp, Pardot, Marketing Cloud

Which one to choose? Hard question as the answer depends on you a lot.

I would say most companies are ok with the standard mass mail from Salesforce, as they just want to send some simple email (text email with minimum graphics are popular again) and they do hardly any analysis.

Marketers love Mailchimp, it is super easy to put together nice email in it, the analysis is pretty powerful one as well. Sadly the integration via the free app just sucks (unless they changed something again in last a few months) and they limit the free account more and more (and not many people want to pay). You can still switch to SmartEmailing (for which I wrote an integration, more about it in coming weeks) or Email kampaně (for which Sprinx wrote the connector). But they are both paid anyway.

Pardot is focused on B2B, is easy to set up, but lacks the whole omni-channel capability (come to CzechDreamin to find more about this).

Marketing Cloud is the whole family of products and you really need to choose the right product you need. But then you get the whole thing including social, mobile push, geo location, integration with web. And as Filip Pasek from Zonky says

Only limitation is your imagination

The second presentation was from Filip, who was responsible for CRM implementation at Zonky (PPF, P2P loans platform, fintech, startup and other nice acronyms).

Frankly, I’ve been surprised how quick the project was, how a few people was part of the team, how personalised is the communication for each recipient and how complex the whole flow is. Calls, emails, SMS, pop-ups, push to mobile, chat bots, facebook, … And they continue on their journey with Salesforce to have one CRM, integrated with Telco provider and their internal system.

Filip Paseka

I also heard the common complains – hard to test, no sandbox – and how they dealt with it, which reminded me of the great Cyril’s presentation I saw at French Touch Dreamin.

Traditional B2B company and Pardot

Robert Gassmayr told us how they used Pardot before big event. Just imagine big industrial company with sales cycle from 6 months to 2 years. I imagine papers, dinners and calls, cannot see much space for Pardot.

Well, they used it. Sent invites to the event with links to registration form for free tickets (which sounds like great incentive), which notified their sales manager that this customer will be there. Which alone is great benefits as they can prepare better for meeting with them or even propose it before the event.

Robert Gassmayr

At the event they had an app to „scan“ attendees and in a few seconds they had the whole journey of each visitor in their system for future analysis and marketing. Combined with the advertisement for the event before they got a tons of new leads and great statistics for future.

See you next time?

All presentations and some photos from this event can be found on our drive.

We will meet on September 10 to speak about fails and what we learnt from them. This meetup will be held in Czech language.

And just before the year end (December 4) we will speak about Dreamforce and have some drinks before the Christmas season will kick in. Are you going to Dreamforce and want to tell us a bit what you learnt? Still looking for speakers!

Napiš komentář, díky!

CPQ Specialist certification

I’ve been playing with CPQ a few years ago and this year attended awesome CPQ Fast Path training for partners. A few busy weeks and I finally found time to attend the certification and … passed it!

You might have heard, that this is one of the most demanding certifications to obtain, but I don’t really agree with this statement. I feel that Service Cloud or Pardot Consultant was harder, maybe not in terms of knowledge but trickinest, as there were some questions where you might disagree with the answers. CPQ cert is purely about knowledge and I feel is pretty black and white.

It took me a while to find the courage to do it and I went to the testing center as we got such recommendation. I did all the other certifications at home and I much prefer it, but here are some calculations for which is better to have a paper, which you aren’t allowed to at home. Well, I got one, but I must admit it was convenient to have the paper for some notes.

Reading materials

There are quite a few of them on the internet, Jan Vandevelde book referenced from everyone, but I found it a bit dry. I also liked the Yelena from SF9to5 blog and Santanu Boral visualised the object model and added links to Trailhead. If you like links to other resources Chris Gardner post might be useful.

But after all I liked the presentation from the Fast Path the best.

Check your vocabulary

Non native speakers might have problems with some questions (you know you can get extra 30 minutes?), in this exam I have to thing hard what „ramped up“ or „escalator opportunity“ might mean. I probably got it right, but it looks like these are some standard wordings in CPQ world, so it is good to understand them.

What you really need to know

Pricing and discounts make 39 % of the exam, so this is the priority. I would say discounts are easy, price waterfall as well, but you really should check price rules, including objects on which they can run. The same applies for product rules and if you know what all the settings in these two are for and what are the possible values there you are good to go.

Expect questions about hiding things on quote documents, twin fields and field sets. A bit about MDQ products. A few questions about configuration attributes.

And good luck. Don’t worry, this exam isn’t tricky, it just tests your knowledge.

And new version of this exam will be roll-out soon, the beta version is just available. Sadly once I passed the exam I wasn’t able to register for the beta to check the content, looks like the division between different areas is a bit more granular, but I’m not sure about the questions as the content looks about the same.

Napiš komentář, díky!

Lightning Sales Ops: Building Salesforce for Sales Development Teams, Matt Bertuzzi

Lightning Sales Ops, Matt Bertuzzi

I’ve been implementing information systems for last 20 years, most of the time CRM. After such a long time I should know a thing or two and I still found this book extremely valuable.

Matt divided the book into 5 parts – Identify, Plan, Contact, Qualify and Report and the biggest difference – to most of my implementations – is, that he focuses on teams which get a lot of leads. Which completely change the rules of the game.

Sales development reps are your highest volume Salesforce users, yet in terms of support, they get the scraps


  • Create a timezone field on lead – I never had such request but it make complete sense and just when you get this request you realise, there isn’t any support (besides picklist field) for such thing in Salesforce. It looks easy at first (it is just +- 12 hours), but do you really need all of them, what about summer/winter time, what about timezones which are divided. Plus use it for dividing leads into call times;
  • average SDR needs 14 clicks BEFORE his call to prospective customers just to check all the data and update a status;
  • lead or no lead? When I implement Salesforce at NGOs I go with no-lead scenario because they don’t really need to „separate“ contacts on multiple places. And I’m glad to hear that I’m not alone and normal companies might have use case for it as well;
  • update the „standard“ lead assignment to something better with flow – check for existing company and route to their AE and use only email domain for the mapping.


  • limit number of status to 6 or less;
  • add some rules from which status you can change to which;
  • use leads‘, contacts‘ and opportunities‘ status to set status on account;
  • make campaign names useful (not for marketing but for SDRs so they know what it was about), include additional details (such as link to presentation and elevator pitch) and extend the standard campaign member statuses (and you can use this app from AppExchange to set it on all campaigns);
  • add field with LinkedIn address which open a prepopulated search so they can find the contact quicker (and then save the right link into this field) – use workflow to set the default value when it is empty;
  • use flows to add important information to record details dynamically.


  • leverage path (check Trailhead what it can do for you);
  • add custom fields to tracking progress – disposition, last attempt date, last connect date, # of attempts;
  • create report based on those custom fields and you can monitor how they fulfil their SLAs;
  • speed up entering info – the standard log a call is nice, but it takes a while before it loads up. But you might create a custom action which predefines all the fields and it is enough to click it, which will speed up the process for people a lot;
  • don’t rely on tasks (the „always have open task“ rule), rather use the custom fields to monitor progress;

The presence of an open task doesn’t guarantee follow-up any more than the presence of a dictionary guarantees good spelling.

  • formalise you cadence and create automation to update Next Action Date;
  • power up your list views.


  • route meetings round-robins – this goes all the way how your SDRs work with AEs – is it 1:1, are those two separated groups, etc.;
  • pre-opportunity vs opportunity discussion is just awesome;
  • always create opportunity from contact – it creates contact role (you need it to Einstein Activity Capture work properly), bring campaign history, allows for campaign influence measurements. Because the manual creation of opportunity is pretty long create a checkbox on contact which will call flow which will create the opportunity.


I’m sure you’re hearing the same exact things, but I measure activities, conversations, meetings passed, meetings accepted, and trending.

  • PREVGROUPVAL AND PARENTGROUPVAL are support awesome, you just need to learn them!

All in all

194 pages, $3,79 and more tips then anywhere else. A lot of automation you can use, great ideas for reports and dashboards, this book is definitely worth the investment (in terms on money and time to read).

There two downsides of the book – the picture (at least on mine Kindle) are pretty badly visible and all the links in the book doesn’t work anymore 🙁

Napiš komentář, díky!