Configure Driving Instruction Workflow

  1. Go to Setting > Processes > Click on ‘New’ to design a new Workflow Process.

  2. Write Process name, choose ‘Workflow’ under the category section and select desired entity, and click on Okay as shown below;

3. Select ‘Organization’ under ‘Scope’ dropdown. Select ‘Record is created’ and ‘Record fields change’ options as shown below:

4. For the ‘Record fields Change’ option, select all of the address fields to ensure the address is retrieved when any of the address fields is changed as shown below:

5. Select Inogic.Maplytics.DrivingInstructions workflow assembly from the Add step menu as shown below:

6. Click on ‘Set Properties’ and set the address parameter as shown in below screenshot for the workflow assembly:

In ‘FromAddress’: Select the address fields of the entity that you want the direction ‘From’. Select the all address field i.e. Steet1, Street2, and City etc. and ensure sure you keep space between two fields. {Address 1: Street 1(Account)} {Address 1: Street 2(Account)} {Address 1: City(Account)} {Address 1: State/Province(Account)}

In ToAddress: Select the address fields of the entity that you want the directions ‘To’. Select the all address field i.e. Steet1, Street2, and City etc. and ensure to keep space between two fields.

Travel Mode: Select the Travel mode. For example (Driving, Walking, Transit). If you do not specify the Travel mode then it will take Driving mode by default.

Distance Unit: Select the Distance unit. For example (Mile or mi, Kilometer or km). If you do not specify the unit then it will take Kilometer as default unit.

  1. For the ”OptimizeBy” field, input any one of the values mentioned below:

distance: The route is calculated to minimize the distance. Traffic information is not used.

time: The route is calculated to minimize the time. Traffic information is not used.

timeWithTraffic: The route is calculated to minimize the time and uses current traffic information.

timeAvoidClosure: The route is calculated to minimize the time and avoid road closures. Traffic information is not used in the calculation.

Note:

· If you are not passing any values on “OptimizeBy”, then you will get results on distance optimization.

8. Click on Add Step -> Send Email -> Click on set property

Click on Email body -> Select Look for -> local value “inogic.Maplytics.DrivingInstructions. DrivingInstruction”

Select DrivingInstruction for plan text or DrivingInstructionHTML for html page. Click on save and close.

8. The driving instructions will be returned both in HTML and Plain Text format as an output parameter to this workflow. User can use either of them. For example we have used HTML formatted direction instruction in Email here.

  1. Also, we have included four outputs to get the Travel Time & Travel Distance with/without unit values.

For example, create four columns in the Account entity as mentioned below,

Column 1: Travel Time (datatype should be decimal or floating point)

Column 2: Travel Distance (datatype should be decimal or floating point)

Column 3: Travel Time with Text (datatype should be a single line of text)

Column 4: Travel Distance with Text (datatype should be a single line of text)

Click on Add step -> Update Record -> Select Entity (that you want to set Time & distance value for) -> Click on Set Property ->

Click on the field that you have created -> Select Look for -> local value “inogic.Maplytics.DrivingInstructions. DrivingInstruction”

Select the TravelTime & TravelDistance output

- It will give you the result in decimal or floating point without unit values (only numbers)

Select the TravelTimeWithText & TravelDistanceWithText output

- It will give you the result in text with unit values(miles/hours)​

Last updated