To configure an upsert (update or insert) a user flow:
- Click the Create Flow icon associated with updating or inserting a simple user.
The API Orchestration user interface is displayed. - Select and pull the simpleusers flow-node onto the flow editor from the Models list. Note that the Start flow-node is automatically connected to the input of the simpleusers flow-node.
- Name the flow-node: Upsert a user
- Select the
upsert
method. - Select Parameters.
- Configure the value parameter. If selector is selected from the selector drop-down menu, as you begin typing in the value parameter field, a drop-down menu of valid or previously used selector options is displayed. You may optionally choose a selector from the list, or continue typing to manually configure the parameter. For additional selector autocomplete information, refer to Manage Nodes. For additional information on the Model flow-node and General flow-node configuration parameters, refer to Flow Orchestration.
- Select Outputs.
- Configure the update output. As you begin typing in the update field, a drop-down menu of valid or previously used output options is displayed. You may optionally choose an output from the list, or continue typing to manually configure the parameter.
- Configure the upsert output. As you begin typing in the upsert field, a drop-down menu of valid or previously used output options is displayed. You may optionally choose an output from the list, or continue typing to manually configure the parameter.
- Select and pull a Set Context flow-node onto the flow editor from the Core list.
- Name the flow-node: Set location
- Select Parameters.
- For the value parameter, select selector and select
$.model.id
from the selector options drop-down menu or continue typing to manually complete the selector configuration. For additional selector auto-complete information, refer to Manage Nodes. - Connect the insert output of the Upsert a user flow-node to the input of the Set location flow-node. For additional information on connecting flow-nodes in a flow, refer to Manage nodes.
- Select and pull an HTTP flow-node onto the flow editor from the Core list.
- Name the flow-node: Upsert succeeded
- Select Parameters.
- For the status parameter, select number and enter
204
in the field. - Leave the body and headers parameters disabled.
- Connect the update output of the Upsert a user flow-node to the input of the Upsert succeeded flow-node. For additional information on connecting flow-nodes in a flow, refer to Manage nodes.
- Select and pull an HTTP flow-node onto the flow editor from the Core list.
- Name the flow-node: Insert succeeded
- Select Parameters.
- For the status parameter, select number and enter
404
in the field. - Leave the body parameter disabled.
- Enable the headers parameter, select selector, and select
$.headers
from the selector options drop-down menu or continue typing to manually complete the selector configuration. For additional selector auto-complete information, refer to Manage Nodes. - Connect the insert output of the Upsert a user flow-node to the input of the Insert succeeded flow-node. For additional information on connecting flow-nodes in a flow, refer to Manage nodes.
- Connect the next output of the Set location flow-node to the input of the
Insert succeeded flow-node. For additional information on connecting flow-nodes
in a flow, refer to Manage nodes. The completed flow is displayed.
- Click Save.
- On the next screen, click Proceed. The server will be restarted and the Upsert a user flow will be saved and enabled.