Windward DocumentationWindward HubSalesforce Integration Salesforce IntegrationHow to Create a Template to Generate from a Salesforce Opportunity in Salesforce Classic Experience

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

Pre-requisites

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 Hub: Create A Connected App In Salesforce Classic Experience or Create A Connected App in Salesforce Lightning Experience
  2. Created a custom button for Hub document generation: Integrate RESTful Engine into Salesforce Opportunities
  3. Have installed Windward Designer on your machine: How To Install the 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

  1. 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
  1. Click "Add"
  1. Name the Input Parameter "uniqueID." (If you accidentally name this wrong, you can click "Rename" to change the name)
  1. Make sure the Input Parameter type is Text
  1. 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.
  1. Place your caret in the document, and insert a query tag by going to the Windward ribbon and clicking Tags -> Out
  1. Select your Out Tag and open the Select Wizard for the tag
  1. In the Wizard, find the "Opportunity" table (you can do this by scrolling or searching). Expand this table by clicking on it.
  1. Drag a record relevant to the opportunity into the "Columns" section of the Wizard. I will use the "Name" column.
  1. In the "Filter" section, click "Click here to add a group" and then "Click here to add a filter
  1. Click "Click here to select a node" to chose the data node you will filter on.
  1. 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.
  1. 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.
  1. Click OK to save the tag.

Upload your template to Hub

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

Configure a package template

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 wan't to be delivered with those templates.

In Hub:

  1. Click on "Package Templates"
  2. Click on "New Package Template"
  3. Select the files you wan't 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 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.

0 Comments

Add your comment

E-Mail me when someone replies to this comment