Salesforce Application Instructions

The PostalMethods Salesforce application works in conjunction with the Salesforce Print Anything application. If you already use Print Anything to create templates than you can quickly send postal letters once you install the PostalMethods application. If you do not have Print Anything installed, you should install it either before or after the PostalMethods Application.

Installation And Setup Instructions

How To Install The Application

  1. View the PostalMethods Salesforce application and click on Get It Now. You must have Salesforce Administrator permissions to add applications to your organization.
  2. Follow the standard Salesforce installation process: logon to Salesforce, confirm and choose your organization and approve the application and its components, view the API access, choose the accessibility of the application to your users and click Install. After the installation is complete, click on Deploy Now and then Deploy.
  3. You must have Salesforce's Print Anything application installed to design your letters. If it is not already installed, go to the application page and install the application in a process similar to the one above.

Set Up The Applications

  1. Create a new Security Endpoint: In Setup > Administration Setup > Security Controls > Remote Site Settings: add a new Remote Site called PostalMethods with Remote Site URL: https://api.postalmethods.com

  2. To get Salesforce to show the PostalMethods editing pages instead of the standard ones, you need to override the functionality of these buttons: From Setup > App Setup > Create > Objects: click on label PostalMethods Account and scroll down to the Standard Buttons and Links section:
    • Override Edit:
      1. Click on the Override link next to Edit.
      2. Change Content Type to Visualforce Page.
      3. Change Content Name to PMAccountAdmin [Postal_Methods_PMAccountAdmin].
      4. Click Save.
    • Override New:
      1. Click on the Override link next to New.
      2. Change Content Type to Visualforce Page.
      3. Change Content Name to PMAccountAdmin [Postal_Methods_PMAccountAdmin].
      4. Click Save.
  3. Perform a similar action to the Letter Storage object. From Setup > App Setup > Create > Objects: click on label Letter Storage and scroll down to the Standard Buttons and Links section:
    • Override View:
      1. Click on the Override link next to View.
      2. Change Content Type to Visualforce Page.
      3. Change Content Name to PMViewLetter [Postal_Methods_PMViewLetter].
      4. Click Save.


  4. Depending on how your organization is structured you may need to set the visibility, security and other component attributes of the three PostalMethods custom objects:
    • PostalMethods Account
    • Postal Items
    • Letters

Setting Up A PostalMethods Account

In order to send letters via PostalMethods you must define your PostalMethods user within Salesforce. Go to the PostalMethods Accounts tab, click on New and either register a new PostalMethods user or give details of an existing PostalMethods user already defined on the PostalMethods system.

Print Anything And PostalMethods Integration

  • If you do not already have a Print Anything packages created, please follow their tutorial and create one. You can find the tutorial in your Salesforce Documents tab > PrintAnything_Customization_and_Enhancement_Guide.pdf.
  • If you have a Print Anything package ready, create new buttons to link to these packages and to initiate the sending of a letter via PostalMethods:
    1. From Setup > App Setup > Customize expend the page to which you would like to add the letter sending action (for example: Accounts).
    2. Click on Buttons and Links. In the Custom Buttons and Links section, click New:
      1. Give a label and a name to your button.
      2. Display Type: Detail Page Link.
      3. Behavior: Display in new window.
      4. Content Source: URL.
      5. In the main text box, build your button action along the lines of the following code (remember to set the package name of your Print Anything package in packageId
        {!URLFOR( 
        $SControl.PostalMethods__PMPrintAnythingDriver, 
        <OBJECT.ID>, 
        [ 
        packageId="<PACKAGE_NAME>", 
        type="<OBJECT.TYPE>", 
        id= <OBJECT.ID> , 
        name= <OBJECT.NAME>
        ]) 
        }

        Example:

        {!URLFOR( 
        $SControl.PostalMethods__PMPrintAnythingDriver, 
        Product2.Id, 
        [ 
        packageId="ProductPackage",type="Product",id=Product2.Id,name= Product2.Name 
        ]) 
        }
      6. Click Save.
    3. In the left navigation bar, above Buttons and Links, click on Page Layouts.
    4. Click Edit for the Page Layout Name you would like to add the letter sending action.
    5. In the top layout box, click on Custom Links. Drag the button you prepared earlier to the section where you want it to appear on the page. Custom buttons may not be added to all sections but can be added to a Custom Links section.
    6. Click Save.

The letter sending button is now available in the page you added it to. Clicking the button initiates the letter sending process.

Please note:

  • PostalMethods letters are sent in Number 10 double window envelopes therefore the recipient and return addresses must be positioned correctly on the first page of your letter in order to fully appear through the envelope windows:
  • The optional Print Anything debug parameter is also available and can be added if required. Read more about it in the Print Anything tutorial mentioned above.