UpdateMessages

Inputs (Array[] to update)

NameTypeDescriptionMandatoryAvailable from version
BrickIdGuidThe BrickId (unique id) of the message.YesNew method in 2.24
ReceiverGuidThe receiver of the message. 

SubjectstringThe subject of the message.

BodystringThe body of the message.

EventDateDateTimeA date associated with the message.

IsHTMLboolIf the body of the message contains html this should be set to true.

IsReadboolIf the message is read by the customer.

IsPublicboolIf the message is public.

IsPromotedboolIf the message is promoted i.e. shown on the account overview when the user logs in.

PrioritystringWhich priority the message should have. Allowed values are: "High", "Medium", "Low".

StatusstringWhich status the message should have. Allowed values are: "Created", "InProgress", "Done", "Closed".

Outputs

NameTypeDescriptionAvailable from version
EntitiesArrayAll message in the request is returned along with each message BrickId and array of Errors per message

Code examples

XML Example - Update Message Status
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"  xmlns:tns="http://tempuri.org/" xmlns:s1="http://microsoft.com/wsdl/types/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/">
    <soap:Body>
        <UpdateMessages xmlns="http://tempuri.org/">
            <req>
                <Credentials>
                    <UserName>[Username]</UserName>
                    <Password>[Password]</Password>
                </Credentials>
                <identify>[Identifier]</identify>
                <Entities>
                    <UpdateMessage>
                        <BrickId>
                            [Guid Id of the message]
                        </BrickId>
                        <IsRead>true</IsRead>
                    </UpdateMessage>
                </Entities>
                <Fields>
                    <BrickId>true</BrickId>
                    <IsRead>true</IsRead>
                </Fields>
            </req>
        </UpdateMessages>
    </soap:Body>
</soap:Envelope>



C# - Update Message
public static void UpdateActivityLogMessage()
        {
            var binding = new BasicHttpBinding();
            binding.MaxReceivedMessageSize = Int32.MaxValue;

            var target = new bfsapi.bfsapiSoapClient(binding, new EndpointAddress("http://localhost:20010/bfsapi.asmx"));
            var req = new UpdateMessageRequest();
            req.Credentials = new bfsapi.Credentials
            {
                UserName = GetApiUserName(),
                Password = GetApiPassword()
            };

            req.identify = GetApiIdentifier();
            req.Fields=new UpdateMessageFields
            {
                Subject = true,
                Priority = true,
                CustomFields = true,
                EventDate = true
            };

            req.Entities = new[]
            {
                new bfsapi.UpdateMessage()
                {
                    BrickId = new Guid("20b36672-0109-4679-ad7e-aed65494977d"),
                    Subject = "UpdatedeSubject",
                    Priority = "Medium",
                    CustomFields = new CustomField[]
                    {
                        new CustomField
                        {
                            FieldName = "TestFieldUpdate",
                            Value = "TestValueUpdate"
                        }, 
                    },
                    EventDate = DateTime.Today.AddDays(10)
                    
                }
            };

            var resp = target.UpdateMessages(req);
        }


Blog Posts

Terms of License
Change Policy
© 2009 - 2024 Huddlestock Technologies AB All rights reserved