Populate Invite Custom Fields via RestAPI

0

I’m trying to populate the invite custom field values via a Rest API call but it’s not working.  Specifically I’m using the email message POST like in the example below where I would like to pass along a support call number to a custom field for display and reporting.  Should I be passing this value somewhere else?  

https://restapi.surveygizmo.com/v4/survey/123456/surveycampaign/1234567/emailmessage/1122334?_method=POST&messagetype=html&from[name]=bri&from[email]-bri@sgizmo.com&subject=We%20need%20your%20feedback!&[invite(“custom 1”)]=556645&send=true

Bill Wolfe answered
    0

    After countless variations I was finally able to get this to work.  I had to use &scustomfield1=value to pass along the invite custom field value.  I’m not sure why this is only listed on a single page that seems to reference contact level custom values, but it works and stored it in each response for the same contact.  

    Bill Wolfe answered
      0

      I’m not sure if I fully follow (apologies if I don’t) but are you wanting to add the merge code itself ([invite(“custom 1”)]) to the body of the email message so that it can pull in the Custom 1 values assigned for each contact?

      Or are you wanting to assign the Custom 1 values to contacts?

      The Custom 1 values should be defined when creating/updating the contact via the SurveyContact Sub Oblect:

      https://apihelp.surveygizmo.com/help/survey-contact-sub-object-v5

      If you are wanting to just add the merge code to the email body, you would use the EmailMessage Sub Object and specifically the ‘body’ parameter.

      Hope that is helpful!

      Bill Wolfe commented
        • I’m trying to use these values to hold support call information. I can’t use the contact level custom fields because a person could close two support calls the same day and I need to be able to have them respond to each one separately and have the values correctly stored. I thought that storing them at the invite level would be the appropriate way to go. Besides call number I want to store the call GUID so I don’t want it displayed in the body but stored in the survey response.

        ×

        Login

        Question stats

        • Active
        • Views253 times
        • Answers2 answers
        • Followers1 follower