-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathupdateMessagingHistoryIDinMessagingHistory.flow
214 lines (214 loc) · 8.58 KB
/
updateMessagingHistoryIDinMessagingHistory.flow
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
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
<?xml version="1.0" encoding="UTF-8"?>
<Flow xmlns="http://soap.sforce.com/2006/04/metadata">
<apiVersion>52.0</apiVersion>
<decisions>
<description>IFMessagingConversationFound</description>
<name>IFMessagingConversationFound</name>
<label>IFMessagingConversationFound</label>
<locationX>410</locationX>
<locationY>463</locationY>
<defaultConnector>
<targetReference>CreateMessagingConversation</targetReference>
</defaultConnector>
<defaultConnectorLabel>Create New MessagingConversation and Parent Object</defaultConnectorLabel>
<rules>
<name>Exclude_outbound_messages</name>
<conditionLogic>and</conditionLogic>
<conditions>
<leftValueReference>$Record.Direction__c</leftValueReference>
<operator>EqualTo</operator>
<rightValue>
<stringValue>out</stringValue>
</rightValue>
</conditions>
<label>Exclude outbound messages</label>
</rules>
<rules>
<name>UpdateMessagingConversationID</name>
<conditionLogic>and</conditionLogic>
<conditions>
<leftValueReference>getVonageMessagingConversation.BrandPhoneNumber__c</leftValueReference>
<operator>EqualTo</operator>
<rightValue>
<elementReference>MessagingHistoryBrandPhoneNumber</elementReference>
</rightValue>
</conditions>
<conditions>
<leftValueReference>getVonageMessagingConversation.ContactPhoneNumber__c</leftValueReference>
<operator>EqualTo</operator>
<rightValue>
<elementReference>MessagingConversationContactPhoneNumber</elementReference>
</rightValue>
</conditions>
<connector>
<targetReference>updateMessaupdateMessageHistoryWithConversationIDgeHistoryWithConversationID</targetReference>
</connector>
<label>UpdateMessagingConversationID</label>
</rules>
</decisions>
<description>updateMessagingHistoryIDinMessagingHistory</description>
<interviewLabel>updateMessagingHistoryIDinMessagingHistory {!$Flow.CurrentDateTime}</interviewLabel>
<label>updateMessagingHistoryIDinMessagingHistory</label>
<processMetadataValues>
<name>BuilderType</name>
<value>
<stringValue>LightningFlowBuilder</stringValue>
</value>
</processMetadataValues>
<processMetadataValues>
<name>CanvasMode</name>
<value>
<stringValue>FREE_FORM_CANVAS</stringValue>
</value>
</processMetadataValues>
<processMetadataValues>
<name>OriginBuilderType</name>
<value>
<stringValue>LightningFlowBuilder</stringValue>
</value>
</processMetadataValues>
<processType>AutoLaunchedFlow</processType>
<recordCreates>
<description>CreateMessagingConversation</description>
<name>CreateMessagingConversation</name>
<label>CreateMessagingConversation</label>
<locationX>145</locationX>
<locationY>306</locationY>
<connector>
<targetReference>getVonageMessagingConversation</targetReference>
</connector>
<inputAssignments>
<field>BrandPhoneNumber__c</field>
<value>
<elementReference>MessagingHistoryBrandPhoneNumber</elementReference>
</value>
</inputAssignments>
<inputAssignments>
<field>ContactPhoneNumber__c</field>
<value>
<elementReference>MessagingConversationContactPhoneNumber</elementReference>
</value>
</inputAssignments>
<object>VonageMessagingConversation__c</object>
<storeOutputAutomatically>true</storeOutputAutomatically>
</recordCreates>
<recordCreates>
<description>send Vonage Messaging Platform Event</description>
<name>send_Vonage_Messaging_Platform_Event</name>
<label>send Vonage Messaging Platform Event</label>
<locationX>968</locationX>
<locationY>625</locationY>
<inputAssignments>
<field>VonageMessagingConversationId__c</field>
<value>
<elementReference>getVonageMessagingConversation.Id</elementReference>
</value>
</inputAssignments>
<object>VonageMessagingUpdateEvent__e</object>
<storeOutputAutomatically>true</storeOutputAutomatically>
</recordCreates>
<recordLookups>
<name>getVonageMessagingConversation</name>
<label>getVonageMessagingConversation</label>
<locationX>720</locationX>
<locationY>306</locationY>
<assignNullValuesIfNoRecordsFound>false</assignNullValuesIfNoRecordsFound>
<connector>
<targetReference>IFMessagingConversationFound</targetReference>
</connector>
<filterLogic>and</filterLogic>
<filters>
<field>BrandPhoneNumber__c</field>
<operator>EqualTo</operator>
<value>
<elementReference>MessagingHistoryBrandPhoneNumber</elementReference>
</value>
</filters>
<filters>
<field>ContactPhoneNumber__c</field>
<operator>EqualTo</operator>
<value>
<elementReference>MessagingConversationContactPhoneNumber</elementReference>
</value>
</filters>
<getFirstRecordOnly>true</getFirstRecordOnly>
<object>VonageMessagingConversation__c</object>
<storeOutputAutomatically>true</storeOutputAutomatically>
</recordLookups>
<recordUpdates>
<description>updateMessageHistoryWithConversationID</description>
<name>updateMessaupdateMessageHistoryWithConversationIDgeHistoryWithConversationID</name>
<label>updateMessageHistoryWithConversationID</label>
<locationX>770</locationX>
<locationY>626</locationY>
<connector>
<targetReference>send_Vonage_Messaging_Platform_Event</targetReference>
</connector>
<filterLogic>and</filterLogic>
<filters>
<field>BrandPhoneNumber__c</field>
<operator>EqualTo</operator>
<value>
<elementReference>MessagingHistoryBrandPhoneNumber</elementReference>
</value>
</filters>
<filters>
<field>ContactPhoneNumber__c</field>
<operator>EqualTo</operator>
<value>
<elementReference>MessagingConversationContactPhoneNumber</elementReference>
</value>
</filters>
<inputAssignments>
<field>MessagingConversation__c</field>
<value>
<elementReference>MessagingConversationIDforUpdate</elementReference>
</value>
</inputAssignments>
<inputReference>$Record</inputReference>
</recordUpdates>
<start>
<locationX>410</locationX>
<locationY>48</locationY>
<connector>
<targetReference>getVonageMessagingConversation</targetReference>
</connector>
<object>VonageMessagingHistory__c</object>
<recordTriggerType>Create</recordTriggerType>
<triggerType>RecordAfterSave</triggerType>
</start>
<status>Active</status>
<variables>
<description>MessagingConversationContactPhoneNumber</description>
<name>MessagingConversationContactPhoneNumber</name>
<dataType>String</dataType>
<isCollection>false</isCollection>
<isInput>true</isInput>
<isOutput>true</isOutput>
<value>
<elementReference>$Record.ContactPhoneNumber__c</elementReference>
</value>
</variables>
<variables>
<description>MessagingConversationIDforUpdate</description>
<name>MessagingConversationIDforUpdate</name>
<dataType>String</dataType>
<isCollection>false</isCollection>
<isInput>true</isInput>
<isOutput>true</isOutput>
<value>
<elementReference>getVonageMessagingConversation.Id</elementReference>
</value>
</variables>
<variables>
<description>MessagingHistoryBrandPhoneNumber</description>
<name>MessagingHistoryBrandPhoneNumber</name>
<dataType>String</dataType>
<isCollection>false</isCollection>
<isInput>true</isInput>
<isOutput>true</isOutput>
<value>
<elementReference>$Record.BrandPhoneNumber__c</elementReference>
</value>
</variables>
</Flow>