KB Article #178987

How to create custom message attributes

Problem

How to create custom message attributes

Resolution

Suppose:

  • You want to route the file based on filename.
  • The files that you want to route starts with: abc
  • Custom Message attribute: ConsumptionFilenamePrefix
  • Custom Message attribute template: ConsumptionFilenamePrefixTemplate


Steps:

1. Open the UI

2. Click on System management -> Manage message attributes

3. In the "Add a message attribute" field type a name for the attribute (for example ConsumptionFilenamePrefix)

4. Click on System management -> Manage message attributes templates

5. Click on "Add a message attributes template"

6. Type a name for this message attribute template (For example ConsumptionFilenamePrefixTemplate)

7. From the drop-down menu "Add a message attribute to template" select the one you just created (ConsumptionFilenamePrefix), in the "Value" field type def and click " Add message attribute to template" button. Click Save changes button as well.

8. Click "Save changes" button

9. Go to your community profile and click on "Message handler"

10. Click on "Add a new message attribute definition with criteria"

11. From the drop-down menu "Name of message attribute" select the one you just created (ConsumptionFilenamePrefix) and click on "Next" button

12. Select "Conditions" tab and click on "Add condition" button

13. From the drop-down menu "Choose an attribute for the condition" select "Consumption file name" and click "Next"

14. From the "Operator" drop-down menu select "Starts with"

15. From the "Value" drop-down menu select "Constant" and type abc in the next empty field (Please have in mind that it is case sensitive and if you file starts with ABC type ABC and not abc)

16. Click finish button

17. Go back to "Message handler" and click on "Add a new message processing action"

18. From the "Attribute name" drop-down menu select "Consumption file name" and click next button

19. Attribute should be " Starts with", Value should be "Constant" and in the empty field type abc. Click next button

20. On the next screen named "Action" scroll down and select "Apply message attributes template" radio button

21. Select "Select the message attributes template to use" radio button

22. From the "Message attributes name" drop-down menu select ConsumptionFilenamePrefixTemplate. Click on "Finish" button.

23. Go back to your community profile and click on "Integration delivery" icon

24. Click on "Add an integration delivery exchange"

25. Select "File system" radio button and click next

26. Provide "Directory name" where the files will be delivered and click "Finish"

27. Click on the newly created delivery exchange, select "Delivery criteria" tab and click on "Compare" button

28. From the first drop-down menu select ConsumptionFilenamePrefix, next one should be "equals" and type def in the empty field

29. Click "Save changes" button


Note:

This custom attributes need to configured with care. Partner should send messages exactly the way you configured as these custom templates are case sensitive. If the message attribute does not match the exact pattern it will deliver in the default integration delivery exchange