Skip to main content

Event Details - Created Translated Files

This event is triggered when one or more files are delivered back to the connector (or “out” directory).

To obtain the event details, use its ID (such as “bbid” in the webhook) and API method API - Full event details

The payload may look as follows:

CODE
{
    "id": "22fde108-a8bd-4609-8c7e-5c101b519eed",
    "date": "2023-06-20T07:29:15.4628017Z",
    "projectkey": "dddac1e2-32fa-4f29-ab92-78128a94809e",
    "projectname": "Test project",
    "action": "Create translated files (connector push event)",
    "actioncode": "CreatedTranslatedFiles",
    "info": "4 translated files successfully created and saved.",
    "sender": "Admin",
    "success": true,
    "error": null,
    "details": {
        "files": [
            {
                "date": "2023-06-20T07:29:15.4185164+00:00",
                "type": "S",
                "locale": "en",
                "spath": "c:\\beebox\\testproject\\in\\with html 1 - Copy (2).json",
                "tpath": null,
                "err": null,
                "errex": null
            },
            {
                "date": "2023-06-20T07:29:15.4309822+00:00",
                "type": "T",
                "locale": "fr",
                "spath": "c:\\beebox\\testproject\\in\\with html 1 - Copy (2).json",
                "tpath": "c:\\beebox\\testproject\\out\\fr\\with html 1 - Copy (2).json",
                "err": null,
                "errex": null
            },
            {
                "date": "2023-06-20T07:29:15.4344818+00:00",
                "type": "T",
                "locale": "es",
                "spath": "c:\\beebox\\testproject\\in\\with html 1 - Copy (2).json",
                "tpath": "c:\\beebox\\testproject\\out\\es\\with html 1 - Copy (2).json",
                "err": null,
                "errex": null
            },
            {
                "date": "2023-06-20T07:29:15.4450126+00:00",
                "type": "S",
                "locale": "en",
                "spath": "c:\\beebox\\testproject\\in\\with html 1 - Copy.json",
                "tpath": null,
                "err": null,
                "errex": null
            },
            {
                "date": "2023-06-20T07:29:15.4564707+00:00",
                "type": "T",
                "locale": "fr",
                "spath": "c:\\beebox\\testproject\\in\\with html 1 - Copy.json",
                "tpath": "c:\\beebox\\testproject\\out\\fr\\with html 1 - Copy.json",
                "err": null,
                "errex": null
            },
            {
                "date": "2023-06-20T07:29:15.4618021+00:00",
                "type": "T",
                "locale": "es",
                "spath": "c:\\beebox\\testproject\\in\\with html 1 - Copy.json",
                "tpath": "c:\\beebox\\testproject\\out\\es\\with html 1 - Copy.json",
                "err": null,
                "errex": null
            }
        ]
    },
    "pushurl": "http://mytestserver.com/beebox/callback?bbevent=CreatedTranslatedFiles&bbproject=dddac1e2-32fa-4f29-ab92-78128a94809e&bbdate=2023-06-20 07:29:15Z&bbok=yes&bberror=&bbid=22fde108-a8bd-4609-8c7e-5c101b519eed",
    "pushresult": "Failed",
    "emailadminresult": "Skip",
    "emailclientresult": "Skip"
}

The most important elements are:

  • The files collection contains each source file with the respective delivered translated files.

    • Source files are those where property type equals “S”. You can disregard those entries.

    • Target files are those where type is “T”. These are the files that were newly delivered.

    • The locale is the language of the file.

    • spath is the source path. Use the relative path from “….out/”. This is the portion that is used by the APIs when referencing the files.

    • tpath is the target path. Use the relative path from “….out/”. The relative target path is generally identical to the relative source path, unless the Beebox is configured to amend translated file names.

  • The projectkey is the ID of the Beebox project.

  • The boolean success tells if the operation of delivery was a success or not. If there is problem the error property will contain an error message.

  • The pushresult property indicates if your webhook URL (which the system called) returned an error or success code to the Beebox.

When using “spath” and “tpath”: At the time of writing, the paths are absolute in your Beebox instance.

In a future release we will save relative paths (with respect to “in” and “out”) only.

Your code should check for the “/in/” and “/out” portion and, if these exist, cut off everything to the left in order to obtain the file’s relative path.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.