Developing Templates for the Salesforce Integration

How to Create a Template to Generate from a Salesforce Opportunity in Salesforce Classic Experience#

This article will walk you through all the steps to build a template that can be generated from within a Salesforce Opportunity


Before you start building a template to be generated from inside an opportunity, please make sure you have already:

  1. Created a Connected App for Salesforce in Windward Hub: Create A Connected App In Salesforce Classic Experience or Create A Connected App in Salesforce Lightning Experience
  2. Created a custom button for Windward Hub document generation: Integrate RESTful Engine into Salesforce Opportunities
  3. Have installed Windward Desktop Designer on your machine: How To Install the Desktop Designer

Creating a template to be run from a Salesforce Opportunity#

Start a Word document#

  1. Open a new blank Word document.
  2. Give your document a name and save it to a convenient location on your machine, like your Desktop or Documents folder.

Connect to Salesforce Data#

Connect to your Salesforce Datasource. You can do this by following instructions here: Connecting to a Salesforce Data Source

Create a "uniqueID" Input Parameter#

When generating a document from native inside of Salesforce, Salesforce will pass a unique identifier for the record you are on to your template. Let's create the Input Parameter that will receive this value.

  1. Click on "Input Parameters in the "Windward" ribbon
  2. Click "Add"
  3. Name the Input Parameter "uniqueID." (If you accidentally name this wrong, you can click "Rename" to change the name)
  4. Make sure the Input Parameter type is Text
  5. Click "Save" to save your Input Parameter

    It is important that the parameter be named "UniqueID" and that the type is "Text." When you generate a document from inside Salesforce, the unique identifier of the record you are on will automatically look for an Input Parameter named "UniqueID" and will pass a text value.

Design your Template#

  1. Now you can start designing your template. For this tutorial, we will design a basic template just to demonstrate that the template and integration is working.
  2. Place your caret in the document, and insert a query tag by going to the Windward ribbon and clicking Tags -> Out
  3. Select your Out Tag and open the Select Wizard for the tag
  4. In the Wizard, find the "Opportunity" table (you can do this by scrolling or searching). Expand this table by clicking on it.
  5. Drag a record relevant to the opportunity into the "Columns" section of the Wizard. I will use the "Name" column.
  6. In the "Filter" section, click "Click here to add a group" and then "Click here to add a filter
  7. Click "Click here to select a node" to chose the data node you will filter on.
  8. In the dialog that pops up, find the Opportunity -> ID column. This is the same opportunity specific unique identifier that will be automatically passed to the document's "UniqueID" input parameter.
  9. Click "Click here to set the value. Using the dropdown that appears to the right of the text entry field, select the Input Parameter "UniqueID." Be sure that the comparison operator being used is "equal to" and change it if not.
  10. Click OK to save the tag.

Upload your Template to Windward Hub#

  1. Log into the Windward Hub portal as a user who is assigned access to the Salesforce Integration subscription.
  2. Click on "Document Templates" and then Upload Template
  3. Click "Choose File" and find your template.
  4. If you have multiple integrations, select Salesforce for your integration.
  5. In the "Integration Context" select "Opportunity."
  6. Click "Upload and Publish"

Configure a Job#

Windward Hub generates "Package Templates" to output. A Package Template can consist of Windward Templates you want processed to output and also static files you want to be delivered with those templates.

In Windward Hub:

  1. Click on "Package Templates"
  2. Click on "New Package Template"
  3. Select the files you want to be in your package template (make sure they are templates in the "Opportunity" context).
  4. Click "Configure Package Template"
  5. Fill out the required fields for the package template, namely the Package Name, Output Name and Output Format for each template, and any default values for input parameters.
  6. Click Create

Run your package template from Salesforce#

  1. Inside of Salesforce, go into an opportunity.
  2. Click on your custom output button while in the opportunity.
  3. You will see Windward Hub open in a new window. Select the package template you wish to output.
  4. Click "Run"

Your package template will be queued to run to output, and the output can be downloaded from the Output History tab in Hub.