Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DO NOT MERGE Refactor/devtooling 724 Outbound Messaging Campaign #1154

Open
wants to merge 6 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
88 changes: 74 additions & 14 deletions docs/resources/outbound_messagingcampaign.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
page_title: "genesyscloud_outbound_messagingcampaign Resource - terraform-provider-genesyscloud"
subcategory: ""
description: |-
Genesys Cloud Outbound Messaging Campaign
Genesys Cloud outbound messagingcampaign
---
# genesyscloud_outbound_messagingcampaign (Resource)

Genesys Cloud Outbound Messaging Campaign
Genesys Cloud outbound messagingcampaign

## API Usage
The following Genesys Cloud APIs are used by this resource. Ensure your OAuth Client has been granted the necessary scopes and permissions to perform these operations:
Expand Down Expand Up @@ -54,7 +54,6 @@ resource "genesyscloud_outbound_messagingcampaign" "example_outbound_messagingca
- `contact_list_id` (String) The contact list that this messaging campaign will send messages for.
- `messages_per_minute` (Number) How many messages this messaging campaign will send per minute.
- `name` (String) The campaign name.
- `sms_config` (Block Set, Min: 1, Max: 1) Configuration for this messaging campaign to send SMS messages. (see [below for nested schema](#nestedblock--sms_config))

### Optional

Expand All @@ -65,34 +64,95 @@ resource "genesyscloud_outbound_messagingcampaign" "example_outbound_messagingca
- `contact_sorts` (Block List) The order in which to sort contacts for dialing, based on up to four columns. (see [below for nested schema](#nestedblock--contact_sorts))
- `division_id` (String) The division this entity belongs to.
- `dnc_list_ids` (List of String) The dnc lists to check before sending a message for this messaging campaign.
- `dynamic_contact_queueing_settings` (Block List, Max: 1) Indicates (when true) that the campaign supports dynamic queueing of the contact list at the time of a request for contacts. (see [below for nested schema](#nestedblock--dynamic_contact_queueing_settings))
- `email_config` (Block Set, Max: 1) Configuration for this messaging campaign to send Email messages. (see [below for nested schema](#nestedblock--email_config))
- `errors` (Block List) A list of current error conditions associated with this messaging campaign. (see [below for nested schema](#nestedblock--errors))
- `rule_set_ids` (List of String) Rule Sets to be applied while this campaign is sending messages
- `sms_config` (Block Set, Max: 1) Configuration for this messaging campaign to send SMS messages. (see [below for nested schema](#nestedblock--sms_config))

### Read-Only

- `id` (String) The ID of this resource.

<a id="nestedblock--sms_config"></a>
### Nested Schema for `sms_config`
<a id="nestedblock--contact_sorts"></a>
### Nested Schema for `contact_sorts`

Required:

- `phone_column` (String) The Contact List column specifying the phone number to send a message to.
- `sender_sms_phone_number` (String) A phone number provisioned for SMS communications in E.164 format. E.g. +13175555555 or +34234234234
- `field_name` (String) The field name by which to sort contacts.

Optional:

- `content_template_id` (String) The content template used to formulate the message to send to the contact. Either message_column or content_template_id is required.
- `message_column` (String) The Contact List column specifying the message to send to the contact. Either message_column or content_template_id is required.
- `direction` (String) The direction in which to sort contacts. Defaults to `ASC`.
- `numeric` (Boolean) Whether or not the column contains numeric data. Defaults to `false`.


<a id="nestedblock--contact_sorts"></a>
### Nested Schema for `contact_sorts`
<a id="nestedblock--dynamic_contact_queueing_settings"></a>
### Nested Schema for `dynamic_contact_queueing_settings`

Optional:

- `sort` (Boolean) Whether to sort contacts dynamically


<a id="nestedblock--email_config"></a>
### Nested Schema for `email_config`

Required:

- `field_name` (String) The field name by which to sort contacts.
- `email_columns` (List of String) The contact list columns specifying the email address(es) of the contact.
- `from_address` (Block List, Min: 1, Max: 1) The email address that will be used as the sender of the email. (see [below for nested schema](#nestedblock--email_config--from_address))

Optional:

- `direction` (String) The direction in which to sort contacts. Defaults to `ASC`.
- `numeric` (Boolean) Whether or not the column contains numeric data. Defaults to `false`.
- `content_template_id` (String) The content template used to formulate the email to send to the contact.
- `reply_to_address` (Block List, Max: 1) The email address from which any reply will be sent. (see [below for nested schema](#nestedblock--email_config--reply_to_address))

<a id="nestedblock--email_config--from_address"></a>
### Nested Schema for `email_config.from_address`

Required:

- `domain_id` (String) The OutboundDomain used for the email address.

Optional:

- `friendly_name` (String) The friendly name of the email address.
- `local_part` (String) The local part of the email address.


<a id="nestedblock--email_config--reply_to_address"></a>
### Nested Schema for `email_config.reply_to_address`

Required:

- `domain_id` (String) The InboundDomain used for the email address.
- `route_id` (String) The InboundRoute used for the email address.



<a id="nestedblock--errors"></a>
### Nested Schema for `errors`

Required:

- `error` (String) name of the error

Optional:

- `details` (String) additional information regarding the error


<a id="nestedblock--sms_config"></a>
### Nested Schema for `sms_config`

Required:

- `phone_column` (String) The Contact List column specifying the phone number to send a message to.
- `sender_sms_phone_number` (String) A phone number provisioned for SMS communications in E.164 format. E.g. +13175555555 or +34234234234

Optional:

- `content_template_id` (String) The content template used to formulate the message to send to the contact.
- `message_column` (String) The Contact List column specifying the message to send to the contact.

Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ func dataSourceOutboundAttemptLimitRead(ctx context.Context, d *schema.ResourceD
const pageSize = 100
attemptLimits, resp, getErr := outboundAPI.GetOutboundAttemptlimits(pageSize, pageNum, true, "", name, "", "")
if getErr != nil {
return retry.NonRetryableError(util.BuildWithRetriesApiDiagnosticError(resourceName, fmt.Sprintf("error requesting attempt limit %s | error: %s", name, getErr), resp))
return retry.NonRetryableError(util.BuildWithRetriesApiDiagnosticError("genesyscloud_outbound_attemptlimit", fmt.Sprintf("error requesting attempt limit %s | error: %s", name, getErr), resp))
}
if attemptLimits.Entities == nil || len(*attemptLimits.Entities) == 0 {
return retry.RetryableError(util.BuildWithRetriesApiDiagnosticError(resourceName, fmt.Sprintf("no attempt limits found with name %s", name), resp))
return retry.RetryableError(util.BuildWithRetriesApiDiagnosticError("genesyscloud_outbound_attemptlimit", fmt.Sprintf("no attempt limits found with name %s", name), resp))
}
attemptLimit := (*attemptLimits.Entities)[0]
d.SetId(*attemptLimit.Id)
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,4 @@ import (
func SetRegistrar(l registrar.Registrar) {
l.RegisterDataSource("genesyscloud_outbound_attempt_limit", DataSourceOutboundAttemptLimit())

l.RegisterDataSource("genesyscloud_outbound_messagingcampaign", dataSourceOutboundMessagingcampaign())
l.RegisterResource("genesyscloud_outbound_messagingcampaign", ResourceOutboundMessagingCampaign())
l.RegisterExporter("genesyscloud_outbound_messagingcampaign", OutboundMessagingcampaignExporter())
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (
obContactList "terraform-provider-genesyscloud/genesyscloud/outbound_contact_list"
obContactListFilter "terraform-provider-genesyscloud/genesyscloud/outbound_contactlistfilter"
obDnclist "terraform-provider-genesyscloud/genesyscloud/outbound_dnclist"
outboundMessagingcampaign "terraform-provider-genesyscloud/genesyscloud/outbound_messagingcampaign"
obRuleset "terraform-provider-genesyscloud/genesyscloud/outbound_ruleset"
outboundSequence "terraform-provider-genesyscloud/genesyscloud/outbound_sequence"
routingQueue "terraform-provider-genesyscloud/genesyscloud/routing_queue"
Expand Down Expand Up @@ -37,7 +38,7 @@ func (r *registerTestInstance) registerTestResources() {
providerResources["genesyscloud_outbound_attempt_limit"] = obAttemptLimit.ResourceOutboundAttemptLimit()
providerResources["genesyscloud_outbound_contactlistfilter"] = obContactListFilter.ResourceOutboundContactlistfilter()
providerResources["genesyscloud_outbound_contact_list"] = obContactList.ResourceOutboundContactList()
providerResources["genesyscloud_outbound_messagingcampaign"] = ResourceOutboundMessagingCampaign()
providerResources["genesyscloud_outbound_messagingcampaign"] = outboundMessagingcampaign.ResourceOutboundMessagingcampaign()
providerResources["genesyscloud_outbound_sequence"] = outboundSequence.ResourceOutboundSequence()

// external package dependencies for outbound
Expand All @@ -59,7 +60,7 @@ func (r *registerTestInstance) registerTestDataSources() {
providerDataSources["genesyscloud_outbound_attempt_limit"] = obAttemptLimit.DataSourceOutboundAttemptLimit()
providerDataSources["genesyscloud_outbound_campaignrule"] = outboundCampaignrule.DataSourceOutboundCampaignrule()
providerDataSources["genesyscloud_outbound_contact_list"] = obContactList.DataSourceOutboundContactList()
providerDataSources["genesyscloud_outbound_messagingcampaign"] = dataSourceOutboundMessagingcampaign()
providerDataSources["genesyscloud_outbound_messagingcampaign"] = outboundMessagingcampaign.DataSourceOutboundMessagingcampaign()
providerDataSources["genesyscloud_outbound_contactlistfilter"] = obContactListFilter.DataSourceOutboundContactlistfilter()
providerDataSources["genesyscloud_outbound_sequence"] = outboundSequence.DataSourceOutboundSequence()

Expand Down
Loading
Loading