private void parse(StreamDefinition streamDefinition, String template) {

        if (Arrays.asList(streamDefinition.getAttributeNameArray()).contains(template.trim())) {
            this.objectIndex = streamDefinition.getAttributePosition(template.trim());
            this.isObjectMessage = true;
            this.type = streamDefinition.getAttributeList().get(objectIndex).getType();
        } else {
            if (template.matches("^`[^\\s]*`$")) {
                template = template.replaceAll("^`|`$", "");
            }

            String templateString = parseTextMessage(streamDefinition, template);
            String[] templateArray = templateString.split(SPLIT_PATTERN);
            assignTemplateArrayAttributePositions(templateArray, streamDefinition);
            this.splitTemplateArray = templateArray;
        }
    }
Template builder used by {@link SinkMapper} to generate custom payload.
modules/siddhi-core/src/main/java/io/siddhi/core/util/transport/TemplateBuilder.java