We are trying to pass through external variables via an API call that will then assign values within an AMPscript block to populate a triggered SMS communication. All the API calls are ending up in the error queue at the moment.Here's what we have in place now:
%%[
Var @HOHID, @ClinicID, @curTime, @CancellationCodeEnglish, @CancellationCodeSpanish
Set @ClinicID = %%ClinicId%%
Set @HOHID = %%HOHId%%
Set @ReasonCode = %%CancellationReasonCode%%
Set @FriendlyClinicName = Lookup("ll_clinic_data","FacilityName","CRMFacilityID”,@ClinicID)
Set @CancellationCodeEnglish = Lookup(“Cancellation_Reason_Codes”,"ReasonCode_English","CancellationReasonCode”,@ReasonCode)
Set @CancellationCodeSpanish = Lookup(“Cancellation_Reason_Codes”,"ReasonCode_Spanish","CancellationReasonCode”,@ReasonCode)
Set @MsgLanguage = Lookup("b_patient_data","Language","HOHid",@HOHID)
IF @MsgLanguage == "English"
Set @msg = “Your %%[%%= v(@FriendlyClinicName) =%%]%% office is closed due to %%[%%= v(@CancellationCodeEnglish) =%%]%%. Someone will call you to reschedule."
else
Set @msg = “Su %%[%%= v(@FriendlyClinicName) =%%]%% está %%[%%= v(@CancellationCodeSpanish) =%%]%%. Alguien le llamará para una nueva cita."
endif
]%%
%%= v(@msg) =%%
Here is the snipped where we are creating the attribute (done in a loop):
subscriber.Attributes[attributeIndex] = new ExactTargetAPI.Attribute();
subscriber.Attributes[attributeIndex].Name = dc.ColumnName;
subscriber.Attributes[attributeIndex].Value = subscriberData[dc.ColumnName].ToString();