We have MobileConnect contacts which we use filed "mobile number" as foreign key to the DE with the relationship one-to-many in order to send SMSs. The number of sending SMSs is equals number of that DE records with related phone number in mobileconnect contacts.
For example, if in this DE there are 3 records with Customer#1 mobile number, we are going to send 3 SMSs.
We can send 3 SMSs, however, we can't choose the record to send (always pick the first one) so we try to update the flag to skip the sent record and pick the next one. Here is our code:
%%[
var @rows, @row, @row_count
var @policy_number, @or_number
var @response
set @rows = LookupRows("ADA_Successful_Debit","Phone", MOBILE_NUMBER, "SMSSent", 0)
set @row_count = rowcount(@rows)
If @row_count > 0 then
set @row = row(@rows,1)
set @policy_number = field(@row,"Policy Number")
set @or_number = field(@row,"OR Number")
@response = UpdateDE("ADA_Successful_Debit",1,"Policy Number",@policy_number,"SMSSent", 1)
Endif
]%%
But updating the data extension doesn't work. Do you have any solution for this case?