/
campaign.go
150 lines (82 loc) · 5.65 KB
/
campaign.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
package platformclientv2
import (
"time"
"encoding/json"
"strconv"
"strings"
)
// Campaign
type Campaign struct {
// Id - The globally unique identifier for the object.
Id *string `json:"id,omitempty"`
// Name - The name of the Campaign.
Name *string `json:"name,omitempty"`
// DateCreated - Creation time of the entity. Date time is represented as an ISO-8601 string. For example: yyyy-MM-ddTHH:mm:ss[.mmm]Z
DateCreated *time.Time `json:"dateCreated,omitempty"`
// DateModified - Last modified time of the entity. Date time is represented as an ISO-8601 string. For example: yyyy-MM-ddTHH:mm:ss[.mmm]Z
DateModified *time.Time `json:"dateModified,omitempty"`
// Version - Required for updates, must match the version number of the most recent update
Version *int `json:"version,omitempty"`
// ContactList - The ContactList for this Campaign to dial.
ContactList *Domainentityref `json:"contactList,omitempty"`
// Queue - The Queue for this Campaign to route calls to. Required for all dialing modes except agentless.
Queue *Domainentityref `json:"queue,omitempty"`
// DialingMode - The strategy this Campaign will use for dialing.
DialingMode *string `json:"dialingMode,omitempty"`
// Script - The Script to be displayed to agents that are handling outbound calls. Required for all dialing modes except agentless.
Script *Domainentityref `json:"script,omitempty"`
// EdgeGroup - The EdgeGroup that will place the calls. Required for all dialing modes except preview.
EdgeGroup *Domainentityref `json:"edgeGroup,omitempty"`
// Site - The identifier of the site to be used for dialing; can be set in place of an edge group.
Site *Domainentityref `json:"site,omitempty"`
// CampaignStatus - The current status of the Campaign. A Campaign may be turned 'on' or 'off'. Required for updates.
CampaignStatus *string `json:"campaignStatus,omitempty"`
// PhoneColumns - The ContactPhoneNumberColumns on the ContactList that this Campaign should dial.
PhoneColumns *[]Phonecolumn `json:"phoneColumns,omitempty"`
// AbandonRate - The targeted abandon rate percentage. Required for progressive, power, and predictive campaigns.
AbandonRate *float64 `json:"abandonRate,omitempty"`
// DncLists - DncLists for this Campaign to check before placing a call.
DncLists *[]Domainentityref `json:"dncLists,omitempty"`
// CallableTimeSet - The callable time set for this campaign to check before placing a call.
CallableTimeSet *Domainentityref `json:"callableTimeSet,omitempty"`
// CallAnalysisResponseSet - The call analysis response set to handle call analysis results from the edge. Required for all dialing modes except preview.
CallAnalysisResponseSet *Domainentityref `json:"callAnalysisResponseSet,omitempty"`
// Errors - A list of current error conditions associated with the campaign.
Errors *[]Resterrordetail `json:"errors,omitempty"`
// CallerName - The caller id name to be displayed on the outbound call.
CallerName *string `json:"callerName,omitempty"`
// CallerAddress - The caller id phone number to be displayed on the outbound call.
CallerAddress *string `json:"callerAddress,omitempty"`
// OutboundLineCount - The number of outbound lines to be concurrently dialed. Only applicable to non-preview campaigns; only required for agentless.
OutboundLineCount *int `json:"outboundLineCount,omitempty"`
// RuleSets - Rule sets to be applied while this campaign is dialing.
RuleSets *[]Domainentityref `json:"ruleSets,omitempty"`
// SkipPreviewDisabled - Whether or not agents can skip previews without placing a call. Only applicable for preview campaigns.
SkipPreviewDisabled *bool `json:"skipPreviewDisabled,omitempty"`
// PreviewTimeOutSeconds - The number of seconds before a call will be automatically placed on a preview. A value of 0 indicates no automatic placement of calls. Only applicable to preview campaigns.
PreviewTimeOutSeconds *int `json:"previewTimeOutSeconds,omitempty"`
// AlwaysRunning - Indicates (when true) that the campaign will remain on after contacts are depleted, allowing additional contacts to be appended/added to the contact list and processed by the still-running campaign. The campaign can still be turned off manually.
AlwaysRunning *bool `json:"alwaysRunning,omitempty"`
// ContactSort - The order in which to sort contacts for dialing, based on a column.
ContactSort *Contactsort `json:"contactSort,omitempty"`
// ContactSorts - The order in which to sort contacts for dialing, based on up to four columns.
ContactSorts *[]Contactsort `json:"contactSorts,omitempty"`
// NoAnswerTimeout - How long to wait before dispositioning a call as 'no-answer'. Default 30 seconds. Only applicable to non-preview campaigns.
NoAnswerTimeout *int `json:"noAnswerTimeout,omitempty"`
// CallAnalysisLanguage - The language the edge will use to analyze the call.
CallAnalysisLanguage *string `json:"callAnalysisLanguage,omitempty"`
// Priority - The priority of this campaign relative to other campaigns that are running on the same queue. 5 is the highest priority, 1 the lowest.
Priority *int `json:"priority,omitempty"`
// ContactListFilters - Filter to apply to the contact list before dialing. Currently a campaign can only have one filter applied.
ContactListFilters *[]Domainentityref `json:"contactListFilters,omitempty"`
// Division - The division this campaign belongs to.
Division *Domainentityref `json:"division,omitempty"`
// SelfUri - The URI for this object
SelfUri *string `json:"selfUri,omitempty"`
}
// String returns a JSON representation of the model
func (o *Campaign) String() string {
j, _ := json.Marshal(o)
str, _ := strconv.Unquote(strings.Replace(strconv.Quote(string(j)), `\\u`, `\u`, -1))
return str
}