1

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();
4
  • You have opening and closing script blocks within the main script block, this will error. You will need to remove the %% around ClinicId for example. Commented Oct 21, 2014 at 17:17
  • @victorcorey we are using those opening/closing script blocks as the pointer for the API call. THose variables are being passed in externally. Will the API call know to associate the parameter with those removed?
    – Realrx7
    Commented Oct 21, 2014 at 17:57
  • What is the API call? Here's an example for a Triggered Send API call. The external data is being passed in a parameter called xml. help.exacttarget.com/en-US/documentation/exacttarget/content/… Commented Oct 22, 2014 at 18:26
  • So I think what you are looking to do is: Set @ClinicID = ClinicId Commented Oct 22, 2014 at 18:30

1 Answer 1

0

Couple of updates to make this work:

  • Removed the '%%' characters from the set statement

  • Removed the 'Your %%[%%= v(@FriendlyClinicName) =%%]%%'... portions and replaced with concat @msg

  • The Spanish version would not allow specific characters to be used in mobile (I.E. the accent symbols)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .