I came across a peculiar requirement recently, wherein we needed to download files in a scheduled job. As you all know downloading a file can be a tricky affair with Salesforce. Fortunately, using REST API we can achieve it. So, the solution became somewhat easier, wherein we could make a CURL call and download the file. However, all usual cases reference using login name/ password or some reference using the Connected app (OAuth) route. For my specific use case, I already have a machine setup with SFDX and with target orgs authenticated. This solution helps just in that case. With command line scripting it is quite easy (for folks who are experienced with the command line). It took some time for me to get it working. Note: This approach should be chosen after appropriate review/analysis of other approaches, namely, OAuth-based login flows for app authentication. Tools used SFDX - to retrieve auth tokens Curl - to make API calls via the command line JQ - to parse JSON in the command
Quick Tips: Sort Pipeline by Sales stages with Salesforce CRM Analytics (aka Tableau CRM) Problem Statement While working on a recent change, we realized (a bit late) that the sales pipeline view shows sales stages in incorrect order. Ideally, you would want the pipeline view to reflect the stage in the same sequence as the sales process (for example Prospect, Propose, Negotiate, Close). Sales Path Sales Pipeline Initial SAQL q = load "opportunities" ; q = group q by 'StageName' ; q = foreach q generate 'StageName' as 'StageName' , sum ( 'Amount' ) as 'sum_Amount' ; q = order q by 'StageName' asc ; q = limit q 2000 ; Solution Approach Approach 1: Augment a field within the Opportunity dataset (CRM Analytics) to generate a new column for the Sales stage sequence This approach would be faster to deliver and has comparatively less change. However, as sales stages are changed/ updated it can result in the Tableau CRM da