Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This tutorial shows how you can add a Salesforce account and store the account ID on the ticket for update purpose.

...

  1. Create a new Action by clicking 
    Status
    colourBlue
    titleCreate
     button
  2. Enter a name: Add Saleforce AccountCASE and click 
    Status
    colourBlue
    titleCreate
  3. Select Method:
    Status
    colourYellow
    titlePOST
     and URL:https://yourInstance.salesforce.com/services/data/v20.0/sobjects/AccountCase/
    From the Saleforce REST API we can read that to add an account we need to call POST https://yourInstance.salesforce.com/services/data/v20.0/sobjects/AccountCase/
  4. Select Authentication method: Salesforce (OAuth) 
  5. Add request headers, key: Content-Type with value application/json
  6. On the Body section add the following

    Code Block
    {
    	"namesubject":"{{issue.reporter.usernamesummary}}"
    }

    Here we use the mustache syntax to grab the user name of the reporter.issue summary

  7. Click Triggers tab
  8. Select 
    Status
    colourGreen
    titleIssue RESOLVED
     event, in this example we will use the Issue Resolved event to indicate that the user shall be added. 
  9. On JQL Condition. When to execute the event(s) write Project = TESTB and to limit the trigger to the TESTB project
  10. Click 
    Status
    colourBlue
    titleSAVE
  11. (Optional) Click Test button (no issue key is needed) to and click Send, Then go 3 - View Execution Log.

The result will have a response like the one below:

Code Block
{
	"nameid": "Warehouse5002o00002QMXK5AAP",
	"selfsuccess": "http://localhost/rest/api/2/group?groupname=Warehouse"true,
"users": {
"size	"errors": 2,
"items": [],
"max-results": 50,
"start-index": 0,
"end-index": 0
},
"expand": "users"
}

Optional steps to inform the reporter about being added are to create a chained action that comments the issue.