Import job webhook

The import job webhook, known as the End Job Notification webhook, serves your application, or site, real-time import job information. You need to ensure that your application understands the spec (in this case, the job report model). The sections below provide more details.

End job notification webhook

Webhooks provide third-party applications with real-time information. They send data as it happens instead of requiring an application to poll the data as you might do in a typical API.

The End Job Notification webhook at ReachFive delivers the job model to your application or site via a URL that you specify in the ReachFive Console.

The webhook delivers information in a fire-and-forget fashion. This means that there are no retries. The webhook delivers the job report (minus the definition object) whether the import job was successful or not.

To see a sample payload request for this webhook, check out the sample payload below.

end job notification webhook flow

Enable the End Job Notification webhook

If you want to use the End Job Notification webhook, you will need to enable it on your ReachFive Console.

Prerequisites

  • You must have access to the ReachFive Console.

  • You must have a Developer, Manager, or Administrator role.

  • You must have the Import Jobs feature enabled.

Instructions

  1. Go to Settings  Import definitions.

  2. Choose to edit an existing import job edit icon or select + New Definition,role="zoom".

  3. Scroll to the End Job Notification Webhook section of the page.

  4. Enable the webhook.

  5. Specify the URL to which you want to send the POST request containing the job model.

  6. Specify how long the ReachFive API should wait for a response from the URL (in seconds) in the Timeout field.

    If the we do not receive a response from the URL in the time specified in the Timeout field, the job report is not sent.
  7. Optionally, add Authorization information.

    Currently, only a static header-based authentication is implemented at this time. If configured, the Authorization header will be set on the request with the specified value. The value pattern depends on your authentication method:

    Method Standard Example

    Basic authentication

    RFC7617

    Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==

    OAuth 2 bearer token

    RFC6750

    Bearer mF_9.B5f-4.1JqM

    You may set the authentication mode with any pattern you wish; however, we strongly recommend following the W3C standard of <Type> <Value>.
  1. Don’t forget to Save your input.

enable import webhook

End job notification webhook request example

This section contains an example request payload of the End Job notification webhook.

{
   "total_succeeded":2, (1)
   "total_operations":3, (2)
   "total_failed":1, (3)
   "id":"AXVLj...y8Qkpxt", (4)
   "status":"SUCCESS", (5)
   "created_at":"2020-11-21T14:26:10.345Z", (6)
   "type":"import", (7)
   "updated_at":"2020-11-21T14:26:11.630Z", (8)
   "definition_id": "AWstKc...qw5seX89", (9)
   "definition_name": "User import" (10)
}
1 The total number of successful imports.
2 The total number of operations in this job execution.
3 The total number of failed imports.
4 The id of the job.
5 Specifies whether the import was executed succesfully or not.
6 The time at which the job was created.
7 Specifies the job type (import/export).
8 The time at which the job was updated.
9 The job definition id.
10 The job definition name.
Feedback