Create, read, upsert, and delete an entity

This example pipeline demonstrates how to create, read, upsert, and delete an entity from Syndigo server.

Click here to download the sample Syndigo entity information JSON used in this example.

  1. Configure the JSON Generator Snap as follows:
    Click Edit JSON and copy the contents of the downloaded JSON file into the Snap's JSON editor.
    Copy data to JSON Generator's editor

  2. Connect a Mapper Snap and fill the following details in the Mapping table. Ensure that the Expression button () is enabled for all the mapping entries.
    Expression Target path
    $entities.id $id
    $entities.type $type
    $entities.name $name
    $entities.attributes $data.attributes
  3. Connect another Mapper Snap with the following mappings. We use these mappings to create a new entity record.

    Mapper2 mappings to create entity

  4. Configure a Syndigo Upsert Snap as follows:

    On validation, the Snap creates the new entity in the Syndigo server and displays the information on the entity.

    Syndigo Upsert Snap configuration Syndigo Upsert Snap output

    Syndigo Upsert Snap to create entity


    Syndigo Upsert Snap output

  5. Use a Mapper Snap again to capture the entity ID of the newly created entity from the success message in the upstream (Syndigo Upsert) Snap.
  6. Pass this entity ID to a Syndigo Read Snap and read the available entity information.

    On validation, the Snap displays the entity information.

    Syndigo Read Snap configuration Mapper Snap output

    Syndigo Upsert Snap to create entity


    Syndigo Upsert Snap output

  7. Use a Mapper Snap to pass the following new values into the entity record in Syndigo.

    On validation, the Snap displays the entity information.

    Mapper Snap configuration Mapper Snap output

    Mapper Snap with values to upsert


    Mapper Snap mappings output

  8. Connect a Syndigo Upsert Snap to pass the mapped values into the entity record in Syndigo.

    On validation, the Snap displays the entity information.

    Syndigo Upsert Snap configuration Syndigo Upsert Snap output

    Syndigo Upsert Snap with values to upsert


    Syndigo Upsert Snap output

  9. Repeat the last three steps done so far and capture the ID of the entity. Pass this ID to another Syndigo Upsert Snap, now to delete the entity.

    On validation, the Snap displays the information of the deleted entity.

    Syndigo Upsert Snap configuration Syndigo Upsert Snap output

    Syndigo Upsert Snap with entity ID to delete


    Syndigo Upsert Snap output for delete entity

  10. Connect a Mapper Snap to this Upsert Snap to capture the entity ID passed for deletion. Now, pass this ID to a Syndigo Read Snap to see if the entity has been deleted. If the entity is not deleted yet, this Snap would display the entity details in the output. Else, the Snaps returns no details of the entity.
To successfully reuse pipelines:
  1. Download and import the pipeline into SnapLogic.
  2. Configure Snap accounts as applicable.
  3. Provide pipeline parameters as applicable.