In the prior exercise, users ran a Salesforce Custom Report and uploaded the CSV format to Anaplan. This exercise is similar, but the custom report command is substituted for a Salesforce SOQL Query. SOQL queries are more complex than reports. However, they provide added flexibility in how the data is extracted.
Step 1: Copy the Chain
Some of the setup of the Chain created in the previous task "Upload Salesforce Report to Anaplan" can be reused, so copy the Chain.
From the left-side navigation panel, choose "Build".
The "Upload Salesforce Report to Anaplan" should display both the Salesforce and Anaplan logos. Click the ellipses to the far-right of the Chain.
Step 2: Edit the Chain
To the right side of "Upload Salesforce Report to Anaplan -- Copy", click the pencil-icon or select the ellipse and then "Edit".
Near the upper-right corner, select "Chain Settings".
Rename the Chain to "Upload Salesforce Query to Anaplan".
Save the change.
Step 3: Delete the First Command
To delete a Command:
Click the Command and then select the trash icon.
Click "Delete" when prompted.
Delete the "Salesforce Opportunity Report" Command.
Step 4: Add Salesforce SOQL Query
Add the first Command by selecting the Salesforce ➡️ SOQL Query operation.
💡 Use the Find tool to search for "Salesforce" and then for "SOQL".
Click-and-drag the SOQL Query Command into the Chain Start circle.
📓 The Chain Start will show a plus (+) icon indicating that the command may be placed at the start of the Chain.
Double-click (or hover + pencil icon) to edit the Command.
Copy the following query and paste it into the field Query:
SELECT Id,Name,Amount FROM Opportunity
Step 5: Update the Upload to Anaplan Data Source
The second Command of the chain needs to be updated to use the new output of the first Command.
Rename the Server File to "Salesforce SOQL Query".
Update the Source File by first removing the "Not Found" reference and then selecting the "SOQL Query Output" from the variable menu on the left.
Step 6: Publish & Run the Chain
Publishing is an important feature in OneCloud. Chains must be published, before they can be run. A Chain and its respective Commands will not be executed otherwise. Whether making one alteration or many, the Chain must be published every time a Chain or Command is edited.
Publish ➡️ Execute ➡️ Run Chain.
To publish a Chain, click "Publish" near the upper-right corner.
Optionally, add a Publish Chain Comment. For this example, leave it blank.
Once published, the "Execute" button becomes active. Click it.
Once executed, the "Run Chain" button is activated. Click it.
The Chain will animated when it is running.
Click on the Anaplan Upload File Command.
When the Chain has been run, the outputs will be available to view.
Step 7: Confirm the data in Anaplan
Login to Anaplan and find the Import Data Source "Salesforce SOQL Query".
📚 Related Topics from this Section: