Messaging and Communication Jobs
The following topics describe job types for messaging and communication platforms and services:
Job:Communication Suite
Communication Suite enables you to automate business messaging and communication over Microsoft Teams, Slack, Telegram, and WhatsApp.
To deploy and run a Communication Suite job, ensure that you have installed the Communication Suite plug-in with the provision image command or the provision agent::update command.
The following examples show how to define a Communication Suite job.
-
This JSON defines a job for Microsoft Teams:
Copy"Communication Suite_Job_Teams": {
"Type": "Job:Communication Suite",
"ConnectionProfile": "COMM_SUITE",
"Application Name": "Microsoft Teams",
"Teams Parameters":"{ "type":"message", "attachments":[ {"contentType":"application/vnd.microsoft.card.adaptive",
"contentUrl":null, "content":{ "$schema":"http://adaptivecards.io/schemas/adaptive-card.json","type":"AdaptiveCard","version":"1.2",
"body":[{"type": "TextBlock","text": "For Samples and Templates, see [https://adaptivecards.io/samples](https://adaptivecards.io/samples)" } ] } }]}",
"Silent Message": "unchecked",
"Protect Content": "unchecked"
} -
This JSON defines a job for Slack:
Copy"Communication Suite_Job_Slack": {
"Type": "Job:Communication Suite",
"ConnectionProfile": "COMM_SUITE",
"Application Name": "Slack",
"Slack Parameters":"{"blocks": [{"type": "section","text": {"type": "mrkdwn","text": "The job finished successfully orderid: %%ORDERID, and <https://google.com|this is a link>"}}]}",
"Silent Message": "unchecked",
"Protect Content": "unchecked"
} -
This JSON defines a job for Telegram:
Copy"Communication Suite_Job_Telegram":
{
"Type": "Job:Communication Suite",
"ConnectionProfile": "COMM_SUITE",
"Application Name": "Telegram",
"Telegram Parameters":"The job finished successfully orderid: %%ORDERID",
"Silent Message": "unchecked",
"Protect Content": "unchecked"
} -
This JSON defines a job for WhatsApp:
Copy"Communication Suite_Job_WhatsApp": {
"Type": "Job:Communication Suite",
"ConnectionProfile": "COMM_SUITE",
"Application Name": "WhatsApp",
"WhatsApp Parameters":" { "messaging_product": "whatsapp", "to": "17181231234", "type": "template", "template": { "name": "control_m", "language": { "code": "en" } }}",
"Silent Message": "unchecked",
"Protect Content": "unchecked"
}
The following table describes the Communication Suite job parameters.
Parameter |
Description |
---|---|
Connection Profile |
Defines the ConnectionProfile:Communication Suite name that connects Control-M to Communication Suite. |
Application Name |
Determines one of the following communications platforms to use:
|
Teams Parameters |
Defines the parameters, in JSON format, that instruct Teams to perform multiple actions. For more information about the supported parameters, see the Microsoft Teams documentation. |
Slack Parameters |
Defines the parameters, in JSON format, that instruct Slack to perform multiple actions. For more information about the supported parameters, see the Slack documentation. |
Telegram Parameters |
Defines the parameters, in simple text format, that instruct Telegram to perform multiple actions. Rule: 1–4,096 characters You can add Control-M variables to the text. |
Silent Message |
Determines whether to send your Telegram message without a notification, which is useful for after-hours or non-urgent messages. |
Protect Content |
Determines whether to prevent your Telegram message from being saved or forwarded. |
WhatsApp Parameters |
Defines the parameters, in JSON format, that instruct WhatsApp to perform multiple actions. For more information about the supported parameters, see the WhatsApp documentation. |
Job:PagerDuty
PagerDuty enables you to perform incident management and response in automated workflows and job scheduling.
To deploy and run a PagerDuty job, ensure that you have installed the PagerDuty plug-in with the provision image command or the provision agent::update command.
The following examples show how to define a PagerDuty job.
-
This JSON creates an incident:
Copy"PagerDuty_Job_Create": {
"Type": "Job:PagerDuty",
"ConnectionProfile": "PAGERDUTY",
"Action": "Create an Incident",
"Email Address": "johndoe@acme.com",
"Parameters": "{
"incident": {
"type": "incident",
"title": "The server is on fire.",
"service": {
"id": "PX4ET8H",
"type": "service_reference"
},
"priority": null,
"urgency": "high",
"incident_key": "baf7cf21b1da41b4b0221008339ff357",
"body": {
"type": "incident_body",
"details": "A disk is getting full on this machine."
}
}
}"
} -
This JSON updates an incident:
Copy"PagerDuty_Job_Update": {
"Type": "Job:PagerDuty",
"ConnectionProfile": "PAGERDUTY",
"Action": "Update an Incident",
"Incident ID" : "Q27A8ZZ5NUCKR6",
"Email Address": "johndoe@acme.com",
"Parameters": "{
"incident": {
"type": "incident",
"title": "The server is on fire.",
"service": {
"id": "PX4ET8H",
"type": "service_reference"
},
"priority": null,
"urgency": "high",
"incident_key": "baf7cf21b1da41b4b0221008339ff357",
"body": {
"type": "incident_body",
"details": "A disk is getting full on this machine."
}
}
}"
} -
This JSON snoozes an incident:
Copy"PagerDuty_Job_Snooze": {
"Type": "Job:PagerDuty",
"ConnectionProfile": "PAGERDUTY",
"Action": "Snooze an Incident",
"Email Address": "johndoe@acme.com",
"Incident ID" : Q27A8ZZ5NUCKR6
"Duration" : 3700
} -
This JSON provides incident details:
Copy{
"incident": {
"type": "incident",
"title": "The server disk is getting full on this machine",
"service": {
"id": "P9VABOD",
"type": "service_reference"
},
"priority": null,
"urgency": "high",
"incident_key": "baf7cf21b1da41b4b0221008339ff123",
"body": {
"type": "incident_body",
"details": "A disk is getting full on this machine."
}
}
}
The following table describes the PagerDuty job parameters.
Parameter |
Action |
Description |
---|---|---|
Connection profile |
All actions |
Defines the ConnectionProfile:PagerDuty name that connects Control-M to PagerDuty. |
Action |
NA |
Determines one of the following actions to perform on PagerDuty:
|
Incident ID |
|
Defines a unique identifier assigned to each incident, which allows you to reference, track, and manage the incident. |
Email Address |
|
Defines an email address for a valid user in your PagerDuty platform. |
Parameters |
|
Defines specific parameters, in JSON format, to pass when the job executes: |