Was this page helpful?

Jobs feed plugin

    Table of contents

    The purpose of plugin is to generate data for integrations. 

    Basically it lists message actions by configured parameters. Those message actions have reference to message template (which is used as job advertisement text). The plugin groups data from those message tempaltes and message actions into output file (JSON file is with details defined here).

    Configuration

    To add JSON feed functionality into instance, we need to configure the plugin for each channel and language. This job is usually done by scripting or configured by consultant.

    Things to be configured

    • contactReference - id of target platform
    • status - status of Action Templates we are interested in
    • language - language, which will be the plugin searching for
    • languageCode - the language code so we do not have to list languages
    • outputFile - the target file (name and adress of the output file)
    • responseLink - the address which will be copied into responce
    • interval - the time interval of job feed generating

     

    Implementation

    Requests

    First list Message Action (MA) for the target channel. The channel is represented by field contactReference on MA.

    <wsdl:ListMessageAction>
             <server>mbluetest</server>
          	<session>DB66507E7BBA2D9D8D21AC17042142B5638177393B08</session>
          	<FILTER>
                <COL>
                   <name>contactReference</name>
                   <type>equals</type>
                   <value>124512000</value>
                </COL>
                <COL>
                   <name>status</name>
                   <type>equals</type>
                   <value>1</value>
                </COL>
             </FILTER>
          </wsdl:ListMessageAction>
    

    From the MA object you can read validity, tracking code (code) and reference to MessageTemplate

    <ns1:ListMessageActionResponse xmlns:ns1="http://atollon.com/enterprise/wsdl">
             <result>OK</result>
             <count>1</count>
             <ROW>
                <id>33610351000</id>
                <acl>MACT000001120435</acl>
                <treeHandle>33563978000</treeHandle>
                <created>2017-03-17T14:43:06.748226</created>
                <createdBy>53000</createdBy>
                <modified>2017-03-17T14:43:06.748226</modified>
                <modifiedBy>53000</modifiedBy>
                <code>tomik</code>
                <messageTemplate>33610321000</messageTemplate>
                <userId>53000</userId>
                <contactReference>124512000</contactReference>
                <status>1</status>
             </ROW>
          </ns1:ListMessageActionResponse>
    

    Then gather message template

    <wsdl:GetMessageTemplate>
              <server>mbluetest</server>
          	<session>DB66507E7BBA2D9D8D21AC17042142B5638177393B08</session>
          	<id>33610321000</id>	
          </wsdl:GetMessageTemplate>
    

    The MT object concains job advertisement in default language and transaltions into other languages

    <ns1:GetMessageTemplateResponse xmlns:ns1="http://atollon.com/enterprise/wsdl">
             <result>OK</result>
             <count>1</count>
             <messageTemplate>
                <id>33749392000</id>
                <aclh>MSGT000001120442</aclh>
                <treeHandle>52579000</treeHandle>
                <templateName>Testovaci inzerat</templateName>
                <description>testovaci inzert v cestine</description>
                <subject>Predmet inzeratu</subject>
                <recipient>&lt;RECIPIENT /></recipient>
                <identity/>
                <html>0</html>
                <type>7</type>
                <language>2607000</language>
                <isDefault>0</isDefault>
                <BODY>
                   <string>text inzeratu</string>
                </BODY>
                <NOTIFY>
                   <string/>
                </NOTIFY>
                <DOCUMENTS/>
                <TRANSLATIONS>
                   <TRANSLATION>
                      <id>33749394000</id>
                      <name>Testovaci inzerat EN</name>
                      <isDefault>0</isDefault>
                      <language>2508000</language>
                   </TRANSLATION>
                </TRANSLATIONS>
             </messageTemplate>
          </ns1:GetMessageTemplateResponse>
    

    If you need different language than the default (the one in the responce), you need to get another MT which belongs to the language.

    For more information about MessageAction and MessageTemplate, see this

    Plugin parameters

    The plugin configuration parameters extending the typical parameters list

    • contactReference - id of target platform
    • status - status of Action Templates we are interested in
    • language - language, which will be the plugin searching for
    • languageCode - the language code so we do not have to list languages
    • outputFile - the target file (name and adress of the output file)
    • responseLink - the address which will be copied into responce
    Was this page helpful?
    Tag page (Edit tags)
    • No tags
    Page statistics
    472 view(s), 2 edit(s), and 6014 character(s)

    Comments

    You must login to post a comment.

    Attach file

    Attachments