How do I trigger Joyous conversations from activity in another platform?

Use activities and information in other platforms such as ServiceNOW to trigger Joyous conversations to improve those activities.

Any platform with automated workflows capable of making an API call to an external system can trigger Joyous surveys.

For example:

  • When support agents close a help desk incident as 'customer issue not resolved', trigger a Joyous conversation asking the agent what they were missing to be able to resolve the customer issue.
  • When a customer contract is 90 days out from renewal, trigger a Joyous conversation to the account owner asking what would make the biggest difference in being able to renew the contract.

In this guide we cover how to set up automated workflows to trigger Joyous conversations from ServiceNOW as an example, but the same principles can be applied to any platform.

Prerequisites

  • Copy your Joyous API Key in Settings > Integrations
  • This requires Admin access to Joyous.

Note: You can only copy your API Key from Joyous once. Ensure you save it in a safe place.

Joyous campaign

  1. Create a campaign
  2. In the Timing sidebar set Lifecycle to Event trigger (quarterly recurring).
  3. Copy the URL and the Request Body Template.

ServiceNOW

Example: When support agents close a Service Desk Incident as 'No resolution provided', trigger a Joyous conversation asking the agent what they were missing to be able to resolve the customer issue.

Credential Alias

  1. Create a new record in IntegrationHub > Connections & Credentials > Connection & Credential Aliases e.g. joyous-credential-alias
  2. Click New to add a new set of credentials to the record.
  3. Select API Key Credentials
  4. Name the Credentials e.g. joyous-api-key
  5. Copy your Joyous API Key into the API Key field.
  6. Submit

Action

  1. In Workflow Studio, create a new Action e.g. Joyous Trigger Conversation
  2. Create the following Inputs:
    Label Name Type Mandatory
    campaignId campaignid String True
    email email String True
  3. Add an Integrations > Get Connection Info step:
    1. Type: Credential Alias
    2. Credential Alias: Select the Credential Alias created above
  4. Add an Integrations > REST step:
    1. Connection: Define Connection Inline
    2. Base URL: https://eta1.joyoushq.com
    3. Build Request: Manually
    4. Resource Path: /events
    5. HTTP Method: POST
    6. Headers:
      1. Name: x-api-key
      2. Value: insert data pill [Get Connection Info step > Credential Value]
    7. Request Type: Text
    8. Request Body:
      1. Paste the Request Body Template from the Joyous Campaign
      2. Add the relevant data pills from the Action Inputs:
        {
            "orgId": "V5IbtsDa47T261RL",
            "location": "US",
            "recurringCampaignGroupId": "[Inputs > campaignId]​",
            "email": "[Inputs > email​]",
            "sendConversation": true
        }
    9. Save

Flow

  1. In Workflow Studio, create a new Flow e.g. Send Joyous Conversation on Incident Closed Unresolved
  2. Add a Trigger:
    1. Trigger: Record > Updated
    2. Table: Incident
    3. Conditions:
      1. State is Closed
      2. AND Resolution code is No resolution provided
    4. Done
  3. Add the Action created above e.g. Joyous Trigger Conversation
  4. Populate the Action Inputs:
    1. Copy the Campaign ID from the Joyous Campaign into campaignId
    2. Add the agent's Email data pill from the Incident Record into email i.e. [Incident Record > Assigned to > Email]
  5. Done
  6. Save
  7. Activate

Other configuration options

Contact by SMS text message

  1. Replace the email Action Input with mobilePhone in Action Step 2
  2. Replace "email" in the Request Body in Action Step 4h with "mobilePhone": "[Inputs > mobilePhone]"
  3. In Flow Step 4 add the agent's Mobile phone data pill from the Incident Record into the mobilePhone Action Input i.e. [Incident Record > Assigned to > Mobile phone]

Note: Only one contact method can be configured at a time. If you want to use different contact methods in different cases, create multiple custom Actions e.g. Joyous Trigger Conversation Email and Joyous Trigger Conversation SMS.

Custom attributes

You can pass additional custom attributes for filtering conversations in Joyous.

  1. Define any attribute you want to include as an Action Input in Action Step 2
    1. For example: location
  2. In the Request Body in Action Step 4h include an "attributes" array with the Action Inputs of the custom attributes e.g:
    "attributes": [
        {
            "name": "location",
            "value": "[Inputs > location]"
        }
    ]
  3. In Flow Step 4 add the relevant data pill from the Incident Record into the custom attribute Action Inputs.