The example below shows a Salesforce implementation.

Create a Salesforce Template

Template Name: Salesforce Case
Attributes:
Name: SalesForce Case ID
DataType: Short string
Active: true
Name: SalesForce Case Number
DataType: Short string
Active: true

Add an Outbound Service

From the Outbound Integrations screen click Add Service

Setup the Service’s credentials

Enter the Service Name “SalesForce”.
Web Security Type = OAUTH 2 SessionID
Client ID: Your SalesForce Connected App Security Key
Client Secret: Your SalesForce Connected App Consumer Secret
UserName: Your SalesForce username
Password: Your RemedyForce password plus your RemedyForce security token

Add the Create Case Method

From the Service Detail screen, click Add Method.
Method Name = Create Ticket
Service Type = REST
Template Type = SalesForce Case
URI = https://(your salesforcesubdomain)/services/data/v20.0/sobjects/Case/
Content Type = JSON
Web Method = POST
Response Data Type = JSON
Response Action = Check Update Alert Fields

<pre><pre>Content Data:{ “Subject”: “<<MessageThread.Topic>>”, “Description”: “<<Message.MessageText>>”,     “Priority”: “Medium”}

Response Data:{    “id”: “<<Attribute.SalesForce Case ID>>”,    “success”: true,    “errors”: []}</pre>

Add the Close Case Method

From the Service Detail screen click Add Method.
Method Name = Close Ticket
Service Type = REST
Template Type = SalesForce Case

<pre>

https://(your salesforce sub domain)/services/data/v20.0/sobjects/Case/<<Attribute.SalesForce Case ID>>

</pre>

Content Type = JSON
Web Method = PATCH
Response Data Type = JSON
Response Action = NONE
Content Data:
{
“Status”:”Closed”,
“Reason”:”Other”
}

Create the Add Case Comment Method

From the Service Detail screen click Add Method.
Method Name = Add Case Comment
Service Type = REST
Template Type = SalesForce Case

<pre>

https://(your salesforce sub domain)/services/data/v20.0/sobjects/CaseComment/

</pre>

Content Type = JSON
Web Method = POST
Response Data Type = JSON
Content Data: NONE

Create the Close Case Workflow

From the Workflows List screen, click Add Workflow.

Workflow Name = SalesForce Case Close
Workflow Type = Message Thread
Template = SalesForce Case
Schedule Type = None
Recurrence Interval = 0
Enabled = Checked (can only be set after the rest of the screen is completed)
Start Condition = Add MessageThreadStatusType = Closed AND

Add an Action:
Action = Outbound Service Notification
Outbound Action =- SalesForce – Close Case
Message Text: NONE

Add the Add Comment on Assignment Workflow

From the Workflows List screen click Add

Workflow Name = SalesForce Case Add Comment
Workflow Type = MessageThread
Template = SalesForce Case
Schedule Type = None
Recurrence Interval = 0
Enabled = checked (can only be set after the screen is complete)
Start Conditions = Add MessageThreadStatusType = Assigned AND

Add an Action:
Action = Outbound Service Notification
Outbound Action = SalesForce – Add Case Comment
MessageText: NONE

Create the Salesforce Message Rule

Create the Salesforce Message Rule

Message Rule Detail
Rule Name: Salesforce
Description: Creates Case in Salesforce.
Adds comment on assignment.
Closes case on close.
Priority: Critical
Enabled: true

Add the Message Rule’s Workflows:

Add the Salesforce Case Close and Salesforce Case Add Comment Workflows

Add the Create Case Service:

Services: Search and add the Salesforce Service

Next, click the edit icon on the Salesforce Service and enable the Create Case Method and click Save.

The difference between enabling a Service Method in the Services tab and using Workflows is that Methods in the Message Rule Services are only fired once, when an alert is first created, whereas Workflow triggered actions have the flexibility to be triggered by events, or at a specific time, or even at multiple times.

Did this answer your question?