Outgoing source data requests from the connector to Dsync will use a client. The client will handle defining the appropriate endpoint, sending the POST request, and handling the response and any errors that might be returned. All outgoing requests will expect a Process ID which will be saved on the request table. Specification of the Process ID can be found in the request header of the ‘Add a process notification’ web service within the destination.html file.
The connector will use the generated token from Dsync when sending all requests to Dsync. The token will need to be saved in the connector.
All outgoing requests will be made in JSON with the expected response to be in JSON as well.
Each entity type will have an event listener setup to monitor changes to an entity. There will be a event listener for three types of changes: creating a new entity, updating a current entity, and deleting a current entity. There can be multiple listeners for any given entity. Each time an entity is created/updated/deleted, the connector will send an appropriate request to DSYNC as per the create/update/delete web services defined in the source.html file attached.
Failed Outgoing Request Handling
Failed outgoing requests will be to be run again until they are successful by a background process (cron/php-resque/etc) for a predetermined number of times set in the connector. Failed requests will save the Dsync ID, the entity type and the method that is being used. After the max retries the end user is notified of error where they are able to rerun it manually.
All outgoing requests generated will supply the “create” method
All outgoing requests generated will supply the “update” method
All outgoing requests generated will supply the “delete” method