Homepage / Doc / Update Invitation

Update Invitation

The UpdateInvitation method can be utilized to update an already created invitation. The method requires that you have already retrieved an InvitationData object from the GetInvitation method documented above.

You need to ensure that the message body contains the auto tracking link for your invitation and survey. You can add this in by adding @@SURVEY_URL_PLACEHOLDER__DO_NOT_ERASE into the body variable of your InvitationData that you send back to Checkbox.

If you are using Checkbox Online, you must also add in the appropriate opt out code ( @@OPT_OUT_PLACEHOLDER__DO_NOT_ERASE ) and company footer information, which can also be added into the InvitationData.Body variable.

class Test
{

    private static void Main()
    {
        dynamic client = new InvitationManagementServiceClient();

        //first you need to get the invitation data
        dynamic invitation = client.GetInvitation(authToken, 1318);
        if (!invitation.CallSuccess) {
            Console.WriteLine(invitation.FailureMessage);
            //Invitation was not retrieved, exit the code
            return;
        }

        dynamic invitationData = invitation.ResultData;

        //once you have invitation data you can work on your updates
        invitationData.Body = "This is my invitation body";
        invitationData.Subject = "This is the subject of my invitation";
        invitationData.FromAddress = "admin@checkbox.com";
        invitationData.FromName = "Checkbox Admin";

        //once you are done making your updates, you can send the invitation back to Checkbox to apply your changes
        dynamic updateResult = client.UpdateInvitation(authToken, invitationData);

        if (!updateResult.CallSuccess) {
            Console.WriteLine(invitation.FailureMessage);
            return;
        }

        //Always close the client
        client.Close();

    }
}

 

 

Input Parameters

Parameter Type Description
authToken string Authentication token to validate permission over the data requested
invitation invitationData InvitationData that you want to update in Checkbox
May 15, 2017