Skip to main content
Skip table of contents

How to trigger automation with Salesforce Outbound Messages API (Legacy)

This documentation is for deprecated API.

New API documentation: Task API

Using Salesforce Outbound Messages allows Documill Dynamo templates to be run automatically without the need for end-users to click to the usual "Dynamo Templates" buttons.  When using Outbound Messages API to run Documill Dynamo, the whole process from generating the documents to saving and sending the final documents out will happen in the background. No forms or interfaces will be displayed to the end-user at any point.

To implement this process, all the required parameters have to be given in the Outbound Message's configuration. The template also has to have logic to save the final document or to send it out, because no download screens will be shown.

Notes:

  • This API is not included in the Dynamo Standard package. Contact us for more information.

  • If the API limit is exceeded by a large margin, the API access may be suspended.

1. Set up Workflow Rules

Workflow Rules define a set of conditions and when the conditions are met, an action occurs. To integrate with Dynamo you should select Outbound Message as the action for the Workflow Rule. You can have as many rules as needed, each resulting to an Outbound Message.

In Setup -> Workflow & Approvals, select Workflow Rules

Select an existing rule you want to use Outbound Message, or create New Rule

For a more detailed information about Workflow Rules, see Salesforce's documentation here.

2. Setup Outbound Message

2.1. Create a new Outbound Message

Edit the Workflow Actions in the Workflow Rule, select Add Workflow Action -> New Outbound Message

  • You can find the list of existing Outbound Message in Workflow & Approvals -> Outbound Messages

Give a name and description for the new Outbound Message

Set the Endpoint URL to point to the Dynamo Outbound Messages API.

In User to send as, make sure to select a user that has access to the template that you intend to use.

Then select the Send Session ID if it has not been set already.

Select all the fields that you want to send as parameters to the template. The template can always query more parameters but at least the Id-field should be given here. Parameters will appear in the param-variable and they always start with lower case unlike Salesforce fields. For example the Id-field can be used in an expression like this: ${param.id}

For more information, see Salesforce's reference for Outbound Messages.

image-20240109-101955.png

2.2. Setup Endpoint URL

Endpoint URL determines how the Dynamo Services API will be called and it has both required and optional parameters.

Endpoint URL to run a Dynamo template when the workflow is triggered:

CODE
https://dynamoservice.documill.com/service/api?action=outboundMessage&templateID=0690xxxxxxxxxxxx

List of Outbound Message Parameters

Name

Value

Required

Example

Notes

action

outboundMessage

Yes

action=outboundMessage

This identifies which API is used and has to be written exactly as in the Value-column.

templateID

Salesforce ID of the template.

Yes

templateID=069D0000003HMPB

The user set in the Outbound Message has to have read access to this file.

logField

Salesforce field where the log message will be written.

logField=dynamoErrorField__c

Uses the same object as the message by default. This parameter is required if any of the other log-parameters are set. Note that the logField is not cleared on successful compose.

logObject

Salesforce object where the log message will be written.

logObject=Opportunity

Can be used to log to a different object than the one used in the message. (logRecordID and logField need to be set if this is set)

logRecordID

Salesforce record where the log message will be written.

logRecordID=xxx

Can be used to always log to a specific record. (logObject and logField need to be set if this is set)

logLevel

SEVERE|WARNING|INFO

logLevel=WARNING

Can be used to provide more logging information. Default is SEVERE where only serious errors are reported.

3. Troubeshooting

Any problems in the template should be reported based on the Endpoint URL parameters that you set. You can also check the status of sent Outbound Messages as described here.

Users should have Send Outbound Messages enabled in their profile. Otherwise triggers will not send the Outbound Messages for the users that have the option disabled.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.